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