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_DBTYPEWIZDLG_HXX 35 #include "DBTypeWizDlg.hxx" 36 #endif 37 #ifndef DBAUI_DBWIZ_HXX 38 #include "dbwiz.hxx" 39 #endif 40 41 using namespace dbaui; 42 43 extern "C" void SAL_CALL createRegistryInfo_ODBTypeWizDialog() 44 { 45 static OMultiInstanceAutoRegistration< ODBTypeWizDialog > aAutoRegistration; 46 } 47 48 //......................................................................... 49 namespace dbaui 50 { 51 //......................................................................... 52 53 using namespace ::com::sun::star::uno; 54 using namespace ::com::sun::star::lang; 55 using namespace ::com::sun::star::beans; 56 57 //========================================================================= 58 //------------------------------------------------------------------------- 59 ODBTypeWizDialog::ODBTypeWizDialog(const Reference< XMultiServiceFactory >& _rxORB) 60 :ODatabaseAdministrationDialog(_rxORB) 61 { 62 } 63 //------------------------------------------------------------------------- 64 Sequence<sal_Int8> SAL_CALL ODBTypeWizDialog::getImplementationId( ) throw(RuntimeException) 65 { 66 static ::cppu::OImplementationId aId; 67 return aId.getImplementationId(); 68 } 69 70 //------------------------------------------------------------------------- 71 Reference< XInterface > SAL_CALL ODBTypeWizDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) 72 { 73 return *(new ODBTypeWizDialog(_rxFactory)); 74 } 75 76 //------------------------------------------------------------------------- 77 ::rtl::OUString SAL_CALL ODBTypeWizDialog::getImplementationName() throw(RuntimeException) 78 { 79 return getImplementationName_Static(); 80 } 81 82 //------------------------------------------------------------------------- 83 ::rtl::OUString ODBTypeWizDialog::getImplementationName_Static() throw(RuntimeException) 84 { 85 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.ODBTypeWizDialog")); 86 } 87 88 //------------------------------------------------------------------------- 89 ::comphelper::StringSequence SAL_CALL ODBTypeWizDialog::getSupportedServiceNames() throw(RuntimeException) 90 { 91 return getSupportedServiceNames_Static(); 92 } 93 94 //------------------------------------------------------------------------- 95 ::comphelper::StringSequence ODBTypeWizDialog::getSupportedServiceNames_Static() throw(RuntimeException) 96 { 97 ::comphelper::StringSequence aSupported(1); 98 aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DataSourceTypeChangeDialog")); 99 return aSupported; 100 } 101 102 //------------------------------------------------------------------------- 103 Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialog::getPropertySetInfo() throw(RuntimeException) 104 { 105 Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); 106 return xInfo; 107 } 108 109 //------------------------------------------------------------------------- 110 ::cppu::IPropertyArrayHelper& ODBTypeWizDialog::getInfoHelper() 111 { 112 return *const_cast<ODBTypeWizDialog*>(this)->getArrayHelper(); 113 } 114 115 //------------------------------------------------------------------------------ 116 ::cppu::IPropertyArrayHelper* ODBTypeWizDialog::createArrayHelper( ) const 117 { 118 Sequence< Property > aProps; 119 describeProperties(aProps); 120 return new ::cppu::OPropertyArrayHelper(aProps); 121 } 122 //------------------------------------------------------------------------------ 123 Dialog* ODBTypeWizDialog::createDialog(Window* _pParent) 124 { 125 ODbTypeWizDialog* pDlg = new ODbTypeWizDialog(_pParent, m_pDatasourceItems, m_aContext.getLegacyServiceFactory(),m_aInitialSelection); 126 return pDlg; 127 } 128 129 //......................................................................... 130 } // namespace dbaui 131 //......................................................................... 132 133