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: uiservices.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_dbaccess.hxx"
34 #ifndef _CPPUHELPER_FACTORY_HXX_
35 #include <cppuhelper/factory.hxx>
37 #ifndef _OSL_DIAGNOSE_H_
38 #include <osl/diagnose.h>
40 #ifndef _DBU_REGHELPER_HXX_
41 #include "dbu_reghelper.hxx"
43 #ifndef INCLUDED_DBACCESSDLLAPI_H
44 #include "dbaccessdllapi.h"
47 /********************************************************************************************/
49 using namespace ::dbaui
;
50 using namespace ::com::sun::star::uno
;
51 using namespace ::com::sun::star::lang
;
52 using namespace ::com::sun::star::registry
;
54 //***************************************************************************************
57 extern "C" void SAL_CALL
createRegistryInfo_OTableFilterDialog();
58 extern "C" void SAL_CALL
createRegistryInfo_ODataSourcePropertyDialog();
59 extern "C" void SAL_CALL
createRegistryInfo_OSQLMessageDialog();
60 extern "C" void SAL_CALL
createRegistryInfo_OBrowser();
61 extern "C" void SAL_CALL
createRegistryInfo_OFormGridView();
62 extern "C" void SAL_CALL
createRegistryInfo_DBContentLoader();
63 extern "C" void SAL_CALL
writeDBLoaderInfo(void* pRegistryKey
);
64 extern "C" void SAL_CALL
createRegistryInfo_OInteractionHandler();
65 extern "C" void SAL_CALL
createRegistryInfo_SbaXGridControl();
66 extern "C" void SAL_CALL
createRegistryInfo_OQueryControl();
67 extern "C" void SAL_CALL
createRegistryInfo_OViewControl();
68 extern "C" void SAL_CALL
createRegistryInfo_OTableControl();
69 extern "C" void SAL_CALL
createRegistryInfo_ORelationControl();
70 extern "C" void SAL_CALL
createRegistryInfo_ComposerDialogs();
71 extern "C" void SAL_CALL
createRegistryInfo_ODBApplication();
72 extern "C" void SAL_CALL
createRegistryInfo_ODirectSQLDialog();
73 extern "C" void SAL_CALL
createRegistryInfo_OAdvancedSettingsDialog();
74 extern "C" void SAL_CALL
createRegistryInfo_ODBTypeWizDialog();
75 extern "C" void SAL_CALL
createRegistryInfo_OUserSettingsDialog();
76 extern "C" void SAL_CALL
createRegistryInfo_ODBTypeWizDialogSetup();
77 extern "C" void SAL_CALL
createRegistryInfo_OColumnControlModel();
78 extern "C" void SAL_CALL
createRegistryInfo_OColumnControl();
79 extern "C" void SAL_CALL
createRegistryInfo_OToolboxController();
80 extern "C" void SAL_CALL
createRegistryInfo_OStatusbarController();
81 extern "C" void SAL_CALL
createRegistryInfo_CopyTableWizard();
82 extern "C" void SAL_CALL
createRegistryInfo_OTextConnectionSettingsDialog();
84 //***************************************************************************************
85 extern "C" void SAL_CALL
createRegistryInfo_DBU()
87 static sal_Bool bInit
= sal_False
;
90 createRegistryInfo_OTableFilterDialog();
91 createRegistryInfo_ODataSourcePropertyDialog();
92 createRegistryInfo_OSQLMessageDialog();
93 createRegistryInfo_OBrowser();
94 createRegistryInfo_OFormGridView();
95 createRegistryInfo_DBContentLoader();
96 createRegistryInfo_OInteractionHandler();
97 createRegistryInfo_SbaXGridControl();
98 createRegistryInfo_OQueryControl();
99 createRegistryInfo_OViewControl();
100 createRegistryInfo_OTableControl();
101 createRegistryInfo_ORelationControl();
102 createRegistryInfo_ComposerDialogs();
103 createRegistryInfo_ODBApplication();
104 createRegistryInfo_ODirectSQLDialog();
105 createRegistryInfo_OAdvancedSettingsDialog();
106 createRegistryInfo_ODBTypeWizDialog();
107 createRegistryInfo_ODBTypeWizDialogSetup();
108 createRegistryInfo_OUserSettingsDialog();
109 createRegistryInfo_OColumnControlModel();
110 createRegistryInfo_OColumnControl();
111 createRegistryInfo_OToolboxController();
112 createRegistryInfo_OStatusbarController();
113 createRegistryInfo_CopyTableWizard();
114 createRegistryInfo_OTextConnectionSettingsDialog();
119 //---------------------------------------------------------------------------------------
121 extern "C" DBACCESS_DLLPUBLIC
void SAL_CALL
component_getImplementationEnvironment(
122 const sal_Char
**ppEnvTypeName
,
126 createRegistryInfo_DBU();
127 *ppEnvTypeName
= CPPU_CURRENT_LANGUAGE_BINDING_NAME
;
130 //---------------------------------------------------------------------------------------
131 extern "C" DBACCESS_DLLPUBLIC sal_Bool SAL_CALL
component_writeInfo(
132 void* pServiceManager
,
139 writeDBLoaderInfo(pRegistryKey
);
140 return ::dbaui::OModuleRegistration::writeComponentInfos(
141 static_cast<XMultiServiceFactory
*>(pServiceManager
),
142 static_cast<XRegistryKey
*>(pRegistryKey
));
144 catch (InvalidRegistryException
& )
146 OSL_ENSURE(sal_False
, "DBA::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !");
152 //---------------------------------------------------------------------------------------
153 extern "C" DBACCESS_DLLPUBLIC
void* SAL_CALL
component_getFactory(
154 const sal_Char
* pImplementationName
,
155 void* pServiceManager
,
156 void* /*pRegistryKey*/)
158 Reference
< XInterface
> xRet
;
159 if (pServiceManager
&& pImplementationName
)
161 xRet
= ::dbaui::OModuleRegistration::getComponentFactory(
162 ::rtl::OUString::createFromAscii(pImplementationName
),
163 static_cast< XMultiServiceFactory
* >(pServiceManager
));