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 .
22 #include "adminpages.hxx"
28 struct BooleanSettingDesc
;
30 // SpecialSettingsPage
31 // implements the "Special Settings" page of the advanced database settings
32 class SpecialSettingsPage final
: public OGenericAdministrationPage
34 std::unique_ptr
<weld::CheckButton
> m_xIsSQL92Check
;
35 std::unique_ptr
<weld::CheckButton
> m_xAppendTableAlias
;
36 std::unique_ptr
<weld::CheckButton
> m_xAsBeforeCorrelationName
;
37 std::unique_ptr
<weld::CheckButton
> m_xEnableOuterJoin
;
38 std::unique_ptr
<weld::CheckButton
> m_xIgnoreDriverPrivileges
;
39 std::unique_ptr
<weld::CheckButton
> m_xParameterSubstitution
;
40 std::unique_ptr
<weld::CheckButton
> m_xSuppressVersionColumn
;
41 std::unique_ptr
<weld::CheckButton
> m_xCatalog
;
42 std::unique_ptr
<weld::CheckButton
> m_xSchema
;
43 std::unique_ptr
<weld::CheckButton
> m_xIndexAppendix
;
44 std::unique_ptr
<weld::CheckButton
> m_xDosLineEnds
;
45 std::unique_ptr
<weld::CheckButton
> m_xCheckRequiredFields
;
46 std::unique_ptr
<weld::CheckButton
> m_xIgnoreCurrency
;
47 std::unique_ptr
<weld::CheckButton
> m_xEscapeDateTime
;
48 std::unique_ptr
<weld::CheckButton
> m_xPrimaryKeySupport
;
49 std::unique_ptr
<weld::CheckButton
> m_xRespectDriverResultSetType
;
51 std::unique_ptr
<weld::Label
> m_xBooleanComparisonModeLabel
;
52 std::unique_ptr
<weld::ComboBox
> m_xBooleanComparisonMode
;
54 std::unique_ptr
<weld::Label
> m_xMaxRowScanLabel
;
55 std::unique_ptr
<weld::SpinButton
> m_xMaxRowScan
;
57 std::map
<weld::Toggleable
*, TriState
> m_aTriStates
;
59 std::vector
< BooleanSettingDesc
> m_aBooleanSettings
;
61 bool m_bHasBooleanComparisonMode
;
62 bool m_bHasMaxRowScan
;
65 DECL_LINK(OnToggleHdl
, weld::Toggleable
&, void);
66 DECL_LINK(OnTriStateToggleHdl
, weld::Toggleable
&, void);
68 virtual bool FillItemSet ( SfxItemSet
* _rCoreAttrs
) override
;
70 SpecialSettingsPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& _rCoreAttrs
, const DataSourceMetaData
& _rDSMeta
);
71 virtual ~SpecialSettingsPage() override
;
74 // OGenericAdministrationPage overridables
75 virtual void implInitControls (const SfxItemSet
& _rSet
, bool _bSaveValue
) override
;
77 // <method>OGenericAdministrationPage::fillControls</method>
78 virtual void fillControls(std::vector
< std::unique_ptr
<ISaveValueWrapper
> >& _rControlList
) override
;
80 // <method>OGenericAdministrationPage::fillWindows</method>
81 virtual void fillWindows(std::vector
< std::unique_ptr
<ISaveValueWrapper
> >& _rControlList
) override
;
83 DECL_LINK(BooleanComparisonSelectHdl
, weld::ComboBox
&, void);
86 // GeneratedValuesPage
87 class GeneratedValuesPage final
: public OGenericAdministrationPage
89 std::unique_ptr
<weld::CheckButton
> m_xAutoRetrievingEnabled
;
90 std::unique_ptr
<weld::Widget
> m_xGrid
;
91 std::unique_ptr
<weld::Entry
> m_xAutoIncrement
;
92 std::unique_ptr
<weld::Entry
> m_xAutoRetrieving
;
95 virtual bool FillItemSet (SfxItemSet
* _rCoreAttrs
) override
;
97 GeneratedValuesPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& _rCoreAttrs
);
98 virtual ~GeneratedValuesPage() override
;
101 DECL_LINK(OnAutoToggleHdl
, weld::Toggleable
&, void);
103 // subclasses must override this, but it isn't pure virtual
104 virtual void implInitControls(const SfxItemSet
& _rSet
, bool _bSaveValue
) override
;
106 // <method>OGenericAdministrationPage::fillControls</method>
107 virtual void fillControls(std::vector
< std::unique_ptr
<ISaveValueWrapper
> >& _rControlList
) override
;
109 // <method>OGenericAdministrationPage::fillWindows</method>
110 virtual void fillWindows(std::vector
< std::unique_ptr
<ISaveValueWrapper
> >& _rControlList
) override
;
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */