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 
27 #ifndef _EXTENSIONS_PROPCTRLR_MODULEPRC_HXX_
28 #include "modulepcr.hxx"
29 #endif
30 
31 //---------------------------------------------------------------------------------------
32 
33 using namespace ::rtl;
34 using namespace ::com::sun::star::uno;
35 using namespace ::com::sun::star::lang;
36 using namespace ::com::sun::star::registry;
37 
38 //---------------------------------------------------------------------------------------
39 
40 extern "C" void SAL_CALL createRegistryInfo_OPropertyBrowserController();
41 extern "C" void SAL_CALL createRegistryInfo_FormController();
42 extern "C" void SAL_CALL createRegistryInfo_DefaultFormComponentInspectorModel();
43 extern "C" void SAL_CALL createRegistryInfo_DefaultHelpProvider();
44 extern "C" void SAL_CALL createRegistryInfo_OControlFontDialog();
45 extern "C" void SAL_CALL createRegistryInfo_OTabOrderDialog();
46 extern "C" void SAL_CALL createRegistryInfo_CellBindingPropertyHandler();
47 extern "C" void SAL_CALL createRegistryInfo_ButtonNavigationHandler();
48 extern "C" void SAL_CALL createRegistryInfo_EditPropertyHandler();
49 extern "C" void SAL_CALL createRegistryInfo_FormComponentPropertyHandler();
50 extern "C" void SAL_CALL createRegistryInfo_EFormsPropertyHandler();
51 extern "C" void SAL_CALL createRegistryInfo_XSDValidationPropertyHandler();
52 extern "C" void SAL_CALL createRegistryInfo_EventHandler();
53 extern "C" void SAL_CALL createRegistryInfo_GenericPropertyHandler();
54 extern "C" void SAL_CALL createRegistryInfo_ObjectInspectorModel();
55 extern "C" void SAL_CALL createRegistryInfo_SubmissionPropertyHandler();
56 extern "C" void SAL_CALL createRegistryInfo_StringRepresentation();
57 extern "C" void SAL_CALL createRegistryInfo_MasterDetailLinkDialog();
58 extern "C" void SAL_CALL createRegistryInfo_FormGeometryHandler();
59 
60 //---------------------------------------------------------------------------------------
61 
pcr_initializeModule()62 extern "C" void SAL_CALL pcr_initializeModule()
63 {
64 	static sal_Bool s_bInit = sal_False;
65 	if (!s_bInit)
66 	{
67 		createRegistryInfo_OPropertyBrowserController();
68         createRegistryInfo_FormController();
69         createRegistryInfo_DefaultFormComponentInspectorModel();
70         createRegistryInfo_DefaultHelpProvider();
71 		createRegistryInfo_OControlFontDialog();
72         createRegistryInfo_OTabOrderDialog();
73         createRegistryInfo_CellBindingPropertyHandler();
74         createRegistryInfo_ButtonNavigationHandler();
75         createRegistryInfo_EditPropertyHandler();
76         createRegistryInfo_FormComponentPropertyHandler();
77         createRegistryInfo_EFormsPropertyHandler();
78         createRegistryInfo_XSDValidationPropertyHandler();
79         createRegistryInfo_EventHandler();
80         createRegistryInfo_GenericPropertyHandler();
81         createRegistryInfo_ObjectInspectorModel();
82         createRegistryInfo_SubmissionPropertyHandler();
83         createRegistryInfo_StringRepresentation();
84         createRegistryInfo_MasterDetailLinkDialog();
85         createRegistryInfo_FormGeometryHandler();
86 		s_bInit = sal_True;
87 	}
88 }
89 
90 //---------------------------------------------------------------------------------------
91 
92 extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)93 component_getImplementationEnvironment(
94 				const sal_Char	**ppEnvTypeName,
95 				uno_Environment	** /*ppEnv*/
96 			)
97 {
98 	pcr_initializeModule();
99 	*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
100 }
101 
102 //---------------------------------------------------------------------------------------
component_getFactory(const sal_Char * pImplementationName,void * pServiceManager,void *)103 extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
104 					const sal_Char* pImplementationName,
105 					void* pServiceManager,
106 					void* /*pRegistryKey*/)
107 {
108 	Reference< XInterface > xRet;
109 	if (pServiceManager && pImplementationName)
110 	{
111 		xRet = ::pcr::PcrModule::getInstance().getComponentFactory(
112 			::rtl::OUString::createFromAscii(pImplementationName),
113 			static_cast< XMultiServiceFactory* >(pServiceManager));
114 	}
115 
116 	if (xRet.is())
117 		xRet->acquire();
118 	return xRet.get();
119 };
120 
121