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