1*2e2212a7SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*2e2212a7SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*2e2212a7SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*2e2212a7SAndrew Rist  * distributed with this work for additional information
6*2e2212a7SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*2e2212a7SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*2e2212a7SAndrew Rist  * "License"); you may not use this file except in compliance
9*2e2212a7SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*2e2212a7SAndrew Rist  *
11*2e2212a7SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*2e2212a7SAndrew Rist  *
13*2e2212a7SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*2e2212a7SAndrew Rist  * software distributed under the License is distributed on an
15*2e2212a7SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2e2212a7SAndrew Rist  * KIND, either express or implied.  See the License for the
17*2e2212a7SAndrew Rist  * specific language governing permissions and limitations
18*2e2212a7SAndrew Rist  * under the License.
19*2e2212a7SAndrew Rist  *
20*2e2212a7SAndrew Rist  *************************************************************/
21*2e2212a7SAndrew Rist 
22*2e2212a7SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #ifndef DBAUI_CONNECTIONPAGESETUP_HXX
26cdf0e10cSrcweir #define DBAUI_CONNECTIONPAGESETUP_HXX
27cdf0e10cSrcweir #ifndef DBAUI_CONNECTIONHELPER_HXX
28cdf0e10cSrcweir #include "ConnectionHelper.hxx"
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #ifndef _DBAUI_ADMINPAGES_HXX_
32cdf0e10cSrcweir #include "adminpages.hxx"
33cdf0e10cSrcweir #endif
34cdf0e10cSrcweir #ifndef _UCBHELPER_CONTENT_HXX
35cdf0e10cSrcweir #include <ucbhelper/content.hxx>
36cdf0e10cSrcweir #endif
37cdf0e10cSrcweir #ifndef _DBAUI_CURLEDIT_HXX_
38cdf0e10cSrcweir #include "curledit.hxx"
39cdf0e10cSrcweir #endif
40cdf0e10cSrcweir 
41cdf0e10cSrcweir #ifndef _SV_FIELD_HXX
42cdf0e10cSrcweir #include <vcl/field.hxx>
43cdf0e10cSrcweir #endif
44cdf0e10cSrcweir 
45cdf0e10cSrcweir 
46cdf0e10cSrcweir //.........................................................................
47cdf0e10cSrcweir namespace dbaui
48cdf0e10cSrcweir {
49cdf0e10cSrcweir //.........................................................................
50cdf0e10cSrcweir /*	// #106016# --------------
51cdf0e10cSrcweir 	enum IS_PATH_EXIST
52cdf0e10cSrcweir 	{
53cdf0e10cSrcweir 		PATH_NOT_EXIST = 0,
54cdf0e10cSrcweir 		PATH_EXIST,
55cdf0e10cSrcweir 		PATH_NOT_KNOWN
56cdf0e10cSrcweir     };
57cdf0e10cSrcweir     */
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 	class IDatabaseSettingsDialog;
60cdf0e10cSrcweir 	//=========================================================================
61cdf0e10cSrcweir 	//= OConnectionTabPageSetup
62cdf0e10cSrcweir 	//=========================================================================
63cdf0e10cSrcweir 
64cdf0e10cSrcweir 	/** implements the connection page of the data source properties dialog.
65cdf0e10cSrcweir 	*/
66cdf0e10cSrcweir 	class OConnectionTabPageSetup : public OConnectionHelper
67cdf0e10cSrcweir 	{
68cdf0e10cSrcweir 		sal_Bool			m_bUserGrabFocus : 1;
69cdf0e10cSrcweir 	protected:
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 		FixedText           m_aFT_HelpText;
72cdf0e10cSrcweir 
73cdf0e10cSrcweir 		// called when the test connection button was clicked
74cdf0e10cSrcweir 		DECL_LINK(OnEditModified,Edit*);
75cdf0e10cSrcweir 
76cdf0e10cSrcweir 	public:
77cdf0e10cSrcweir 		static	OGenericAdministrationPage*	CreateDbaseTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
78cdf0e10cSrcweir         static	OGenericAdministrationPage*	CreateMSAccessTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
79cdf0e10cSrcweir 		static	OGenericAdministrationPage*	CreateAdabasTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
80cdf0e10cSrcweir 		static	OGenericAdministrationPage*	CreateADOTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
81cdf0e10cSrcweir 		static	OGenericAdministrationPage*	CreateODBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
82cdf0e10cSrcweir 		static	OGenericAdministrationPage*	CreateUserDefinedTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
83cdf0e10cSrcweir 
84cdf0e10cSrcweir 
85cdf0e10cSrcweir         virtual	sal_Bool		FillItemSet	(SfxItemSet& _rCoreAttrs);
86cdf0e10cSrcweir 
87cdf0e10cSrcweir 		virtual void		implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
88cdf0e10cSrcweir         virtual sal_Bool    commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
89cdf0e10cSrcweir 
90cdf0e10cSrcweir 
enableConnectionURL()91cdf0e10cSrcweir 		inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(sal_False); }
disableConnectionURL()92cdf0e10cSrcweir 		inline void disableConnectionURL() { m_aConnectionURL.SetReadOnly(); }
93cdf0e10cSrcweir 
94cdf0e10cSrcweir 		/** changes the connection URL.
95cdf0e10cSrcweir 			<p>The new URL must be of the type which is currently selected, only the parts which do not
96cdf0e10cSrcweir 			affect the type may be changed (compared to the previous URL).</p>
97cdf0e10cSrcweir 		*/
98cdf0e10cSrcweir 		void	changeConnectionURL( const String& _rNewDSN );
99cdf0e10cSrcweir 		String	getConnectionURL( ) const;
100cdf0e10cSrcweir 
101cdf0e10cSrcweir 
102cdf0e10cSrcweir 	protected:
103cdf0e10cSrcweir 		OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId);
104cdf0e10cSrcweir         virtual bool checkTestConnection();
105cdf0e10cSrcweir 			// nControlFlags ist eine Kombination der CBTP_xxx-Konstanten
106cdf0e10cSrcweir 		virtual ~OConnectionTabPageSetup();
107cdf0e10cSrcweir 	};
108cdf0e10cSrcweir 
109cdf0e10cSrcweir //.........................................................................
110cdf0e10cSrcweir }	// namespace dbaui
111cdf0e10cSrcweir //.........................................................................
112cdf0e10cSrcweir 
113cdf0e10cSrcweir #endif
114