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 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_extensions.hxx"
26 #include "componentmodule.hxx"
27 
28 //---------------------------------------------------------------------------------------
29 
30 using namespace ::rtl;
31 using namespace ::com::sun::star::uno;
32 using namespace ::com::sun::star::lang;
33 using namespace ::com::sun::star::registry;
34 
35 //---------------------------------------------------------------------------------------
36 
37 extern "C" void SAL_CALL createRegistryInfo_OGroupBoxWizard();
38 extern "C" void SAL_CALL createRegistryInfo_OListComboWizard();
39 extern "C" void SAL_CALL createRegistryInfo_OGridWizard();
40 
41 //---------------------------------------------------------------------------------------
42 
dbp_initializeModule()43 extern "C" void SAL_CALL dbp_initializeModule()
44 {
45 	static sal_Bool s_bInit = sal_False;
46 	if (!s_bInit)
47 	{
48 		createRegistryInfo_OGroupBoxWizard();
49 		createRegistryInfo_OListComboWizard();
50 		createRegistryInfo_OGridWizard();
51 		::dbp::OModule::setResourceFilePrefix("dbp");
52 		s_bInit = sal_True;
53 	}
54 }
55 
56 //---------------------------------------------------------------------------------------
57 
58 extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)59 component_getImplementationEnvironment(
60 				const sal_Char	**ppEnvTypeName,
61 				uno_Environment	** /*ppEnv*/
62 			)
63 {
64 	dbp_initializeModule();
65 	*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
66 }
67 
68 //---------------------------------------------------------------------------------------
component_getFactory(const sal_Char * pImplementationName,void * pServiceManager,void *)69 extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
70 					const sal_Char* pImplementationName,
71 					void* pServiceManager,
72 					void* /*pRegistryKey*/)
73 {
74 	Reference< XInterface > xRet;
75 	if (pServiceManager && pImplementationName)
76 	{
77 		xRet = ::dbp::OModule::getComponentFactory(
78 			::rtl::OUString::createFromAscii(pImplementationName),
79 			static_cast< XMultiServiceFactory* >(pServiceManager));
80 	}
81 
82 	if (xRet.is())
83 		xRet->acquire();
84 	return xRet.get();
85 };
86 
87 
88