1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_dbaccess.hxx" 30 31 #ifndef _DBU_REGHELPER_HXX_ 32 #include "dbu_reghelper.hxx" 33 #endif 34 #ifndef _DBAUI_USERSETTINGSDLG_HXX 35 #include "UserSettingsDlg.hxx" 36 #endif 37 #ifndef DBAUI_USERADMINDLG_HXX 38 #include "UserAdminDlg.hxx" 39 #endif 40 41 42 using namespace dbaui; 43 44 extern "C" void SAL_CALL createRegistryInfo_OUserSettingsDialog() 45 { 46 static OMultiInstanceAutoRegistration< OUserSettingsDialog > aAutoRegistration; 47 } 48 49 //......................................................................... 50 namespace dbaui 51 { 52 //......................................................................... 53 54 using namespace ::com::sun::star::uno; 55 using namespace ::com::sun::star::lang; 56 using namespace ::com::sun::star::beans; 57 58 //========================================================================= 59 //------------------------------------------------------------------------- 60 OUserSettingsDialog::OUserSettingsDialog(const Reference< XMultiServiceFactory >& _rxORB) 61 :ODatabaseAdministrationDialog(_rxORB) 62 { 63 } 64 //------------------------------------------------------------------------- 65 Sequence<sal_Int8> SAL_CALL OUserSettingsDialog::getImplementationId( ) throw(RuntimeException) 66 { 67 static ::cppu::OImplementationId aId; 68 return aId.getImplementationId(); 69 } 70 71 //------------------------------------------------------------------------- 72 Reference< XInterface > SAL_CALL OUserSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) 73 { 74 return *(new OUserSettingsDialog(_rxFactory)); 75 } 76 77 //------------------------------------------------------------------------- 78 ::rtl::OUString SAL_CALL OUserSettingsDialog::getImplementationName() throw(RuntimeException) 79 { 80 return getImplementationName_Static(); 81 } 82 83 //------------------------------------------------------------------------- 84 ::rtl::OUString OUserSettingsDialog::getImplementationName_Static() throw(RuntimeException) 85 { 86 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.OUserSettingsDialog")); 87 } 88 89 //------------------------------------------------------------------------- 90 ::comphelper::StringSequence SAL_CALL OUserSettingsDialog::getSupportedServiceNames() throw(RuntimeException) 91 { 92 return getSupportedServiceNames_Static(); 93 } 94 95 //------------------------------------------------------------------------- 96 ::comphelper::StringSequence OUserSettingsDialog::getSupportedServiceNames_Static() throw(RuntimeException) 97 { 98 ::comphelper::StringSequence aSupported(1); 99 aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.UserAdministrationDialog")); 100 return aSupported; 101 } 102 103 //------------------------------------------------------------------------- 104 Reference<XPropertySetInfo> SAL_CALL OUserSettingsDialog::getPropertySetInfo() throw(RuntimeException) 105 { 106 Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); 107 return xInfo; 108 } 109 110 //------------------------------------------------------------------------- 111 ::cppu::IPropertyArrayHelper& OUserSettingsDialog::getInfoHelper() 112 { 113 return *const_cast<OUserSettingsDialog*>(this)->getArrayHelper(); 114 } 115 116 //------------------------------------------------------------------------------ 117 ::cppu::IPropertyArrayHelper* OUserSettingsDialog::createArrayHelper( ) const 118 { 119 Sequence< Property > aProps; 120 describeProperties(aProps); 121 return new ::cppu::OPropertyArrayHelper(aProps); 122 } 123 //------------------------------------------------------------------------------ 124 Dialog* OUserSettingsDialog::createDialog(Window* _pParent) 125 { 126 OUserAdminDlg* pDlg = new OUserAdminDlg(_pParent, m_pDatasourceItems, m_aContext.getLegacyServiceFactory(),m_aInitialSelection,m_xActiveConnection); 127 return pDlg; 128 } 129 130 //......................................................................... 131 } // namespace dbaui 132 //......................................................................... 133 134