LibreOffice Module dbaccess (master) 1
advancedsettings.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include "adminpages.hxx"
23#include <dsmeta.hxx>
24#include <vector>
25
26namespace dbaui
27{
28 struct BooleanSettingDesc;
29
30 // SpecialSettingsPage
31 // implements the "Special Settings" page of the advanced database settings
33 {
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;
50
51 std::unique_ptr<weld::Label> m_xBooleanComparisonModeLabel;
52 std::unique_ptr<weld::ComboBox> m_xBooleanComparisonMode;
53
54 std::unique_ptr<weld::Label> m_xMaxRowScanLabel;
55 std::unique_ptr<weld::SpinButton> m_xMaxRowScan;
56
57 std::map<weld::Toggleable*, TriState> m_aTriStates;
58
59 std::vector< BooleanSettingDesc > m_aBooleanSettings;
60
63
64 public:
65 DECL_LINK(OnToggleHdl, weld::Toggleable&, void);
66 DECL_LINK(OnTriStateToggleHdl, weld::Toggleable&, void);
67
68 virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override;
69
70 SpecialSettingsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs, const DataSourceMetaData& _rDSMeta);
71 virtual ~SpecialSettingsPage() override;
72
73 private:
74 // OGenericAdministrationPage overridables
75 virtual void implInitControls (const SfxItemSet& _rSet, bool _bSaveValue ) override;
76
77 // <method>OGenericAdministrationPage::fillControls</method>
78 virtual void fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override;
79
80 // <method>OGenericAdministrationPage::fillWindows</method>
81 virtual void fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override;
82
83 DECL_LINK(BooleanComparisonSelectHdl, weld::ComboBox&, void);
84 };
85
86 // GeneratedValuesPage
88 {
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;
93
94 public:
95 virtual bool FillItemSet (SfxItemSet* _rCoreAttrs) override;
96
97 GeneratedValuesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs);
98 virtual ~GeneratedValuesPage() override;
99
100 private:
101 DECL_LINK(OnAutoToggleHdl, weld::Toggleable&, void);
102
103 // subclasses must override this, but it isn't pure virtual
104 virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) override;
105
106 // <method>OGenericAdministrationPage::fillControls</method>
107 virtual void fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override;
108
109 // <method>OGenericAdministrationPage::fillWindows</method>
110 virtual void fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override;
111 };
112}
113
114/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
encapsulates meta data for a data source
Definition: dsmeta.hxx:55
virtual void implInitControls(const SfxItemSet &_rSet, bool _bSaveValue) override
called from within Reset and ActivatePage, use to initialize the controls with the items from the giv...
virtual bool FillItemSet(SfxItemSet *_rCoreAttrs) override
std::unique_ptr< weld::Entry > m_xAutoIncrement
virtual void fillControls(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to save the value if necessary
std::unique_ptr< weld::CheckButton > m_xAutoRetrievingEnabled
virtual void fillWindows(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to disable if necessary
std::unique_ptr< weld::Widget > m_xGrid
GeneratedValuesPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &_rCoreAttrs)
DECL_LINK(OnAutoToggleHdl, weld::Toggleable &, void)
std::unique_ptr< weld::Entry > m_xAutoRetrieving
virtual ~GeneratedValuesPage() override
std::unique_ptr< weld::CheckButton > m_xIgnoreDriverPrivileges
std::unique_ptr< weld::CheckButton > m_xAppendTableAlias
std::map< weld::Toggleable *, TriState > m_aTriStates
std::unique_ptr< weld::CheckButton > m_xAsBeforeCorrelationName
std::unique_ptr< weld::CheckButton > m_xSuppressVersionColumn
std::vector< BooleanSettingDesc > m_aBooleanSettings
virtual bool FillItemSet(SfxItemSet *_rCoreAttrs) override
std::unique_ptr< weld::CheckButton > m_xEscapeDateTime
std::unique_ptr< weld::CheckButton > m_xEnableOuterJoin
std::unique_ptr< weld::CheckButton > m_xIsSQL92Check
std::unique_ptr< weld::SpinButton > m_xMaxRowScan
std::unique_ptr< weld::CheckButton > m_xDosLineEnds
std::unique_ptr< weld::CheckButton > m_xIgnoreCurrency
std::unique_ptr< weld::Label > m_xMaxRowScanLabel
DECL_LINK(OnToggleHdl, weld::Toggleable &, void)
virtual ~SpecialSettingsPage() override
std::unique_ptr< weld::CheckButton > m_xRespectDriverResultSetType
std::unique_ptr< weld::ComboBox > m_xBooleanComparisonMode
std::unique_ptr< weld::CheckButton > m_xParameterSubstitution
std::unique_ptr< weld::CheckButton > m_xIndexAppendix
std::unique_ptr< weld::CheckButton > m_xCatalog
std::unique_ptr< weld::Label > m_xBooleanComparisonModeLabel
std::unique_ptr< weld::CheckButton > m_xCheckRequiredFields
virtual void fillControls(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to save the value if necessary
DECL_LINK(BooleanComparisonSelectHdl, weld::ComboBox &, void)
virtual void fillWindows(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to disable if necessary
virtual void implInitControls(const SfxItemSet &_rSet, bool _bSaveValue) override
called from within Reset and ActivatePage, use to initialize the controls with the items from the giv...
DECL_LINK(OnTriStateToggleHdl, weld::Toggleable &, void)
std::unique_ptr< weld::CheckButton > m_xSchema
std::unique_ptr< weld::CheckButton > m_xPrimaryKeySupport
SpecialSettingsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &_rCoreAttrs, const DataSourceMetaData &_rDSMeta)