1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_extensions.hxx"
30 
31 #ifndef _EXTENSIONS_PROPCTRLR_MODULEPRC_HXX_
32 #include "modulepcr.hxx"
33 #endif
34 
35 //---------------------------------------------------------------------------------------
36 
37 using namespace ::rtl;
38 using namespace ::com::sun::star::uno;
39 using namespace ::com::sun::star::lang;
40 using namespace ::com::sun::star::registry;
41 
42 //---------------------------------------------------------------------------------------
43 
44 extern "C" void SAL_CALL createRegistryInfo_OPropertyBrowserController();
45 extern "C" void SAL_CALL createRegistryInfo_FormController();
46 extern "C" void SAL_CALL createRegistryInfo_DefaultFormComponentInspectorModel();
47 extern "C" void SAL_CALL createRegistryInfo_DefaultHelpProvider();
48 extern "C" void SAL_CALL createRegistryInfo_OControlFontDialog();
49 extern "C" void SAL_CALL createRegistryInfo_OTabOrderDialog();
50 extern "C" void SAL_CALL createRegistryInfo_CellBindingPropertyHandler();
51 extern "C" void SAL_CALL createRegistryInfo_ButtonNavigationHandler();
52 extern "C" void SAL_CALL createRegistryInfo_EditPropertyHandler();
53 extern "C" void SAL_CALL createRegistryInfo_FormComponentPropertyHandler();
54 extern "C" void SAL_CALL createRegistryInfo_EFormsPropertyHandler();
55 extern "C" void SAL_CALL createRegistryInfo_XSDValidationPropertyHandler();
56 extern "C" void SAL_CALL createRegistryInfo_EventHandler();
57 extern "C" void SAL_CALL createRegistryInfo_GenericPropertyHandler();
58 extern "C" void SAL_CALL createRegistryInfo_ObjectInspectorModel();
59 extern "C" void SAL_CALL createRegistryInfo_SubmissionPropertyHandler();
60 extern "C" void SAL_CALL createRegistryInfo_StringRepresentation();
61 extern "C" void SAL_CALL createRegistryInfo_MasterDetailLinkDialog();
62 extern "C" void SAL_CALL createRegistryInfo_FormGeometryHandler();
63 
64 //---------------------------------------------------------------------------------------
65 
66 extern "C" void SAL_CALL pcr_initializeModule()
67 {
68 	static sal_Bool s_bInit = sal_False;
69 	if (!s_bInit)
70 	{
71 		createRegistryInfo_OPropertyBrowserController();
72         createRegistryInfo_FormController();
73         createRegistryInfo_DefaultFormComponentInspectorModel();
74         createRegistryInfo_DefaultHelpProvider();
75 		createRegistryInfo_OControlFontDialog();
76         createRegistryInfo_OTabOrderDialog();
77         createRegistryInfo_CellBindingPropertyHandler();
78         createRegistryInfo_ButtonNavigationHandler();
79         createRegistryInfo_EditPropertyHandler();
80         createRegistryInfo_FormComponentPropertyHandler();
81         createRegistryInfo_EFormsPropertyHandler();
82         createRegistryInfo_XSDValidationPropertyHandler();
83         createRegistryInfo_EventHandler();
84         createRegistryInfo_GenericPropertyHandler();
85         createRegistryInfo_ObjectInspectorModel();
86         createRegistryInfo_SubmissionPropertyHandler();
87         createRegistryInfo_StringRepresentation();
88         createRegistryInfo_MasterDetailLinkDialog();
89         createRegistryInfo_FormGeometryHandler();
90 		s_bInit = sal_True;
91 	}
92 }
93 
94 //---------------------------------------------------------------------------------------
95 
96 extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
97 component_getImplementationEnvironment(
98 				const sal_Char	**ppEnvTypeName,
99 				uno_Environment	** /*ppEnv*/
100 			)
101 {
102 	pcr_initializeModule();
103 	*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
104 }
105 
106 //---------------------------------------------------------------------------------------
107 extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
108 					const sal_Char* pImplementationName,
109 					void* pServiceManager,
110 					void* /*pRegistryKey*/)
111 {
112 	Reference< XInterface > xRet;
113 	if (pServiceManager && pImplementationName)
114 	{
115 		xRet = ::pcr::PcrModule::getInstance().getComponentFactory(
116 			::rtl::OUString::createFromAscii(pImplementationName),
117 			static_cast< XMultiServiceFactory* >(pServiceManager));
118 	}
119 
120 	if (xRet.is())
121 		xRet->acquire();
122 	return xRet.get();
123 };
124 
125