1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 /** this file contains the uno service registrations for all services in the svxcore lib */
23 #include "sal/types.h"
24 #include "osl/diagnose.h"
25 #include "cppuhelper/factory.hxx"
26 #include "uno/lbnames.h"
29 using namespace com::sun::star::uno
;
30 using namespace com::sun::star::lang
;
31 using namespace com::sun::star::registry
;
35 extern OUString SAL_CALL
ExtrusionDepthController_getImplementationName();
36 extern Reference
< XInterface
> SAL_CALL
ExtrusionDepthController_createInstance(const Reference
< XMultiServiceFactory
> &) throw( RuntimeException
);
37 extern Sequence
< OUString
> SAL_CALL
ExtrusionDepthController_getSupportedServiceNames() throw( RuntimeException
);
39 extern OUString SAL_CALL
ExtrusionDirectionControl_getImplementationName();
40 extern Reference
< XInterface
> SAL_CALL
ExtrusionDirectionControl_createInstance(const Reference
< XMultiServiceFactory
> &) throw( RuntimeException
);
41 extern Sequence
< OUString
> SAL_CALL
ExtrusionDirectionControl_getSupportedServiceNames() throw( RuntimeException
);
43 extern OUString SAL_CALL
ExtrusionLightingControl_getImplementationName();
44 extern Reference
< XInterface
> SAL_CALL
ExtrusionLightingControl_createInstance(const Reference
< XMultiServiceFactory
> &) throw( RuntimeException
);
45 extern Sequence
< OUString
> SAL_CALL
ExtrusionLightingControl_getSupportedServiceNames() throw( RuntimeException
);
47 extern OUString SAL_CALL
ExtrusionSurfaceControl_getImplementationName();
48 extern Reference
< XInterface
> SAL_CALL
ExtrusionSurfaceControl_createInstance(const Reference
< XMultiServiceFactory
> &) throw( RuntimeException
);
49 extern Sequence
< OUString
> SAL_CALL
ExtrusionSurfaceControl_getSupportedServiceNames() throw( RuntimeException
);
51 extern OUString SAL_CALL
FontworkAlignmentControl_getImplementationName();
52 extern Reference
< XInterface
> SAL_CALL
FontworkAlignmentControl_createInstance(const Reference
< XMultiServiceFactory
> &) throw( RuntimeException
);
53 extern Sequence
< OUString
> SAL_CALL
FontworkAlignmentControl_getSupportedServiceNames() throw( RuntimeException
);
55 extern OUString SAL_CALL
FontworkCharacterSpacingControl_getImplementationName();
56 extern Reference
< XInterface
> SAL_CALL
FontworkCharacterSpacingControl_createInstance(const Reference
< XMultiServiceFactory
> &) throw( RuntimeException
);
57 extern Sequence
< OUString
> SAL_CALL
FontworkCharacterSpacingControl_getSupportedServiceNames() throw( RuntimeException
);
63 SAL_DLLPUBLIC_EXPORT
void * SAL_CALL
svxcore_component_getFactory (
64 const sal_Char
* pImplName
, void * pServiceManager
, void * )
69 Reference
< XSingleServiceFactory
> xFactory
;
71 if( ::svx::ExtrusionDepthController_getImplementationName().equalsAscii( pImplName
) )
73 xFactory
= ::cppu::createSingleFactory(
74 reinterpret_cast< XMultiServiceFactory
* >( pServiceManager
),
75 ::svx::ExtrusionDepthController_getImplementationName(),
76 ::svx::ExtrusionDepthController_createInstance
,
77 ::svx::ExtrusionDepthController_getSupportedServiceNames() );
79 else if( ::svx::ExtrusionDirectionControl_getImplementationName().equalsAscii( pImplName
) )
81 xFactory
= ::cppu::createSingleFactory(
82 reinterpret_cast< XMultiServiceFactory
* >( pServiceManager
),
83 ::svx::ExtrusionDirectionControl_getImplementationName(),
84 ::svx::ExtrusionDirectionControl_createInstance
,
85 ::svx::ExtrusionDirectionControl_getSupportedServiceNames() );
87 else if( ::svx::ExtrusionLightingControl_getImplementationName().equalsAscii( pImplName
) )
89 xFactory
= ::cppu::createSingleFactory(
90 reinterpret_cast< XMultiServiceFactory
* >( pServiceManager
),
91 ::svx::ExtrusionLightingControl_getImplementationName(),
92 ::svx::ExtrusionLightingControl_createInstance
,
93 ::svx::ExtrusionLightingControl_getSupportedServiceNames() );
95 else if( ::svx::ExtrusionSurfaceControl_getImplementationName().equalsAscii( pImplName
) )
97 xFactory
= ::cppu::createSingleFactory(
98 reinterpret_cast< XMultiServiceFactory
* >( pServiceManager
),
99 ::svx::ExtrusionSurfaceControl_getImplementationName(),
100 ::svx::ExtrusionSurfaceControl_createInstance
,
101 ::svx::ExtrusionSurfaceControl_getSupportedServiceNames() );
103 else if( ::svx::FontworkAlignmentControl_getImplementationName().equalsAscii( pImplName
) )
105 xFactory
= ::cppu::createSingleFactory(
106 reinterpret_cast< XMultiServiceFactory
* >( pServiceManager
),
107 ::svx::FontworkAlignmentControl_getImplementationName(),
108 ::svx::FontworkAlignmentControl_createInstance
,
109 ::svx::FontworkAlignmentControl_getSupportedServiceNames() );
111 else if( ::svx::FontworkCharacterSpacingControl_getImplementationName().equalsAscii( pImplName
) )
113 xFactory
= ::cppu::createSingleFactory(
114 reinterpret_cast< XMultiServiceFactory
* >( pServiceManager
),
115 ::svx::FontworkCharacterSpacingControl_getImplementationName(),
116 ::svx::FontworkCharacterSpacingControl_createInstance
,
117 ::svx::FontworkCharacterSpacingControl_getSupportedServiceNames() );
121 pRet
= xFactory
.get();
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */