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 #include <config_features.h>
22 #include <sfx2/tabdlg.hxx>
23 #include <svx/langbox.hxx>
31 class OfaMiscTabPage
: public SfxTabPage
34 OUString m_aStrDateInfo
;
36 std::unique_ptr
<weld::CheckButton
> m_xExtHelpCB
;
37 std::unique_ptr
<weld::Widget
> m_xExtHelpImg
;
38 std::unique_ptr
<weld::CheckButton
> m_xPopUpNoHelpCB
;
39 std::unique_ptr
<weld::Widget
> m_xPopUpNoHelpImg
;
40 std::unique_ptr
<weld::CheckButton
> m_xShowTipOfTheDay
;
41 std::unique_ptr
<weld::Widget
> m_xShowTipOfTheDayImg
;
42 std::unique_ptr
<weld::Widget
> m_xFileDlgFrame
;
43 std::unique_ptr
<weld::Widget
> m_xFileDlgROImage
;
44 std::unique_ptr
<weld::CheckButton
> m_xFileDlgCB
;
45 std::unique_ptr
<weld::CheckButton
> m_xDocStatusCB
;
46 std::unique_ptr
<weld::Widget
> m_xDocStatusImg
;
47 std::unique_ptr
<weld::Widget
> m_xYearFrame
;
48 std::unique_ptr
<weld::Label
> m_xYearLabel
;
49 std::unique_ptr
<weld::SpinButton
> m_xYearValueField
;
50 std::unique_ptr
<weld::Label
> m_xToYearFT
;
51 std::unique_ptr
<weld::Widget
> m_xYearFrameImg
;
52 #if HAVE_FEATURE_BREAKPAD
53 std::unique_ptr
<weld::Widget
> m_xPrivacyFrame
;
54 std::unique_ptr
<weld::CheckButton
> m_xCrashReport
;
55 std::unique_ptr
<weld::Widget
> m_xCrashReportImg
;
58 std::unique_ptr
<weld::Widget
> m_xQuickStarterFrame
;
59 std::unique_ptr
<weld::CheckButton
> m_xQuickLaunchCB
;
60 std::unique_ptr
<weld::Widget
> m_xQuickLaunchImg
;
61 std::unique_ptr
<weld::Widget
> m_xFileAssocFrame
;
62 std::unique_ptr
<weld::Button
> m_xFileAssocBtn
;
63 std::unique_ptr
<weld::CheckButton
> m_xPerformFileExtCheck
;
64 std::unique_ptr
<weld::Widget
> m_xPerformFileExtImg
;
67 DECL_LINK(TwoFigureHdl
, weld::SpinButton
&, void);
69 DECL_DLLPRIVATE_STATIC_LINK(OfaMiscTabPage
, FileAssocClick
, weld::Button
&, void);
72 virtual DeactivateRC
DeactivatePage( SfxItemSet
* pSet
) override
;
75 OfaMiscTabPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
76 virtual ~OfaMiscTabPage() override
;
78 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rAttrSet
);
80 virtual OUString
GetAllStrings() override
;
82 virtual bool FillItemSet( SfxItemSet
* rSet
) override
;
83 virtual void Reset( const SfxItemSet
* rSet
) override
;
86 class OfaViewTabPage
: public SfxTabPage
89 sal_Int32 nSizeLB_InitialSelection
;
90 sal_Int32 nSidebarSizeLB_InitialSelection
;
91 sal_Int32 nNotebookbarSizeLB_InitialSelection
;
92 sal_Int32 nStyleLB_InitialSelection
;
94 std::unique_ptr
<CanvasSettings
> pCanvasSettings
;
96 std::vector
<vcl::IconThemeInfo
> mInstalledIconThemes
;
98 std::unique_ptr
<weld::Label
> m_xIconSizeLabel
;
99 std::unique_ptr
<weld::ComboBox
> m_xIconSizeLB
;
100 std::unique_ptr
<weld::Widget
> m_xIconSizeImg
;
101 std::unique_ptr
<weld::Label
> m_xSidebarIconSizeLabel
;
102 std::unique_ptr
<weld::ComboBox
> m_xSidebarIconSizeLB
;
103 std::unique_ptr
<weld::Widget
> m_xSidebarIconSizeImg
;
104 std::unique_ptr
<weld::Label
> m_xNotebookbarIconSizeLabel
;
105 std::unique_ptr
<weld::ComboBox
> m_xNotebookbarIconSizeLB
;
106 std::unique_ptr
<weld::Widget
> m_xNotebookbarIconSizeImg
;
107 std::unique_ptr
<weld::Widget
> m_xDarkModeFrame
;
108 std::unique_ptr
<weld::Label
> m_xAppearanceStyleLabel
;
109 std::unique_ptr
<weld::ComboBox
> m_xAppearanceStyleLB
;
110 std::unique_ptr
<weld::Widget
> m_xAppearanceStyleImg
;
111 std::unique_ptr
<weld::Label
> m_xIconStyleLabel
;
112 std::unique_ptr
<weld::ComboBox
> m_xIconStyleLB
;
113 std::unique_ptr
<weld::Widget
> m_xIconStyleImg
;
115 std::unique_ptr
<weld::CheckButton
> m_xFontAntiAliasing
;
116 std::unique_ptr
<weld::Widget
> m_xFontAntiAliasingImg
;
117 std::unique_ptr
<weld::Label
> m_xAAPointLimitLabel
;
118 std::unique_ptr
<weld::Widget
> m_xAAPointLimitLabelImg
;
119 std::unique_ptr
<weld::MetricSpinButton
> m_xAAPointLimit
;
121 std::unique_ptr
<weld::CheckButton
> m_xFontShowCB
;
122 std::unique_ptr
<weld::Widget
> m_xFontShowImg
;
124 std::unique_ptr
<weld::CheckButton
> m_xUseHardwareAccell
;
125 std::unique_ptr
<weld::Widget
> m_xUseHardwareAccellImg
;
126 std::unique_ptr
<weld::CheckButton
> m_xUseAntiAliase
;
127 std::unique_ptr
<weld::Widget
> m_xUseAntiAliaseImg
;
128 std::unique_ptr
<weld::CheckButton
> m_xUseSkia
;
129 std::unique_ptr
<weld::Widget
> m_xUseSkiaImg
;
130 std::unique_ptr
<weld::CheckButton
> m_xForceSkiaRaster
;
131 std::unique_ptr
<weld::Widget
> m_xForceSkiaRasterImg
;
133 std::unique_ptr
<weld::Label
> m_xSkiaStatusEnabled
;
134 std::unique_ptr
<weld::Label
> m_xSkiaStatusDisabled
;
135 std::unique_ptr
<weld::Button
> m_xSkiaLog
;
137 std::unique_ptr
<weld::Label
> m_xMouseMiddleLabel
;
138 std::unique_ptr
<weld::ComboBox
> m_xMouseMiddleLB
;
139 std::unique_ptr
<weld::Widget
> m_xMouseMiddleImg
;
140 std::unique_ptr
<weld::Button
> m_xMoreIcons
;
141 std::unique_ptr
<weld::Button
> m_xRunGPTests
;
145 DECL_LINK(OnAntialiasingToggled
, weld::Toggleable
&, void);
146 DECL_LINK(OnUseSkiaToggled
, weld::Toggleable
&, void);
147 DECL_LINK(OnCopySkiaLog
, weld::Button
&, void);
148 DECL_STATIC_LINK(OfaViewTabPage
, OnMoreIconsClick
, weld::Button
&, void);
149 DECL_LINK(OnRunGPTestClick
, weld::Button
&, void);
150 void UpdateSkiaStatus();
151 void HideSkiaWidgets();
152 void UpdateHardwareAccelStatus();
153 void UpdateIconThemes();
156 OfaViewTabPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
157 virtual ~OfaViewTabPage() override
;
159 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rAttrSet
);
161 virtual OUString
GetAllStrings() override
;
163 virtual bool FillItemSet( SfxItemSet
* rSet
) override
;
164 virtual void Reset( const SfxItemSet
* rSet
) override
;
167 struct LanguageConfig_Impl
;
169 class OfaLanguagesTabPage
: public SfxTabPage
173 std::unique_ptr
<LanguageConfig_Impl
> pLangConfig
;
175 OUString m_sUserLocaleValue
;
176 OUString m_sSystemDefaultString
;
177 OUString m_sDecimalSeparatorLabel
;
179 bool m_bDatePatternsValid
;
181 std::unique_ptr
<weld::ComboBox
> m_xUserInterfaceLB
;
182 std::unique_ptr
<weld::Label
> m_xLocaleSettingFT
;
183 std::unique_ptr
<SvxLanguageBox
> m_xLocaleSettingLB
;
184 std::unique_ptr
<weld::Widget
> m_xLocaleSettingImg
;
185 std::unique_ptr
<weld::Label
> m_xDecimalSeparatorFT
;
186 std::unique_ptr
<weld::CheckButton
> m_xDecimalSeparatorCB
;
187 std::unique_ptr
<weld::Widget
> m_xDecimalSeparatorImg
;
188 std::unique_ptr
<weld::Label
> m_xCurrencyFT
;
189 std::unique_ptr
<weld::ComboBox
> m_xCurrencyLB
;
190 std::unique_ptr
<weld::Widget
> m_xCurrencyImg
;
191 std::unique_ptr
<weld::Label
> m_xDatePatternsFT
;
192 std::unique_ptr
<weld::Entry
> m_xDatePatternsED
;
193 std::unique_ptr
<weld::Widget
> m_xDatePatternsImg
;
195 std::unique_ptr
<SvxLanguageBox
> m_xWesternLanguageLB
;
196 std::unique_ptr
<weld::Label
> m_xWesternLanguageFT
;
197 std::unique_ptr
<weld::Widget
> m_xWesternLanguageImg
;
198 std::unique_ptr
<SvxLanguageBox
> m_xAsianLanguageLB
;
199 std::unique_ptr
<SvxLanguageBox
> m_xComplexLanguageLB
;
200 std::unique_ptr
<weld::CheckButton
> m_xCurrentDocCB
;
201 std::unique_ptr
<weld::CheckButton
> m_xAsianSupportCB
;
202 std::unique_ptr
<weld::Widget
> m_xAsianSupportImg
;
203 std::unique_ptr
<weld::CheckButton
> m_xCTLSupportCB
;
204 std::unique_ptr
<weld::Widget
> m_xCTLSupportImg
;
205 std::unique_ptr
<weld::CheckButton
> m_xIgnoreLanguageChangeCB
;
206 std::unique_ptr
<weld::Widget
> m_xIgnoreLanguageChangeImg
;
208 DECL_LINK(SupportHdl
, weld::Toggleable
&, void);
209 DECL_LINK(LocaleSettingHdl
, weld::ComboBox
&, void);
210 DECL_LINK(DatePatternsHdl
, weld::Entry
&, void);
212 bool validateDatePatterns( bool& rbModified
, OUString
& rPatterns
);
215 OfaLanguagesTabPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
216 virtual ~OfaLanguagesTabPage() override
;
218 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rAttrSet
);
220 virtual OUString
GetAllStrings() override
;
222 virtual bool FillItemSet( SfxItemSet
* rSet
) override
;
223 virtual void Reset( const SfxItemSet
* rSet
) override
;
226 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */