Branch data 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 : : #include "dbaccessdllapi.h"
25 : :
26 : :
27 : : using namespace ::dbaui;
28 : : using namespace ::com::sun::star::uno;
29 : : using namespace ::com::sun::star::lang;
30 : : using namespace ::com::sun::star::registry;
31 : :
32 : : //***************************************************************************************
33 : : //
34 : : // registry functions
35 : : extern "C" void SAL_CALL createRegistryInfo_OTableFilterDialog();
36 : : extern "C" void SAL_CALL createRegistryInfo_ODataSourcePropertyDialog();
37 : : extern "C" void SAL_CALL createRegistryInfo_OSQLMessageDialog();
38 : : extern "C" void SAL_CALL createRegistryInfo_OBrowser();
39 : : extern "C" void SAL_CALL createRegistryInfo_OFormGridView();
40 : : extern "C" void SAL_CALL createRegistryInfo_DBContentLoader();
41 : : extern "C" void SAL_CALL writeDBLoaderInfo(void* pRegistryKey);
42 : : extern "C" void SAL_CALL createRegistryInfo_OInteractionHandler();
43 : : extern "C" void SAL_CALL createRegistryInfo_SbaXGridControl();
44 : : extern "C" void SAL_CALL createRegistryInfo_OQueryControl();
45 : : extern "C" void SAL_CALL createRegistryInfo_OViewControl();
46 : : extern "C" void SAL_CALL createRegistryInfo_OTableControl();
47 : : extern "C" void SAL_CALL createRegistryInfo_ORelationControl();
48 : : extern "C" void SAL_CALL createRegistryInfo_ComposerDialogs();
49 : : extern "C" void SAL_CALL createRegistryInfo_ODBApplication();
50 : : extern "C" void SAL_CALL createRegistryInfo_ODirectSQLDialog();
51 : : extern "C" void SAL_CALL createRegistryInfo_OAdvancedSettingsDialog();
52 : : extern "C" void SAL_CALL createRegistryInfo_ODBTypeWizDialog();
53 : : extern "C" void SAL_CALL createRegistryInfo_OUserSettingsDialog();
54 : : extern "C" void SAL_CALL createRegistryInfo_ODBTypeWizDialogSetup();
55 : : extern "C" void SAL_CALL createRegistryInfo_OColumnControlModel();
56 : : extern "C" void SAL_CALL createRegistryInfo_OColumnControl();
57 : : extern "C" void SAL_CALL createRegistryInfo_OToolboxController();
58 : : extern "C" void SAL_CALL createRegistryInfo_OStatusbarController();
59 : : extern "C" void SAL_CALL createRegistryInfo_CopyTableWizard();
60 : : extern "C" void SAL_CALL createRegistryInfo_OTextConnectionSettingsDialog();
61 : :
62 : : //***************************************************************************************
63 : 16 : extern "C" void SAL_CALL createRegistryInfo_DBU()
64 : : {
65 : : static sal_Bool bInit = sal_False;
66 [ + + ]: 16 : if (!bInit)
67 : : {
68 : 8 : createRegistryInfo_OTableFilterDialog();
69 : 8 : createRegistryInfo_ODataSourcePropertyDialog();
70 : 8 : createRegistryInfo_OSQLMessageDialog();
71 : 8 : createRegistryInfo_OBrowser();
72 : 8 : createRegistryInfo_OFormGridView();
73 : 8 : createRegistryInfo_DBContentLoader();
74 : 8 : createRegistryInfo_OInteractionHandler();
75 : 8 : createRegistryInfo_SbaXGridControl();
76 : 8 : createRegistryInfo_OQueryControl();
77 : 8 : createRegistryInfo_OViewControl();
78 : 8 : createRegistryInfo_OTableControl();
79 : 8 : createRegistryInfo_ORelationControl();
80 : 8 : createRegistryInfo_ComposerDialogs();
81 : 8 : createRegistryInfo_ODBApplication();
82 : 8 : createRegistryInfo_ODirectSQLDialog();
83 : 8 : createRegistryInfo_OAdvancedSettingsDialog();
84 : 8 : createRegistryInfo_ODBTypeWizDialog();
85 : 8 : createRegistryInfo_ODBTypeWizDialogSetup();
86 : 8 : createRegistryInfo_OUserSettingsDialog();
87 : 8 : createRegistryInfo_OColumnControlModel();
88 : 8 : createRegistryInfo_OColumnControl();
89 : 8 : createRegistryInfo_OToolboxController();
90 : 8 : createRegistryInfo_OStatusbarController();
91 : 8 : createRegistryInfo_CopyTableWizard();
92 : 8 : createRegistryInfo_OTextConnectionSettingsDialog();
93 : 8 : bInit = sal_True;
94 : : }
95 : 16 : }
96 : :
97 : : //---------------------------------------------------------------------------------------
98 : 16 : extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbu_component_getFactory(
99 : : const sal_Char* pImplementationName,
100 : : void* pServiceManager,
101 : : void* /*pRegistryKey*/)
102 : : {
103 [ + - ]: 16 : createRegistryInfo_DBU();
104 : :
105 : 16 : Reference< XInterface > xRet;
106 [ + - ][ + - ]: 16 : if (pServiceManager && pImplementationName)
107 : : {
108 : : xRet = ::dbaui::OModuleRegistration::getComponentFactory(
109 : : ::rtl::OUString::createFromAscii(pImplementationName),
110 [ + - ][ + - ]: 16 : static_cast< XMultiServiceFactory* >(pServiceManager));
[ + - ]
111 : : }
112 : :
113 [ + - ]: 16 : if (xRet.is())
114 [ + - ]: 16 : xRet->acquire();
115 [ + - ]: 16 : return xRet.get();
116 : : };
117 : :
118 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|