LibreOffice Module cui (master)  1
optgdlg.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 #pragma once
20 #include <memory>
21 #include <sfx2/tabdlg.hxx>
22 #include <svx/langbox.hxx>
23 
24 class CanvasSettings;
25 
26 namespace vcl {
27  class IconThemeInfo;
28 }
29 
30 class OfaMiscTabPage : public SfxTabPage
31 {
32 private:
33  OUString m_aStrDateInfo;
34 
35  std::unique_ptr<weld::CheckButton> m_xExtHelpCB;
36  std::unique_ptr<weld::CheckButton> m_xPopUpNoHelpCB;
37  std::unique_ptr<weld::CheckButton> m_xShowTipOfTheDay;
38  std::unique_ptr<weld::Widget> m_xFileDlgFrame;
39  std::unique_ptr<weld::Widget> m_xFileDlgROImage;
40  std::unique_ptr<weld::CheckButton> m_xFileDlgCB;
41  std::unique_ptr<weld::CheckButton> m_xPrintDlgCB;
42  std::unique_ptr<weld::CheckButton> m_xDocStatusCB;
43  std::unique_ptr<weld::Widget> m_xYearFrame;
44  std::unique_ptr<weld::SpinButton> m_xYearValueField;
45  std::unique_ptr<weld::Label> m_xToYearFT;
46  std::unique_ptr<weld::CheckButton> m_xCrashReport;
47  std::unique_ptr<weld::Widget> m_xQuickStarterFrame;
48  std::unique_ptr<weld::Label> m_xHelpImproveLabel;
49  std::unique_ptr<weld::CheckButton> m_xQuickLaunchCB;
50 #if defined(_WIN32)
51  std::unique_ptr<weld::Widget> m_xFileAssocFrame;
52  std::unique_ptr<weld::Button> m_xFileAssocBtn;
53  std::unique_ptr<weld::CheckButton> m_xPerformFileExtCheck;
54 #endif
55 
56  DECL_LINK(TwoFigureHdl, weld::SpinButton&, void);
57 #if defined(_WIN32)
58  DECL_STATIC_LINK(OfaMiscTabPage, FileAssocClick, weld::Button&, void);
59 #endif
60 protected:
61  virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
62 
63 public:
64  OfaMiscTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
65  virtual ~OfaMiscTabPage() override;
66 
67  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
68 
69  virtual bool FillItemSet( SfxItemSet* rSet ) override;
70  virtual void Reset( const SfxItemSet* rSet ) override;
71 };
72 
74 
75 class OfaViewTabPage : public SfxTabPage
76 {
77 private:
82 
83  std::unique_ptr<SvtTabAppearanceCfg> pAppearanceCfg;
84  std::unique_ptr<CanvasSettings> pCanvasSettings;
85 
86  std::vector<vcl::IconThemeInfo> mInstalledIconThemes;
87 
88  std::unique_ptr<weld::ComboBox> m_xIconSizeLB;
89  std::unique_ptr<weld::ComboBox> m_xSidebarIconSizeLB;
90  std::unique_ptr<weld::ComboBox> m_xNotebookbarIconSizeLB;
91  std::unique_ptr<weld::ComboBox> m_xIconStyleLB;
92 
93  std::unique_ptr<weld::CheckButton> m_xFontAntiAliasing;
94  std::unique_ptr<weld::Label> m_xAAPointLimitLabel;
95  std::unique_ptr<weld::MetricSpinButton> m_xAAPointLimit;
96 
97  std::unique_ptr<weld::Widget> m_xMenuIconBox;
98  std::unique_ptr<weld::ComboBox> m_xMenuIconsLB;
99 
100  std::unique_ptr<weld::ComboBox> m_xContextMenuShortcutsLB;
101 
102  std::unique_ptr<weld::CheckButton> m_xFontShowCB;
103 
104  std::unique_ptr<weld::CheckButton> m_xUseHardwareAccell;
105  std::unique_ptr<weld::CheckButton> m_xUseAntiAliase;
106  std::unique_ptr<weld::CheckButton> m_xUseSkia;
107  std::unique_ptr<weld::CheckButton> m_xForceSkiaRaster;
108 
109  std::unique_ptr<weld::Label> m_xSkiaStatusEnabled;
110  std::unique_ptr<weld::Label> m_xSkiaStatusDisabled;
111 
112  std::unique_ptr<weld::ComboBox> m_xMousePosLB;
113  std::unique_ptr<weld::ComboBox> m_xMouseMiddleLB;
114  std::unique_ptr<weld::Button> m_xMoreIcons;
115  std::unique_ptr<weld::Button> m_xRunGPTests;
116 
117  DECL_LINK(OnAntialiasingToggled, weld::Toggleable&, void);
118  DECL_LINK(OnUseSkiaToggled, weld::Toggleable&, void);
119  DECL_STATIC_LINK(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void);
120  DECL_LINK(OnRunGPTestClick, weld::Button&, void);
121  void UpdateSkiaStatus();
122  void HideSkiaWidgets();
124 
125 public:
126  OfaViewTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
127  virtual ~OfaViewTabPage() override;
128 
129  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
130 
131  virtual bool FillItemSet( SfxItemSet* rSet ) override;
132  virtual void Reset( const SfxItemSet* rSet ) override;
133 };
134 
135 struct LanguageConfig_Impl;
136 
138 {
140  bool m_bOldCtl;
141  std::unique_ptr<LanguageConfig_Impl> pLangConfig;
142 
146 
148 
149  std::unique_ptr<weld::ComboBox> m_xUserInterfaceLB;
150  std::unique_ptr<weld::Label> m_xLocaleSettingFT;
151  std::unique_ptr<SvxLanguageBox> m_xLocaleSettingLB;
152  std::unique_ptr<weld::CheckButton> m_xDecimalSeparatorCB;
153  std::unique_ptr<weld::Label> m_xCurrencyFT;
154  std::unique_ptr<weld::ComboBox> m_xCurrencyLB;
155  std::unique_ptr<weld::Label> m_xDatePatternsFT;
156  std::unique_ptr<weld::Entry> m_xDatePatternsED;
157 
158  std::unique_ptr<SvxLanguageBox> m_xWesternLanguageLB;
159  std::unique_ptr<weld::Label> m_xWesternLanguageFT;
160  std::unique_ptr<SvxLanguageBox> m_xAsianLanguageLB;
161  std::unique_ptr<SvxLanguageBox> m_xComplexLanguageLB;
162  std::unique_ptr<weld::CheckButton> m_xCurrentDocCB;
163  std::unique_ptr<weld::CheckButton> m_xAsianSupportCB;
164  std::unique_ptr<weld::CheckButton> m_xCTLSupportCB;
165  std::unique_ptr<weld::CheckButton> m_xIgnoreLanguageChangeCB;
166 
167  DECL_LINK(SupportHdl, weld::Toggleable&, void);
168  DECL_LINK(LocaleSettingHdl, weld::ComboBox&, void);
169  DECL_LINK(DatePatternsHdl, weld::Entry&, void);
170 
171 public:
172  OfaLanguagesTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
173  virtual ~OfaLanguagesTabPage() override;
174 
175  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
176 
177  virtual bool FillItemSet( SfxItemSet* rSet ) override;
178  virtual void Reset( const SfxItemSet* rSet ) override;
179 };
180 
181 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< SvxLanguageBox > m_xComplexLanguageLB
Definition: optgdlg.hxx:161
OfaMiscTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optgdlg.cxx:153
void HideSkiaWidgets()
Definition: optgdlg.cxx:616
std::unique_ptr< weld::ComboBox > m_xIconStyleLB
Definition: optgdlg.hxx:91
std::unique_ptr< weld::Widget > m_xFileDlgROImage
Definition: optgdlg.hxx:39
const SfxItemSet * pSet
std::unique_ptr< weld::SpinButton > m_xYearValueField
Definition: optgdlg.hxx:44
std::unique_ptr< weld::ComboBox > m_xIconSizeLB
Definition: optgdlg.hxx:88
std::unique_ptr< weld::ComboBox > m_xMenuIconsLB
Definition: optgdlg.hxx:98
std::unique_ptr< weld::Widget > m_xQuickStarterFrame
Definition: optgdlg.hxx:47
std::unique_ptr< SvxLanguageBox > m_xLocaleSettingLB
Definition: optgdlg.hxx:151
std::unique_ptr< weld::ComboBox > m_xNotebookbarIconSizeLB
Definition: optgdlg.hxx:90
DECL_LINK(TwoFigureHdl, weld::SpinButton &, void)
std::unique_ptr< weld::ComboBox > m_xSidebarIconSizeLB
Definition: optgdlg.hxx:89
sal_Int32 nStyleLB_InitialSelection
Definition: optgdlg.hxx:81
std::unique_ptr< weld::Label > m_xAAPointLimitLabel
Definition: optgdlg.hxx:94
std::unique_ptr< weld::CheckButton > m_xExtHelpCB
Definition: optgdlg.hxx:35
virtual ~OfaLanguagesTabPage() override
Definition: optgdlg.cxx:1209
std::unique_ptr< weld::CheckButton > m_xFileDlgCB
Definition: optgdlg.hxx:40
std::unique_ptr< weld::MetricSpinButton > m_xAAPointLimit
Definition: optgdlg.hxx:95
std::unique_ptr< weld::CheckButton > m_xFontAntiAliasing
Definition: optgdlg.hxx:93
std::unique_ptr< weld::Label > m_xCurrencyFT
Definition: optgdlg.hxx:153
std::unique_ptr< weld::Label > m_xHelpImproveLabel
Definition: optgdlg.hxx:48
std::unique_ptr< weld::Label > m_xLocaleSettingFT
Definition: optgdlg.hxx:150
std::unique_ptr< weld::CheckButton > m_xIgnoreLanguageChangeCB
Definition: optgdlg.hxx:165
std::unique_ptr< weld::ComboBox > m_xMousePosLB
Definition: optgdlg.hxx:112
OUString m_aStrDateInfo
Definition: optgdlg.hxx:33
OfaViewTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optgdlg.cxx:519
std::unique_ptr< weld::Widget > m_xYearFrame
Definition: optgdlg.hxx:43
std::unique_ptr< weld::Label > m_xSkiaStatusDisabled
Definition: optgdlg.hxx:110
std::unique_ptr< weld::Button > m_xMoreIcons
Definition: optgdlg.hxx:114
std::unique_ptr< weld::CheckButton > m_xCurrentDocCB
Definition: optgdlg.hxx:162
std::unique_ptr< weld::ComboBox > m_xCurrencyLB
Definition: optgdlg.hxx:154
std::unique_ptr< weld::CheckButton > m_xForceSkiaRaster
Definition: optgdlg.hxx:107
std::unique_ptr< weld::Label > m_xWesternLanguageFT
Definition: optgdlg.hxx:159
DECL_STATIC_LINK(OfaViewTabPage, OnMoreIconsClick, weld::Button &, void)
std::unique_ptr< weld::Label > m_xToYearFT
Definition: optgdlg.hxx:45
std::unique_ptr< weld::CheckButton > m_xQuickLaunchCB
Definition: optgdlg.hxx:49
std::unique_ptr< weld::ComboBox > m_xMouseMiddleLB
Definition: optgdlg.hxx:113
std::unique_ptr< weld::CheckButton > m_xCrashReport
Definition: optgdlg.hxx:46
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optgdlg.cxx:1213
std::unique_ptr< SvxLanguageBox > m_xAsianLanguageLB
Definition: optgdlg.hxx:160
std::unique_ptr< weld::ComboBox > m_xContextMenuShortcutsLB
Definition: optgdlg.hxx:100
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: optgdlg.cxx:101
void UpdateHardwareAccelStatus()
Definition: optgdlg.cxx:974
std::unique_ptr< weld::Label > m_xDatePatternsFT
Definition: optgdlg.hxx:155
DECL_LINK(OnAntialiasingToggled, weld::Toggleable &, void)
std::unique_ptr< SvtTabAppearanceCfg > pAppearanceCfg
Definition: optgdlg.hxx:83
std::unique_ptr< weld::CheckButton > m_xUseHardwareAccell
Definition: optgdlg.hxx:104
OUString m_sSystemDefaultString
Definition: optgdlg.hxx:144
std::unique_ptr< weld::Label > m_xSkiaStatusEnabled
Definition: optgdlg.hxx:109
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optgdlg.cxx:217
sal_Int32 nNotebookbarSizeLB_InitialSelection
Definition: optgdlg.hxx:80
std::unique_ptr< weld::CheckButton > m_xUseAntiAliase
Definition: optgdlg.hxx:105
OUString m_sDecimalSeparatorLabel
Definition: optgdlg.hxx:145
void UpdateSkiaStatus()
Definition: optgdlg.cxx:624
std::unique_ptr< weld::Button > m_xRunGPTests
Definition: optgdlg.hxx:115
std::unique_ptr< CanvasSettings > pCanvasSettings
Definition: optgdlg.hxx:84
std::unique_ptr< weld::CheckButton > m_xDocStatusCB
Definition: optgdlg.hxx:42
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optgdlg.cxx:667
std::unique_ptr< weld::CheckButton > m_xPrintDlgCB
Definition: optgdlg.hxx:41
DECL_LINK(SupportHdl, weld::Toggleable &, void)
OfaLanguagesTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optgdlg.cxx:1035
virtual void Reset(const SfxItemSet *rSet) override
Definition: optgdlg.cxx:872
std::unique_ptr< LanguageConfig_Impl > pLangConfig
Definition: optgdlg.hxx:141
std::unique_ptr< weld::Widget > m_xFileDlgFrame
Definition: optgdlg.hxx:38
std::unique_ptr< weld::ComboBox > m_xUserInterfaceLB
Definition: optgdlg.hxx:149
std::unique_ptr< weld::CheckButton > m_xDecimalSeparatorCB
Definition: optgdlg.hxx:152
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optgdlg.cxx:1236
std::unique_ptr< weld::Entry > m_xDatePatternsED
Definition: optgdlg.hxx:156
std::unique_ptr< weld::CheckButton > m_xPopUpNoHelpCB
Definition: optgdlg.hxx:36
DeactivateRC
virtual ~OfaMiscTabPage() override
Definition: optgdlg.cxx:208
std::unique_ptr< weld::Widget > m_xMenuIconBox
Definition: optgdlg.hxx:97
sal_Int32 nSizeLB_InitialSelection
Definition: optgdlg.hxx:78
virtual ~OfaViewTabPage() override
Definition: optgdlg.cxx:585
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optgdlg.cxx:662
std::unique_ptr< SvxLanguageBox > m_xWesternLanguageLB
Definition: optgdlg.hxx:158
std::unique_ptr< weld::CheckButton > m_xShowTipOfTheDay
Definition: optgdlg.hxx:37
sal_Int32 nSidebarSizeLB_InitialSelection
Definition: optgdlg.hxx:79
virtual void Reset(const SfxItemSet *rSet) override
Definition: optgdlg.cxx:282
virtual void Reset(const SfxItemSet *rSet) override
Definition: optgdlg.cxx:1475
std::vector< vcl::IconThemeInfo > mInstalledIconThemes
Definition: optgdlg.hxx:86
std::unique_ptr< weld::CheckButton > m_xUseSkia
Definition: optgdlg.hxx:106
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optgdlg.cxx:212
std::unique_ptr< weld::CheckButton > m_xFontShowCB
Definition: optgdlg.hxx:102
std::unique_ptr< weld::CheckButton > m_xAsianSupportCB
Definition: optgdlg.hxx:163
std::unique_ptr< weld::CheckButton > m_xCTLSupportCB
Definition: optgdlg.hxx:164
OUString m_sUserLocaleValue
Definition: optgdlg.hxx:143