1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: pcrservices.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_extensions.hxx"
34 #ifndef _EXTENSIONS_PROPCTRLR_MODULEPRC_HXX_
35 #include "modulepcr.hxx"
38 //---------------------------------------------------------------------------------------
40 using namespace ::rtl
;
41 using namespace ::com::sun::star::uno
;
42 using namespace ::com::sun::star::lang
;
43 using namespace ::com::sun::star::registry
;
45 //---------------------------------------------------------------------------------------
47 extern "C" void SAL_CALL
createRegistryInfo_OPropertyBrowserController();
48 extern "C" void SAL_CALL
createRegistryInfo_FormController();
49 extern "C" void SAL_CALL
createRegistryInfo_DefaultFormComponentInspectorModel();
50 extern "C" void SAL_CALL
createRegistryInfo_DefaultHelpProvider();
51 extern "C" void SAL_CALL
createRegistryInfo_OControlFontDialog();
52 extern "C" void SAL_CALL
createRegistryInfo_OTabOrderDialog();
53 extern "C" void SAL_CALL
createRegistryInfo_CellBindingPropertyHandler();
54 extern "C" void SAL_CALL
createRegistryInfo_ButtonNavigationHandler();
55 extern "C" void SAL_CALL
createRegistryInfo_EditPropertyHandler();
56 extern "C" void SAL_CALL
createRegistryInfo_FormComponentPropertyHandler();
57 extern "C" void SAL_CALL
createRegistryInfo_EFormsPropertyHandler();
58 extern "C" void SAL_CALL
createRegistryInfo_XSDValidationPropertyHandler();
59 extern "C" void SAL_CALL
createRegistryInfo_EventHandler();
60 extern "C" void SAL_CALL
createRegistryInfo_GenericPropertyHandler();
61 extern "C" void SAL_CALL
createRegistryInfo_ObjectInspectorModel();
62 extern "C" void SAL_CALL
createRegistryInfo_SubmissionPropertyHandler();
63 extern "C" void SAL_CALL
createRegistryInfo_StringRepresentation();
64 extern "C" void SAL_CALL
createRegistryInfo_MasterDetailLinkDialog();
65 extern "C" void SAL_CALL
createRegistryInfo_FormGeometryHandler();
67 //---------------------------------------------------------------------------------------
69 extern "C" void SAL_CALL
pcr_initializeModule()
71 static sal_Bool s_bInit
= sal_False
;
74 createRegistryInfo_OPropertyBrowserController();
75 createRegistryInfo_FormController();
76 createRegistryInfo_DefaultFormComponentInspectorModel();
77 createRegistryInfo_DefaultHelpProvider();
78 createRegistryInfo_OControlFontDialog();
79 createRegistryInfo_OTabOrderDialog();
80 createRegistryInfo_CellBindingPropertyHandler();
81 createRegistryInfo_ButtonNavigationHandler();
82 createRegistryInfo_EditPropertyHandler();
83 createRegistryInfo_FormComponentPropertyHandler();
84 createRegistryInfo_EFormsPropertyHandler();
85 createRegistryInfo_XSDValidationPropertyHandler();
86 createRegistryInfo_EventHandler();
87 createRegistryInfo_GenericPropertyHandler();
88 createRegistryInfo_ObjectInspectorModel();
89 createRegistryInfo_SubmissionPropertyHandler();
90 createRegistryInfo_StringRepresentation();
91 createRegistryInfo_MasterDetailLinkDialog();
92 createRegistryInfo_FormGeometryHandler();
97 //---------------------------------------------------------------------------------------
99 extern "C" SAL_DLLPUBLIC_EXPORT
void SAL_CALL
100 component_getImplementationEnvironment(
101 const sal_Char
**ppEnvTypeName
,
102 uno_Environment
** /*ppEnv*/
105 pcr_initializeModule();
106 *ppEnvTypeName
= CPPU_CURRENT_LANGUAGE_BINDING_NAME
;
109 //---------------------------------------------------------------------------------------
110 extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL
component_writeInfo(
111 void* pServiceManager
,
118 return ::pcr::PcrModule::getInstance().writeComponentInfos(
119 static_cast<XMultiServiceFactory
*>(pServiceManager
),
120 static_cast<XRegistryKey
*>(pRegistryKey
));
122 catch (InvalidRegistryException
& )
124 OSL_ASSERT("pcr::component_writeInfo: could not create a registry key (InvalidRegistryException) !");
130 //---------------------------------------------------------------------------------------
131 extern "C" SAL_DLLPUBLIC_EXPORT
void* SAL_CALL
component_getFactory(
132 const sal_Char
* pImplementationName
,
133 void* pServiceManager
,
134 void* /*pRegistryKey*/)
136 Reference
< XInterface
> xRet
;
137 if (pServiceManager
&& pImplementationName
)
139 xRet
= ::pcr::PcrModule::getInstance().getComponentFactory(
140 ::rtl::OUString::createFromAscii(pImplementationName
),
141 static_cast< XMultiServiceFactory
* >(pServiceManager
));