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 #ifndef DBACCESS_ADVANCEDSETTINGS_HXX
25cdf0e10cSrcweir #define DBACCESS_ADVANCEDSETTINGS_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "adminpages.hxx"
28cdf0e10cSrcweir #include "dsmeta.hxx"
29cdf0e10cSrcweir 
30cdf0e10cSrcweir /** === begin UNO includes === **/
31cdf0e10cSrcweir /** === end UNO includes === **/
32cdf0e10cSrcweir 
33cdf0e10cSrcweir #include <svtools/dialogcontrolling.hxx>
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #include <vcl/lstbox.hxx>
36cdf0e10cSrcweir #include <vcl/field.hxx>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir #include <vector>
39cdf0e10cSrcweir 
40cdf0e10cSrcweir //........................................................................
41cdf0e10cSrcweir namespace dbaui
42cdf0e10cSrcweir {
43cdf0e10cSrcweir //........................................................................
44cdf0e10cSrcweir 
45cdf0e10cSrcweir     struct BooleanSettingDesc;
46cdf0e10cSrcweir     typedef ::std::vector< BooleanSettingDesc > BooleanSettingDescs;
47cdf0e10cSrcweir 
48cdf0e10cSrcweir     //====================================================================
49cdf0e10cSrcweir     //= SpecialSettingsPage
50cdf0e10cSrcweir     //====================================================================
51cdf0e10cSrcweir     /** implements the "Special Settings" page of the advanced database settings
52cdf0e10cSrcweir     */
53cdf0e10cSrcweir     class SpecialSettingsPage : public OGenericAdministrationPage
54cdf0e10cSrcweir     {
55cdf0e10cSrcweir     protected:
56cdf0e10cSrcweir         FixedLine           m_aTopLine;
57cdf0e10cSrcweir         CheckBox*           m_pIsSQL92Check;
58cdf0e10cSrcweir         CheckBox*           m_pAppendTableAlias;
59cdf0e10cSrcweir         CheckBox*           m_pAsBeforeCorrelationName;
60cdf0e10cSrcweir         CheckBox*           m_pEnableOuterJoin;
61cdf0e10cSrcweir         CheckBox*           m_pIgnoreDriverPrivileges;
62cdf0e10cSrcweir         CheckBox*           m_pParameterSubstitution;
63cdf0e10cSrcweir         CheckBox*           m_pSuppressVersionColumn;
64cdf0e10cSrcweir         CheckBox*           m_pCatalog;
65cdf0e10cSrcweir         CheckBox*           m_pSchema;
66cdf0e10cSrcweir         CheckBox*           m_pIndexAppendix;
67cdf0e10cSrcweir         CheckBox*           m_pDosLineEnds;
68cdf0e10cSrcweir         CheckBox*           m_pCheckRequiredFields;
69cdf0e10cSrcweir         CheckBox*			m_pIgnoreCurrency;
70cdf0e10cSrcweir         CheckBox*           m_pEscapeDateTime;
71cdf0e10cSrcweir         CheckBox*           m_pPrimaryKeySupport;
72cdf0e10cSrcweir         CheckBox*           m_pRespectDriverResultSetType;
73cdf0e10cSrcweir 
74cdf0e10cSrcweir         FixedText*          m_pBooleanComparisonModeLabel;
75cdf0e10cSrcweir         ListBox*            m_pBooleanComparisonMode;
76cdf0e10cSrcweir 
77cdf0e10cSrcweir         FixedText*          m_pMaxRowScanLabel;
78cdf0e10cSrcweir         NumericField*       m_pMaxRowScan;
79cdf0e10cSrcweir 
80cdf0e10cSrcweir         ::svt::ControlDependencyManager
81cdf0e10cSrcweir                             m_aControlDependencies;
82cdf0e10cSrcweir 
83cdf0e10cSrcweir         BooleanSettingDescs m_aBooleanSettings;
84cdf0e10cSrcweir 
85cdf0e10cSrcweir         bool                m_bHasBooleanComparisonMode;
86cdf0e10cSrcweir         bool                m_bHasMaxRowScan;
87cdf0e10cSrcweir 
88cdf0e10cSrcweir     public:
89cdf0e10cSrcweir         virtual sal_Bool        FillItemSet ( SfxItemSet& _rCoreAttrs );
90cdf0e10cSrcweir 
91cdf0e10cSrcweir         SpecialSettingsPage(Window* pParent, const SfxItemSet& _rCoreAttrs, const DataSourceMetaData& _rDSMeta );
92cdf0e10cSrcweir 
93cdf0e10cSrcweir     protected:
94cdf0e10cSrcweir         virtual ~SpecialSettingsPage();
95cdf0e10cSrcweir 
96cdf0e10cSrcweir         // OGenericAdministrationPage overridables
97cdf0e10cSrcweir         virtual void implInitControls (const SfxItemSet& _rSet, sal_Bool _bSaveValue );
98cdf0e10cSrcweir 
99cdf0e10cSrcweir         // <method>OGenericAdministrationPage::fillControls</method>
100cdf0e10cSrcweir         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
101cdf0e10cSrcweir 
102cdf0e10cSrcweir         // <method>OGenericAdministrationPage::fillWindows</method>
103cdf0e10cSrcweir         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
104cdf0e10cSrcweir 
105cdf0e10cSrcweir     private:
106cdf0e10cSrcweir         void    impl_initBooleanSettings();
107cdf0e10cSrcweir     };
108cdf0e10cSrcweir 
109cdf0e10cSrcweir     //====================================================================
110cdf0e10cSrcweir     //= GeneratedValuesPage
111cdf0e10cSrcweir     //====================================================================
112cdf0e10cSrcweir     class GeneratedValuesPage : public OGenericAdministrationPage
113cdf0e10cSrcweir     {
114cdf0e10cSrcweir     protected:
115cdf0e10cSrcweir 
116cdf0e10cSrcweir         FixedLine   m_aAutoFixedLine;
117cdf0e10cSrcweir         CheckBox    m_aAutoRetrievingEnabled;
118cdf0e10cSrcweir         FixedText   m_aAutoIncrementLabel;
119cdf0e10cSrcweir         Edit        m_aAutoIncrement;
120cdf0e10cSrcweir         FixedText   m_aAutoRetrievingLabel;
121cdf0e10cSrcweir         Edit        m_aAutoRetrieving;
122cdf0e10cSrcweir 
123cdf0e10cSrcweir         ::svt::ControlDependencyManager
124cdf0e10cSrcweir                     m_aControlDependencies;
125cdf0e10cSrcweir 
126cdf0e10cSrcweir     public:
127cdf0e10cSrcweir         virtual sal_Bool        FillItemSet (SfxItemSet& _rCoreAttrs);
128cdf0e10cSrcweir 
129cdf0e10cSrcweir         GeneratedValuesPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
130cdf0e10cSrcweir     protected:
131cdf0e10cSrcweir 
132cdf0e10cSrcweir             // nControlFlags ist eine Kombination der CBTP_xxx-Konstanten
133cdf0e10cSrcweir         virtual ~GeneratedValuesPage();
134cdf0e10cSrcweir 
135cdf0e10cSrcweir         // must be overloaded by subclasses, but it isn't pure virtual
136cdf0e10cSrcweir         virtual void        implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
137cdf0e10cSrcweir 
138cdf0e10cSrcweir         // <method>OGenericAdministrationPage::fillControls</method>
139cdf0e10cSrcweir         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
140cdf0e10cSrcweir 
141cdf0e10cSrcweir         // <method>OGenericAdministrationPage::fillWindows</method>
142cdf0e10cSrcweir         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
143cdf0e10cSrcweir 
144cdf0e10cSrcweir     private:
145cdf0e10cSrcweir         DECL_LINK( OnCheckBoxClick, CheckBox * );
146cdf0e10cSrcweir     };
147cdf0e10cSrcweir 
148cdf0e10cSrcweir //........................................................................
149cdf0e10cSrcweir } // namespace dbaui
150cdf0e10cSrcweir //........................................................................
151cdf0e10cSrcweir 
152cdf0e10cSrcweir #endif // DBACCESS_ADVANCEDSETTINGS_HXX
153