1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_dbui.hxx" 26 27 #ifndef _DBU_REGHELPER_HXX_ 28 #include "dbu_reghelper.hxx" 29 #endif 30 #ifndef _DBAUI_USERSETTINGSDLG_HXX 31 #include "UserSettingsDlg.hxx" 32 #endif 33 #ifndef DBAUI_USERADMINDLG_HXX 34 #include "UserAdminDlg.hxx" 35 #endif 36 37 38 using namespace dbaui; 39 createRegistryInfo_OUserSettingsDialog()40extern "C" void SAL_CALL createRegistryInfo_OUserSettingsDialog() 41 { 42 static OMultiInstanceAutoRegistration< OUserSettingsDialog > aAutoRegistration; 43 } 44 45 //......................................................................... 46 namespace dbaui 47 { 48 //......................................................................... 49 50 using namespace ::com::sun::star::uno; 51 using namespace ::com::sun::star::lang; 52 using namespace ::com::sun::star::beans; 53 54 //========================================================================= 55 //------------------------------------------------------------------------- OUserSettingsDialog(const Reference<XMultiServiceFactory> & _rxORB)56OUserSettingsDialog::OUserSettingsDialog(const Reference< XMultiServiceFactory >& _rxORB) 57 :ODatabaseAdministrationDialog(_rxORB) 58 { 59 } 60 //------------------------------------------------------------------------- getImplementationId()61Sequence<sal_Int8> SAL_CALL OUserSettingsDialog::getImplementationId( ) throw(RuntimeException) 62 { 63 static ::cppu::OImplementationId aId; 64 return aId.getImplementationId(); 65 } 66 67 //------------------------------------------------------------------------- Create(const Reference<XMultiServiceFactory> & _rxFactory)68Reference< XInterface > SAL_CALL OUserSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) 69 { 70 return *(new OUserSettingsDialog(_rxFactory)); 71 } 72 73 //------------------------------------------------------------------------- getImplementationName()74::rtl::OUString SAL_CALL OUserSettingsDialog::getImplementationName() throw(RuntimeException) 75 { 76 return getImplementationName_Static(); 77 } 78 79 //------------------------------------------------------------------------- getImplementationName_Static()80::rtl::OUString OUserSettingsDialog::getImplementationName_Static() throw(RuntimeException) 81 { 82 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.OUserSettingsDialog")); 83 } 84 85 //------------------------------------------------------------------------- getSupportedServiceNames()86::comphelper::StringSequence SAL_CALL OUserSettingsDialog::getSupportedServiceNames() throw(RuntimeException) 87 { 88 return getSupportedServiceNames_Static(); 89 } 90 91 //------------------------------------------------------------------------- getSupportedServiceNames_Static()92::comphelper::StringSequence OUserSettingsDialog::getSupportedServiceNames_Static() throw(RuntimeException) 93 { 94 ::comphelper::StringSequence aSupported(1); 95 aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.UserAdministrationDialog")); 96 return aSupported; 97 } 98 99 //------------------------------------------------------------------------- getPropertySetInfo()100Reference<XPropertySetInfo> SAL_CALL OUserSettingsDialog::getPropertySetInfo() throw(RuntimeException) 101 { 102 Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); 103 return xInfo; 104 } 105 106 //------------------------------------------------------------------------- getInfoHelper()107::cppu::IPropertyArrayHelper& OUserSettingsDialog::getInfoHelper() 108 { 109 return *const_cast<OUserSettingsDialog*>(this)->getArrayHelper(); 110 } 111 112 //------------------------------------------------------------------------------ createArrayHelper() const113::cppu::IPropertyArrayHelper* OUserSettingsDialog::createArrayHelper( ) const 114 { 115 Sequence< Property > aProps; 116 describeProperties(aProps); 117 return new ::cppu::OPropertyArrayHelper(aProps); 118 } 119 //------------------------------------------------------------------------------ createDialog(Window * _pParent)120Dialog* OUserSettingsDialog::createDialog(Window* _pParent) 121 { 122 OUserAdminDlg* pDlg = new OUserAdminDlg(_pParent, m_pDatasourceItems, m_aContext.getLegacyServiceFactory(),m_aInitialSelection,m_xActiveConnection); 123 return pDlg; 124 } 125 126 //......................................................................... 127 } // namespace dbaui 128 //......................................................................... 129 130