Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 :
21 : #include <cppuhelper/factory.hxx>
22 : #include <osl/diagnose.h>
23 : #include "dbu_reghelper.hxx"
24 :
25 :
26 : using namespace ::dbaui;
27 : using namespace ::com::sun::star::uno;
28 : using namespace ::com::sun::star::lang;
29 : using namespace ::com::sun::star::registry;
30 :
31 : //***************************************************************************************
32 : //
33 : // registry functions
34 : extern "C" void SAL_CALL createRegistryInfo_OTableFilterDialog();
35 : extern "C" void SAL_CALL createRegistryInfo_ODataSourcePropertyDialog();
36 : extern "C" void SAL_CALL createRegistryInfo_OSQLMessageDialog();
37 : extern "C" void SAL_CALL createRegistryInfo_OBrowser();
38 : extern "C" void SAL_CALL createRegistryInfo_OFormGridView();
39 : extern "C" void SAL_CALL createRegistryInfo_DBContentLoader();
40 : extern "C" void SAL_CALL writeDBLoaderInfo(void* pRegistryKey);
41 : extern "C" void SAL_CALL createRegistryInfo_OInteractionHandler();
42 : extern "C" void SAL_CALL createRegistryInfo_SbaXGridControl();
43 : extern "C" void SAL_CALL createRegistryInfo_OQueryControl();
44 : extern "C" void SAL_CALL createRegistryInfo_OViewControl();
45 : extern "C" void SAL_CALL createRegistryInfo_OTableControl();
46 : extern "C" void SAL_CALL createRegistryInfo_ORelationControl();
47 : extern "C" void SAL_CALL createRegistryInfo_ComposerDialogs();
48 : extern "C" void SAL_CALL createRegistryInfo_ODBApplication();
49 : extern "C" void SAL_CALL createRegistryInfo_ODirectSQLDialog();
50 : extern "C" void SAL_CALL createRegistryInfo_OAdvancedSettingsDialog();
51 : extern "C" void SAL_CALL createRegistryInfo_ODBTypeWizDialog();
52 : extern "C" void SAL_CALL createRegistryInfo_OUserSettingsDialog();
53 : extern "C" void SAL_CALL createRegistryInfo_ODBTypeWizDialogSetup();
54 : extern "C" void SAL_CALL createRegistryInfo_OColumnControlModel();
55 : extern "C" void SAL_CALL createRegistryInfo_OColumnControl();
56 : extern "C" void SAL_CALL createRegistryInfo_OToolboxController();
57 : extern "C" void SAL_CALL createRegistryInfo_CopyTableWizard();
58 : extern "C" void SAL_CALL createRegistryInfo_OTextConnectionSettingsDialog();
59 : extern "C" void SAL_CALL createRegistryInfo_LimitBoxController();
60 :
61 : //***************************************************************************************
62 8 : extern "C" void SAL_CALL createRegistryInfo_DBU()
63 : {
64 : static sal_Bool bInit = sal_False;
65 8 : if (!bInit)
66 : {
67 4 : createRegistryInfo_OTableFilterDialog();
68 4 : createRegistryInfo_ODataSourcePropertyDialog();
69 4 : createRegistryInfo_OSQLMessageDialog();
70 4 : createRegistryInfo_OBrowser();
71 4 : createRegistryInfo_OFormGridView();
72 4 : createRegistryInfo_DBContentLoader();
73 4 : createRegistryInfo_OInteractionHandler();
74 4 : createRegistryInfo_SbaXGridControl();
75 4 : createRegistryInfo_OQueryControl();
76 4 : createRegistryInfo_OViewControl();
77 4 : createRegistryInfo_OTableControl();
78 4 : createRegistryInfo_ORelationControl();
79 4 : createRegistryInfo_ComposerDialogs();
80 4 : createRegistryInfo_ODBApplication();
81 4 : createRegistryInfo_ODirectSQLDialog();
82 4 : createRegistryInfo_OAdvancedSettingsDialog();
83 4 : createRegistryInfo_ODBTypeWizDialog();
84 4 : createRegistryInfo_ODBTypeWizDialogSetup();
85 4 : createRegistryInfo_OUserSettingsDialog();
86 4 : createRegistryInfo_OColumnControlModel();
87 4 : createRegistryInfo_OColumnControl();
88 4 : createRegistryInfo_OToolboxController();
89 4 : createRegistryInfo_CopyTableWizard();
90 4 : createRegistryInfo_OTextConnectionSettingsDialog();
91 4 : createRegistryInfo_LimitBoxController();
92 4 : bInit = sal_True;
93 : }
94 8 : }
95 :
96 : //---------------------------------------------------------------------------------------
97 8 : extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbu_component_getFactory(
98 : const sal_Char* pImplementationName,
99 : void* pServiceManager,
100 : void* /*pRegistryKey*/)
101 : {
102 8 : createRegistryInfo_DBU();
103 :
104 8 : Reference< XInterface > xRet;
105 8 : if (pServiceManager && pImplementationName)
106 : {
107 16 : xRet = ::dbaui::OModuleRegistration::getComponentFactory(
108 : OUString::createFromAscii(pImplementationName),
109 8 : static_cast< XMultiServiceFactory* >(pServiceManager));
110 : }
111 :
112 8 : if (xRet.is())
113 8 : xRet->acquire();
114 8 : return xRet.get();
115 : };
116 :
117 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|