Version 3.6.0.2, tag libreoffice-3.6.0.2
[LibreOffice.git] / dbaccess / source / ui / uno / DBTypeWizDlg.cxx
blob0afdcf93932c46b01012359bf3f7203542b173be
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 "DBTypeWizDlg.hxx"
32 #include "dbwiz.hxx"
34 using namespace dbaui;
36 extern "C" void SAL_CALL createRegistryInfo_ODBTypeWizDialog()
38 static OMultiInstanceAutoRegistration< ODBTypeWizDialog > aAutoRegistration;
41 //.........................................................................
42 namespace dbaui
44 //.........................................................................
46 using namespace ::com::sun::star::uno;
47 using namespace ::com::sun::star::lang;
48 using namespace ::com::sun::star::beans;
50 //=========================================================================
51 //-------------------------------------------------------------------------
52 ODBTypeWizDialog::ODBTypeWizDialog(const Reference< XMultiServiceFactory >& _rxORB)
53 :ODatabaseAdministrationDialog(_rxORB)
56 //-------------------------------------------------------------------------
57 Sequence<sal_Int8> SAL_CALL ODBTypeWizDialog::getImplementationId( ) throw(RuntimeException)
59 static ::cppu::OImplementationId aId;
60 return aId.getImplementationId();
63 //-------------------------------------------------------------------------
64 Reference< XInterface > SAL_CALL ODBTypeWizDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
66 return *(new ODBTypeWizDialog(_rxFactory));
69 //-------------------------------------------------------------------------
70 ::rtl::OUString SAL_CALL ODBTypeWizDialog::getImplementationName() throw(RuntimeException)
72 return getImplementationName_Static();
75 //-------------------------------------------------------------------------
76 ::rtl::OUString ODBTypeWizDialog::getImplementationName_Static() throw(RuntimeException)
78 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.ODBTypeWizDialog"));
81 //-------------------------------------------------------------------------
82 ::comphelper::StringSequence SAL_CALL ODBTypeWizDialog::getSupportedServiceNames() throw(RuntimeException)
84 return getSupportedServiceNames_Static();
87 //-------------------------------------------------------------------------
88 ::comphelper::StringSequence ODBTypeWizDialog::getSupportedServiceNames_Static() throw(RuntimeException)
90 ::comphelper::StringSequence aSupported(1);
91 aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DataSourceTypeChangeDialog"));
92 return aSupported;
95 //-------------------------------------------------------------------------
96 Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialog::getPropertySetInfo() throw(RuntimeException)
98 Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
99 return xInfo;
102 //-------------------------------------------------------------------------
103 ::cppu::IPropertyArrayHelper& ODBTypeWizDialog::getInfoHelper()
105 return *const_cast<ODBTypeWizDialog*>(this)->getArrayHelper();
108 //------------------------------------------------------------------------------
109 ::cppu::IPropertyArrayHelper* ODBTypeWizDialog::createArrayHelper( ) const
111 Sequence< Property > aProps;
112 describeProperties(aProps);
113 return new ::cppu::OPropertyArrayHelper(aProps);
115 //------------------------------------------------------------------------------
116 Dialog* ODBTypeWizDialog::createDialog(Window* _pParent)
118 ODbTypeWizDialog* pDlg = new ODbTypeWizDialog(_pParent, m_pDatasourceItems, m_aContext.getLegacyServiceFactory(),m_aInitialSelection);
119 return pDlg;
122 //.........................................................................
123 } // namespace dbaui
124 //.........................................................................
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */