1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir 
29*cdf0e10cSrcweir #ifndef DBAUI_CONNECTIONPAGESETUP_HXX
30*cdf0e10cSrcweir #define DBAUI_CONNECTIONPAGESETUP_HXX
31*cdf0e10cSrcweir #ifndef DBAUI_CONNECTIONHELPER_HXX
32*cdf0e10cSrcweir #include "ConnectionHelper.hxx"
33*cdf0e10cSrcweir #endif
34*cdf0e10cSrcweir 
35*cdf0e10cSrcweir #ifndef _DBAUI_ADMINPAGES_HXX_
36*cdf0e10cSrcweir #include "adminpages.hxx"
37*cdf0e10cSrcweir #endif
38*cdf0e10cSrcweir #ifndef _UCBHELPER_CONTENT_HXX
39*cdf0e10cSrcweir #include <ucbhelper/content.hxx>
40*cdf0e10cSrcweir #endif
41*cdf0e10cSrcweir #ifndef _DBAUI_CURLEDIT_HXX_
42*cdf0e10cSrcweir #include "curledit.hxx"
43*cdf0e10cSrcweir #endif
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir #ifndef _SV_FIELD_HXX
46*cdf0e10cSrcweir #include <vcl/field.hxx>
47*cdf0e10cSrcweir #endif
48*cdf0e10cSrcweir 
49*cdf0e10cSrcweir 
50*cdf0e10cSrcweir //.........................................................................
51*cdf0e10cSrcweir namespace dbaui
52*cdf0e10cSrcweir {
53*cdf0e10cSrcweir //.........................................................................
54*cdf0e10cSrcweir /*	// #106016# --------------
55*cdf0e10cSrcweir 	enum IS_PATH_EXIST
56*cdf0e10cSrcweir 	{
57*cdf0e10cSrcweir 		PATH_NOT_EXIST = 0,
58*cdf0e10cSrcweir 		PATH_EXIST,
59*cdf0e10cSrcweir 		PATH_NOT_KNOWN
60*cdf0e10cSrcweir     };
61*cdf0e10cSrcweir     */
62*cdf0e10cSrcweir 
63*cdf0e10cSrcweir 	class IDatabaseSettingsDialog;
64*cdf0e10cSrcweir 	//=========================================================================
65*cdf0e10cSrcweir 	//= OConnectionTabPageSetup
66*cdf0e10cSrcweir 	//=========================================================================
67*cdf0e10cSrcweir 
68*cdf0e10cSrcweir 	/** implements the connection page of the data source properties dialog.
69*cdf0e10cSrcweir 	*/
70*cdf0e10cSrcweir 	class OConnectionTabPageSetup : public OConnectionHelper
71*cdf0e10cSrcweir 	{
72*cdf0e10cSrcweir 		sal_Bool			m_bUserGrabFocus : 1;
73*cdf0e10cSrcweir 	protected:
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir 		FixedText           m_aFT_HelpText;
76*cdf0e10cSrcweir 
77*cdf0e10cSrcweir 		// called when the test connection button was clicked
78*cdf0e10cSrcweir 		DECL_LINK(OnEditModified,Edit*);
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir 	public:
81*cdf0e10cSrcweir 		static	OGenericAdministrationPage*	CreateDbaseTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
82*cdf0e10cSrcweir         static	OGenericAdministrationPage*	CreateMSAccessTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
83*cdf0e10cSrcweir 		static	OGenericAdministrationPage*	CreateAdabasTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
84*cdf0e10cSrcweir 		static	OGenericAdministrationPage*	CreateADOTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
85*cdf0e10cSrcweir 		static	OGenericAdministrationPage*	CreateODBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
86*cdf0e10cSrcweir 		static	OGenericAdministrationPage*	CreateUserDefinedTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
87*cdf0e10cSrcweir 
88*cdf0e10cSrcweir 
89*cdf0e10cSrcweir         virtual	sal_Bool		FillItemSet	(SfxItemSet& _rCoreAttrs);
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir 		virtual void		implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
92*cdf0e10cSrcweir         virtual sal_Bool    commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
93*cdf0e10cSrcweir 
94*cdf0e10cSrcweir 
95*cdf0e10cSrcweir 		inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(sal_False); }
96*cdf0e10cSrcweir 		inline void disableConnectionURL() { m_aConnectionURL.SetReadOnly(); }
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir 		/** changes the connection URL.
99*cdf0e10cSrcweir 			<p>The new URL must be of the type which is currently selected, only the parts which do not
100*cdf0e10cSrcweir 			affect the type may be changed (compared to the previous URL).</p>
101*cdf0e10cSrcweir 		*/
102*cdf0e10cSrcweir 		void	changeConnectionURL( const String& _rNewDSN );
103*cdf0e10cSrcweir 		String	getConnectionURL( ) const;
104*cdf0e10cSrcweir 
105*cdf0e10cSrcweir 
106*cdf0e10cSrcweir 	protected:
107*cdf0e10cSrcweir 		OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId);
108*cdf0e10cSrcweir         virtual bool checkTestConnection();
109*cdf0e10cSrcweir 			// nControlFlags ist eine Kombination der CBTP_xxx-Konstanten
110*cdf0e10cSrcweir 		virtual ~OConnectionTabPageSetup();
111*cdf0e10cSrcweir 	};
112*cdf0e10cSrcweir 
113*cdf0e10cSrcweir //.........................................................................
114*cdf0e10cSrcweir }	// namespace dbaui
115*cdf0e10cSrcweir //.........................................................................
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir #endif
118