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