1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #ifndef DBAUI_CONNECTIONPAGESETUP_HXX
22 #define DBAUI_CONNECTIONPAGESETUP_HXX
23 #include "ConnectionHelper.hxx"
25 #include "adminpages.hxx"
26 #include <ucbhelper/content.hxx>
27 #include "curledit.hxx"
29 #include <vcl/field.hxx>
32 //.........................................................................
35 //.........................................................................
37 //=========================================================================
38 //= OConnectionTabPageSetup
39 //=========================================================================
41 /** implements the connection page of the data source properties dialog.
43 class OConnectionTabPageSetup
: public OConnectionHelper
45 sal_Bool m_bUserGrabFocus
: 1;
48 FixedText m_aFT_HelpText
;
50 // called when the test connection button was clicked
51 DECL_LINK(OnEditModified
,Edit
*);
54 static OGenericAdministrationPage
* CreateDbaseTabPage( Window
* pParent
, const SfxItemSet
& _rAttrSet
);
55 static OGenericAdministrationPage
* CreateMSAccessTabPage( Window
* pParent
, const SfxItemSet
& _rAttrSet
);
56 static OGenericAdministrationPage
* CreateADOTabPage( Window
* pParent
, const SfxItemSet
& _rAttrSet
);
57 static OGenericAdministrationPage
* CreateODBCTabPage( Window
* pParent
, const SfxItemSet
& _rAttrSet
);
58 static OGenericAdministrationPage
* CreateUserDefinedTabPage( Window
* pParent
, const SfxItemSet
& _rAttrSet
);
61 virtual sal_Bool
FillItemSet (SfxItemSet
& _rCoreAttrs
);
63 virtual void implInitControls(const SfxItemSet
& _rSet
, sal_Bool _bSaveValue
);
64 virtual sal_Bool
commitPage( ::svt::WizardTypes::CommitPageReason _eReason
);
67 inline void enableConnectionURL() { m_aConnectionURL
.SetReadOnly(sal_False
); }
68 inline void disableConnectionURL() { m_aConnectionURL
.SetReadOnly(); }
70 /** changes the connection URL.
71 <p>The new URL must be of the type which is currently selected, only the parts which do not
72 affect the type may be changed (compared to the previous URL).</p>
74 void changeConnectionURL( const String
& _rNewDSN
);
75 String
getConnectionURL( ) const;
79 OConnectionTabPageSetup(Window
* pParent
, sal_uInt16 _rId
, const SfxItemSet
& _rCoreAttrs
, sal_uInt16 _nHelpTextResId
, sal_uInt16 _nHeaderResId
, sal_uInt16 _nUrlResId
);
80 virtual bool checkTestConnection();
81 // nControlFlags ist eine Kombination der CBTP_xxx-Konstanten
82 virtual ~OConnectionTabPageSetup();
85 //.........................................................................
87 //.........................................................................
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */