merge the formfield patch from ooo-build
[ooovba.git] / dbaccess / source / ui / uno / DBTypeWizDlg.cxx
blob627f342293426f03f35ff7e684bc09ab302dbeea
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: DBTypeWizDlg.cxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_dbaccess.hxx"
34 #ifndef _DBU_REGHELPER_HXX_
35 #include "dbu_reghelper.hxx"
36 #endif
37 #ifndef DBAUI_DBTYPEWIZDLG_HXX
38 #include "DBTypeWizDlg.hxx"
39 #endif
40 #ifndef DBAUI_DBWIZ_HXX
41 #include "dbwiz.hxx"
42 #endif
44 using namespace dbaui;
46 extern "C" void SAL_CALL createRegistryInfo_ODBTypeWizDialog()
48 static OMultiInstanceAutoRegistration< ODBTypeWizDialog > aAutoRegistration;
51 //.........................................................................
52 namespace dbaui
54 //.........................................................................
56 using namespace ::com::sun::star::uno;
57 using namespace ::com::sun::star::lang;
58 using namespace ::com::sun::star::beans;
60 //=========================================================================
61 //-------------------------------------------------------------------------
62 ODBTypeWizDialog::ODBTypeWizDialog(const Reference< XMultiServiceFactory >& _rxORB)
63 :ODatabaseAdministrationDialog(_rxORB)
66 //-------------------------------------------------------------------------
67 Sequence<sal_Int8> SAL_CALL ODBTypeWizDialog::getImplementationId( ) throw(RuntimeException)
69 static ::cppu::OImplementationId aId;
70 return aId.getImplementationId();
73 //-------------------------------------------------------------------------
74 Reference< XInterface > SAL_CALL ODBTypeWizDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
76 return *(new ODBTypeWizDialog(_rxFactory));
79 //-------------------------------------------------------------------------
80 ::rtl::OUString SAL_CALL ODBTypeWizDialog::getImplementationName() throw(RuntimeException)
82 return getImplementationName_Static();
85 //-------------------------------------------------------------------------
86 ::rtl::OUString ODBTypeWizDialog::getImplementationName_Static() throw(RuntimeException)
88 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.ODBTypeWizDialog"));
91 //-------------------------------------------------------------------------
92 ::comphelper::StringSequence SAL_CALL ODBTypeWizDialog::getSupportedServiceNames() throw(RuntimeException)
94 return getSupportedServiceNames_Static();
97 //-------------------------------------------------------------------------
98 ::comphelper::StringSequence ODBTypeWizDialog::getSupportedServiceNames_Static() throw(RuntimeException)
100 ::comphelper::StringSequence aSupported(1);
101 aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DataSourceTypeChangeDialog"));
102 return aSupported;
105 //-------------------------------------------------------------------------
106 Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialog::getPropertySetInfo() throw(RuntimeException)
108 Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
109 return xInfo;
112 //-------------------------------------------------------------------------
113 ::cppu::IPropertyArrayHelper& ODBTypeWizDialog::getInfoHelper()
115 return *const_cast<ODBTypeWizDialog*>(this)->getArrayHelper();
118 //------------------------------------------------------------------------------
119 ::cppu::IPropertyArrayHelper* ODBTypeWizDialog::createArrayHelper( ) const
121 Sequence< Property > aProps;
122 describeProperties(aProps);
123 return new ::cppu::OPropertyArrayHelper(aProps);
125 //------------------------------------------------------------------------------
126 Dialog* ODBTypeWizDialog::createDialog(Window* _pParent)
128 ODbTypeWizDialog* pDlg = new ODbTypeWizDialog(_pParent, m_pDatasourceItems, m_aContext.getLegacyServiceFactory(),m_aInitialSelection);
129 return pDlg;
132 //.........................................................................
133 } // namespace dbaui
134 //.........................................................................