Version 3.6.0.2, tag libreoffice-3.6.0.2
[LibreOffice.git] / dbaccess / source / ui / uno / UserSettingsDlg.cxx
blob3cf23ebcebaaa0582885396e5e0eebb423e98e0c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
30 #include "dbu_reghelper.hxx"
31 #include "UserSettingsDlg.hxx"
32 #include "UserAdminDlg.hxx"
35 using namespace dbaui;
37 extern "C" void SAL_CALL createRegistryInfo_OUserSettingsDialog()
39 static OMultiInstanceAutoRegistration< OUserSettingsDialog > aAutoRegistration;
42 //.........................................................................
43 namespace dbaui
45 //.........................................................................
47 using namespace ::com::sun::star::uno;
48 using namespace ::com::sun::star::lang;
49 using namespace ::com::sun::star::beans;
51 //=========================================================================
52 //-------------------------------------------------------------------------
53 OUserSettingsDialog::OUserSettingsDialog(const Reference< XMultiServiceFactory >& _rxORB)
54 :ODatabaseAdministrationDialog(_rxORB)
57 //-------------------------------------------------------------------------
58 Sequence<sal_Int8> SAL_CALL OUserSettingsDialog::getImplementationId( ) throw(RuntimeException)
60 static ::cppu::OImplementationId aId;
61 return aId.getImplementationId();
64 //-------------------------------------------------------------------------
65 Reference< XInterface > SAL_CALL OUserSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
67 return *(new OUserSettingsDialog(_rxFactory));
70 //-------------------------------------------------------------------------
71 ::rtl::OUString SAL_CALL OUserSettingsDialog::getImplementationName() throw(RuntimeException)
73 return getImplementationName_Static();
76 //-------------------------------------------------------------------------
77 ::rtl::OUString OUserSettingsDialog::getImplementationName_Static() throw(RuntimeException)
79 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.OUserSettingsDialog"));
82 //-------------------------------------------------------------------------
83 ::comphelper::StringSequence SAL_CALL OUserSettingsDialog::getSupportedServiceNames() throw(RuntimeException)
85 return getSupportedServiceNames_Static();
88 //-------------------------------------------------------------------------
89 ::comphelper::StringSequence OUserSettingsDialog::getSupportedServiceNames_Static() throw(RuntimeException)
91 ::comphelper::StringSequence aSupported(1);
92 aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.UserAdministrationDialog"));
93 return aSupported;
96 //-------------------------------------------------------------------------
97 Reference<XPropertySetInfo> SAL_CALL OUserSettingsDialog::getPropertySetInfo() throw(RuntimeException)
99 Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
100 return xInfo;
103 //-------------------------------------------------------------------------
104 ::cppu::IPropertyArrayHelper& OUserSettingsDialog::getInfoHelper()
106 return *const_cast<OUserSettingsDialog*>(this)->getArrayHelper();
109 //------------------------------------------------------------------------------
110 ::cppu::IPropertyArrayHelper* OUserSettingsDialog::createArrayHelper( ) const
112 Sequence< Property > aProps;
113 describeProperties(aProps);
114 return new ::cppu::OPropertyArrayHelper(aProps);
116 //------------------------------------------------------------------------------
117 Dialog* OUserSettingsDialog::createDialog(Window* _pParent)
119 OUserAdminDlg* pDlg = new OUserAdminDlg(_pParent, m_pDatasourceItems, m_aContext.getLegacyServiceFactory(),m_aInitialSelection,m_xActiveConnection);
120 return pDlg;
123 //.........................................................................
124 } // namespace dbaui
125 //.........................................................................
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */