xref: /trunk/main/sw/source/ui/vba/service.cxx (revision efeef26f)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #include "cppuhelper/implementationentry.hxx"
24 #include "com/sun/star/lang/XMultiServiceFactory.hpp"
25 #include "com/sun/star/registry/XRegistryKey.hpp"
26 #include "comphelper/servicedecl.hxx"
27 
28 // =============================================================================
29 // component exports
30 // =============================================================================
31 using namespace ::com::sun::star;
32 using namespace ::com::sun::star::uno;
33 
34 namespace sdecl = comphelper::service_decl;
35 
36 namespace globals
37 {
38 extern sdecl::ServiceDecl const serviceDecl;
39 }
40 
41 namespace document
42 {
43 extern sdecl::ServiceDecl const serviceDecl;
44 }
45 
46 namespace wrapformat
47 {
48 extern sdecl::ServiceDecl const serviceDecl;
49 }
50 
51 namespace vbaeventshelper
52 {
53 extern sdecl::ServiceDecl const serviceDecl;
54 }
55 
56 extern "C"
57 {
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)58     SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
59         const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
60     {
61 		OSL_TRACE("In component_getImplementationEnv");
62         *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
63     }
64 
component_getFactory(const sal_Char * pImplName,lang::XMultiServiceFactory * pServiceManager,registry::XRegistryKey * pRegistryKey)65     SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
66         const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
67         registry::XRegistryKey * pRegistryKey )
68     {
69 		OSL_TRACE("In component_getFactory for %s", pImplName );
70 	void* pRet =  component_getFactoryHelper(
71         	pImplName, pServiceManager, pRegistryKey, globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl, vbaeventshelper::serviceDecl );
72 	OSL_TRACE("Ret is 0x%x", pRet);
73 	return pRet;
74     }
75 }
76 
77