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