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 #ifndef _DBAUI_TABLESSINGLEDLG_HXX_
25 #define _DBAUI_TABLESSINGLEDLG_HXX_
26 
27 #ifndef _BASEDLGS_HXX
28 #include <sfx2/basedlgs.hxx>
29 #endif
30 #ifndef DBAUI_ITEMSETHELPER_HXX
31 #include "IItemSetHelper.hxx"
32 #endif
33 #ifndef _COMPHELPER_UNO3_HXX_
34 #include <comphelper/uno3.hxx>
35 #endif
36 #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
37 #include <com/sun/star/beans/PropertyValue.hpp>
38 #endif
39 
40 #include <memory>
41 
42 FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
43 FORWARD_DECLARE_INTERFACE(sdbc,XConnection)
44 FORWARD_DECLARE_INTERFACE(lang,XMultiServiceFactory)
45 
46 //.........................................................................
47 namespace dbaui
48 {
49 //.........................................................................
50 class ODbDataSourceAdministrationHelper;
51 	//========================================================================
52 	//= OTableSubscriptionDialog
53 	//========================================================================
54 	class OTableSubscriptionDialog : public SfxSingleTabDialog, public IItemSetHelper
55 	{
56 		::std::auto_ptr<ODbDataSourceAdministrationHelper>	m_pImpl;
57 		sal_Bool m_bStopExecution; // set when the dialog should not be executed
58 
59 		DECL_LINK( OKClickHdl, OKButton* );
60 		SfxItemSet*				m_pOutSet;
61 	public:
62 
63 		OTableSubscriptionDialog(Window* pParent
64 			,SfxItemSet* _pItems
65 			,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
66 			,const ::com::sun::star::uno::Any& _aDataSourceName
67 		);
68 		virtual ~OTableSubscriptionDialog();
69 
70 		// forwards from ODbDataSourceAdministrationHelper
71 		void		successfullyConnected();
72 		sal_Bool	getCurrentSettings(::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rDriverParams);
73 		void		clearPassword();
74 		String		getConnectionURL() const;
75 		::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >	getCurrentDataSource();
endExecution()76 		inline void endExecution() { m_bStopExecution = sal_True; }
77 
78 		virtual const SfxItemSet* getOutputSet() const;
79 		virtual SfxItemSet* getWriteOutputSet();
80 
81 		virtual short	Execute();
82 	};
83 
84 //.........................................................................
85 }	// namespace dbaui
86 //.........................................................................
87 
88 #endif // _DBAUI_TABLESSINGLEDLG_HXX_
89 
90