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::CheckButton
> m_xPopUpNoHelpCB
;
38 std::unique_ptr
<weld::CheckButton
> m_xShowTipOfTheDay
;
39 std::unique_ptr
<weld::Widget
> m_xFileDlgFrame
;
40 std::unique_ptr
<weld::Widget
> m_xFileDlgROImage
;
41 std::unique_ptr
<weld::CheckButton
> m_xFileDlgCB
;
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 #if HAVE_FEATURE_BREAKPAD
47 std::unique_ptr
<weld::Widget
> m_xPrivacyFrame
;
48 std::unique_ptr
<weld::CheckButton
> m_xCrashReport
;
51 std::unique_ptr
<weld::Widget
> m_xQuickStarterFrame
;
52 std::unique_ptr
<weld::CheckButton
> m_xQuickLaunchCB
;
53 std::unique_ptr
<weld::Widget
> m_xFileAssocFrame
;
54 std::unique_ptr
<weld::Button
> m_xFileAssocBtn
;
55 std::unique_ptr
<weld::CheckButton
> m_xPerformFileExtCheck
;
58 DECL_LINK(TwoFigureHdl
, weld::SpinButton
&, void);
60 DECL_DLLPRIVATE_STATIC_LINK(OfaMiscTabPage
, FileAssocClick
, weld::Button
&, void);
63 virtual DeactivateRC
DeactivatePage( SfxItemSet
* pSet
) override
;
66 OfaMiscTabPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
67 virtual ~OfaMiscTabPage() override
;
69 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rAttrSet
);
71 virtual bool FillItemSet( SfxItemSet
* rSet
) override
;
72 virtual void Reset( const SfxItemSet
* rSet
) override
;
75 class OfaViewTabPage
: public SfxTabPage
78 sal_Int32 nSizeLB_InitialSelection
;
79 sal_Int32 nSidebarSizeLB_InitialSelection
;
80 sal_Int32 nNotebookbarSizeLB_InitialSelection
;
81 sal_Int32 nStyleLB_InitialSelection
;
83 std::unique_ptr
<CanvasSettings
> pCanvasSettings
;
85 std::vector
<vcl::IconThemeInfo
> mInstalledIconThemes
;
87 std::unique_ptr
<weld::ComboBox
> m_xIconSizeLB
;
88 std::unique_ptr
<weld::ComboBox
> m_xSidebarIconSizeLB
;
89 std::unique_ptr
<weld::ComboBox
> m_xNotebookbarIconSizeLB
;
90 std::unique_ptr
<weld::Widget
> m_xDarkModeFrame
;
91 std::unique_ptr
<weld::ComboBox
> m_xAppearanceStyleLB
;
92 std::unique_ptr
<weld::ComboBox
> m_xIconStyleLB
;
94 std::unique_ptr
<weld::CheckButton
> m_xFontAntiAliasing
;
95 std::unique_ptr
<weld::Label
> m_xAAPointLimitLabel
;
96 std::unique_ptr
<weld::MetricSpinButton
> m_xAAPointLimit
;
98 std::unique_ptr
<weld::CheckButton
> m_xFontShowCB
;
100 std::unique_ptr
<weld::CheckButton
> m_xUseHardwareAccell
;
101 std::unique_ptr
<weld::CheckButton
> m_xUseAntiAliase
;
102 std::unique_ptr
<weld::CheckButton
> m_xUseSkia
;
103 std::unique_ptr
<weld::CheckButton
> m_xForceSkiaRaster
;
105 std::unique_ptr
<weld::Label
> m_xSkiaStatusEnabled
;
106 std::unique_ptr
<weld::Label
> m_xSkiaStatusDisabled
;
107 std::unique_ptr
<weld::Button
> m_xSkiaLog
;
109 std::unique_ptr
<weld::ComboBox
> m_xMouseMiddleLB
;
110 std::unique_ptr
<weld::Button
> m_xMoreIcons
;
111 std::unique_ptr
<weld::Button
> m_xRunGPTests
;
115 DECL_LINK(OnAntialiasingToggled
, weld::Toggleable
&, void);
116 DECL_LINK(OnUseSkiaToggled
, weld::Toggleable
&, void);
117 DECL_LINK(OnCopySkiaLog
, weld::Button
&, void);
118 DECL_STATIC_LINK(OfaViewTabPage
, OnMoreIconsClick
, weld::Button
&, void);
119 DECL_LINK(OnRunGPTestClick
, weld::Button
&, void);
120 void UpdateSkiaStatus();
121 void HideSkiaWidgets();
122 void UpdateHardwareAccelStatus();
123 void UpdateIconThemes();
126 OfaViewTabPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
127 virtual ~OfaViewTabPage() override
;
129 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rAttrSet
);
131 virtual bool FillItemSet( SfxItemSet
* rSet
) override
;
132 virtual void Reset( const SfxItemSet
* rSet
) override
;
135 struct LanguageConfig_Impl
;
137 class OfaLanguagesTabPage
: public SfxTabPage
141 std::unique_ptr
<LanguageConfig_Impl
> pLangConfig
;
143 OUString m_sUserLocaleValue
;
144 OUString m_sSystemDefaultString
;
145 OUString m_sDecimalSeparatorLabel
;
147 bool m_bDatePatternsValid
;
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
;
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
;
167 DECL_LINK(SupportHdl
, weld::Toggleable
&, void);
168 DECL_LINK(LocaleSettingHdl
, weld::ComboBox
&, void);
169 DECL_LINK(DatePatternsHdl
, weld::Entry
&, void);
171 bool validateDatePatterns( bool& rbModified
, OUString
& rPatterns
);
174 OfaLanguagesTabPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
175 virtual ~OfaLanguagesTabPage() override
;
177 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rAttrSet
);
179 virtual bool FillItemSet( SfxItemSet
* rSet
) override
;
180 virtual void Reset( const SfxItemSet
* rSet
) override
;
183 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */