xref: /trunk/main/svx/source/core/coreservices.cxx (revision 199633b5)
1f6e50924SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3f6e50924SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4f6e50924SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5f6e50924SAndrew Rist  * distributed with this work for additional information
6f6e50924SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7f6e50924SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8f6e50924SAndrew Rist  * "License"); you may not use this file except in compliance
9f6e50924SAndrew Rist  * with the License.  You may obtain a copy of the License at
10f6e50924SAndrew Rist  *
11f6e50924SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12f6e50924SAndrew Rist  *
13f6e50924SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14f6e50924SAndrew Rist  * software distributed under the License is distributed on an
15f6e50924SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16f6e50924SAndrew Rist  * KIND, either express or implied.  See the License for the
17f6e50924SAndrew Rist  * specific language governing permissions and limitations
18f6e50924SAndrew Rist  * under the License.
19f6e50924SAndrew Rist  *
20f6e50924SAndrew Rist  *************************************************************/
21f6e50924SAndrew Rist 
22f6e50924SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir /** this file contains the uno service registrations for all services in the svxcore lib */
25cdf0e10cSrcweir 
26cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
27cdf0e10cSrcweir #include "precompiled_svx.hxx"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include "sal/types.h"
30cdf0e10cSrcweir #include "osl/diagnose.h"
31cdf0e10cSrcweir #include "cppuhelper/factory.hxx"
32cdf0e10cSrcweir #include "uno/lbnames.h"
33cdf0e10cSrcweir 
34cdf0e10cSrcweir using rtl::OUString;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir using namespace com::sun::star::uno;
37cdf0e10cSrcweir using namespace com::sun::star::lang;
38cdf0e10cSrcweir using namespace com::sun::star::registry;
39cdf0e10cSrcweir 
40cdf0e10cSrcweir namespace svx
41cdf0e10cSrcweir {
42cdf0e10cSrcweir extern OUString SAL_CALL ExtrusionDepthController_getImplementationName();
43cdf0e10cSrcweir extern Reference< XInterface > SAL_CALL ExtrusionDepthController_createInstance(const Reference< XMultiServiceFactory > &)  throw( RuntimeException );
44cdf0e10cSrcweir extern Sequence< OUString > SAL_CALL ExtrusionDepthController_getSupportedServiceNames() throw( RuntimeException );
45cdf0e10cSrcweir 
46cdf0e10cSrcweir extern OUString SAL_CALL ExtrusionDirectionControl_getImplementationName();
47cdf0e10cSrcweir extern Reference< XInterface > SAL_CALL ExtrusionDirectionControl_createInstance(const Reference< XMultiServiceFactory > &)  throw( RuntimeException );
48cdf0e10cSrcweir extern Sequence< OUString > SAL_CALL ExtrusionDirectionControl_getSupportedServiceNames() throw( RuntimeException );
49cdf0e10cSrcweir 
50cdf0e10cSrcweir extern OUString SAL_CALL ExtrusionLightingControl_getImplementationName();
51cdf0e10cSrcweir extern Reference< XInterface > SAL_CALL ExtrusionLightingControl_createInstance(const Reference< XMultiServiceFactory > &)  throw( RuntimeException );
52cdf0e10cSrcweir extern Sequence< OUString > SAL_CALL ExtrusionLightingControl_getSupportedServiceNames() throw( RuntimeException );
53cdf0e10cSrcweir 
54cdf0e10cSrcweir extern OUString SAL_CALL ExtrusionSurfaceControl_getImplementationName();
55cdf0e10cSrcweir extern Reference< XInterface > SAL_CALL ExtrusionSurfaceControl_createInstance(const Reference< XMultiServiceFactory > &)  throw( RuntimeException );
56cdf0e10cSrcweir extern Sequence< OUString > SAL_CALL ExtrusionSurfaceControl_getSupportedServiceNames() throw( RuntimeException );
57cdf0e10cSrcweir 
58*199633b5SHerbert Dürr extern OUString SAL_CALL FontworkAlignmentControl_getImplementationName();
59*199633b5SHerbert Dürr extern Reference< XInterface > SAL_CALL FontworkAlignmentControl_createInstance(const Reference< XMultiServiceFactory > &)  throw( RuntimeException );
60*199633b5SHerbert Dürr extern Sequence< OUString > SAL_CALL FontworkAlignmentControl_getSupportedServiceNames() throw( RuntimeException );
61cdf0e10cSrcweir 
62*199633b5SHerbert Dürr extern OUString SAL_CALL FontworkCharacterSpacingControl_getImplementationName();
63*199633b5SHerbert Dürr extern Reference< XInterface > SAL_CALL FontworkCharacterSpacingControl_createInstance(const Reference< XMultiServiceFactory > &)  throw( RuntimeException );
64*199633b5SHerbert Dürr extern Sequence< OUString > SAL_CALL FontworkCharacterSpacingControl_getSupportedServiceNames() throw( RuntimeException );
65cdf0e10cSrcweir }
66cdf0e10cSrcweir 
67cdf0e10cSrcweir extern "C"
68cdf0e10cSrcweir {
69cdf0e10cSrcweir 
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)70cdf0e10cSrcweir SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment (
71cdf0e10cSrcweir 	const sal_Char ** ppEnvTypeName, uno_Environment ** )
72cdf0e10cSrcweir {
73cdf0e10cSrcweir 	*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
74cdf0e10cSrcweir }
75cdf0e10cSrcweir 
component_getFactory(const sal_Char * pImplName,void * pServiceManager,void *)76cdf0e10cSrcweir SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory (
77cdf0e10cSrcweir 	const sal_Char * pImplName, void * pServiceManager, void *  )
78cdf0e10cSrcweir {
79cdf0e10cSrcweir 	void * pRet = 0;
80cdf0e10cSrcweir 	if( pServiceManager  )
81cdf0e10cSrcweir 	{
82cdf0e10cSrcweir 		Reference< XSingleServiceFactory > xFactory;
83cdf0e10cSrcweir 
84cdf0e10cSrcweir 		if( ::svx::ExtrusionDepthController_getImplementationName().equalsAscii( pImplName ) )
85cdf0e10cSrcweir 		{
86cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory(
87cdf0e10cSrcweir 				reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
88cdf0e10cSrcweir 				::svx::ExtrusionDepthController_getImplementationName(),
89cdf0e10cSrcweir 				::svx::ExtrusionDepthController_createInstance,
90cdf0e10cSrcweir 				::svx::ExtrusionDepthController_getSupportedServiceNames() );
91cdf0e10cSrcweir 		}
92cdf0e10cSrcweir 		else if( ::svx::ExtrusionDirectionControl_getImplementationName().equalsAscii( pImplName ) )
93cdf0e10cSrcweir 		{
94cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory(
95cdf0e10cSrcweir 				reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
96cdf0e10cSrcweir 				::svx::ExtrusionDirectionControl_getImplementationName(),
97cdf0e10cSrcweir 				::svx::ExtrusionDirectionControl_createInstance,
98cdf0e10cSrcweir 				::svx::ExtrusionDirectionControl_getSupportedServiceNames() );
99cdf0e10cSrcweir 		}
100cdf0e10cSrcweir 		else if( ::svx::ExtrusionLightingControl_getImplementationName().equalsAscii( pImplName ) )
101cdf0e10cSrcweir 		{
102cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory(
103cdf0e10cSrcweir 				reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
104cdf0e10cSrcweir 				::svx::ExtrusionLightingControl_getImplementationName(),
105cdf0e10cSrcweir 				::svx::ExtrusionLightingControl_createInstance,
106cdf0e10cSrcweir 				::svx::ExtrusionLightingControl_getSupportedServiceNames() );
107cdf0e10cSrcweir 		}
108cdf0e10cSrcweir 		else if( ::svx::ExtrusionSurfaceControl_getImplementationName().equalsAscii( pImplName ) )
109cdf0e10cSrcweir 		{
110cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory(
111cdf0e10cSrcweir 				reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
112cdf0e10cSrcweir 				::svx::ExtrusionSurfaceControl_getImplementationName(),
113cdf0e10cSrcweir 				::svx::ExtrusionSurfaceControl_createInstance,
114cdf0e10cSrcweir 				::svx::ExtrusionSurfaceControl_getSupportedServiceNames() );
115cdf0e10cSrcweir 		}
116*199633b5SHerbert Dürr 		else if( ::svx::FontworkAlignmentControl_getImplementationName().equalsAscii( pImplName ) )
117cdf0e10cSrcweir 		{
118cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory(
119cdf0e10cSrcweir 				reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
120*199633b5SHerbert Dürr 				::svx::FontworkAlignmentControl_getImplementationName(),
121*199633b5SHerbert Dürr 				::svx::FontworkAlignmentControl_createInstance,
122*199633b5SHerbert Dürr 				::svx::FontworkAlignmentControl_getSupportedServiceNames() );
123cdf0e10cSrcweir 		}
124*199633b5SHerbert Dürr 		else if( ::svx::FontworkCharacterSpacingControl_getImplementationName().equalsAscii( pImplName ) )
125cdf0e10cSrcweir 		{
126cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory(
127cdf0e10cSrcweir 				reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
128*199633b5SHerbert Dürr 				::svx::FontworkCharacterSpacingControl_getImplementationName(),
129*199633b5SHerbert Dürr 				::svx::FontworkCharacterSpacingControl_createInstance,
130*199633b5SHerbert Dürr 				::svx::FontworkCharacterSpacingControl_getSupportedServiceNames() );
131cdf0e10cSrcweir 		}		if( xFactory.is())
132cdf0e10cSrcweir 		{
133cdf0e10cSrcweir 			xFactory->acquire();
134cdf0e10cSrcweir 			pRet = xFactory.get();
135cdf0e10cSrcweir 		}
136cdf0e10cSrcweir 	}
137cdf0e10cSrcweir 
138cdf0e10cSrcweir 	return pRet;
139cdf0e10cSrcweir }
140cdf0e10cSrcweir 
141cdf0e10cSrcweir }
142