Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / vcl / source / app / settings.cxx
bloba621f6c61fd41338f69274d639c0758bc6ba79b0
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #include <config_folders.h>
22 #include <officecfg/Office/Common.hxx>
24 #ifdef _WIN32
25 #include <win/svsys.h>
26 #endif
28 #include <comphelper/processfactory.hxx>
29 #include <rtl/bootstrap.hxx>
31 #include <i18nlangtag/mslangid.hxx>
32 #include <i18nlangtag/languagetag.hxx>
34 #include <comphelper/lok.hxx>
36 #include <vcl/graphicfilter.hxx>
37 #include <vcl/IconThemeScanner.hxx>
38 #include <vcl/IconThemeSelector.hxx>
39 #include <vcl/IconThemeInfo.hxx>
40 #include <vcl/svapp.hxx>
41 #include <vcl/event.hxx>
42 #include <vcl/settings.hxx>
43 #include <vcl/i18nhelp.hxx>
44 #include <vcl/configsettings.hxx>
45 #include <vcl/outdev.hxx>
47 #include <unotools/fontcfg.hxx>
48 #include <unotools/localedatawrapper.hxx>
49 #include <unotools/confignode.hxx>
50 #include <unotools/configmgr.hxx>
51 #include <unotools/syslocale.hxx>
52 #include <unotools/syslocaleoptions.hxx>
54 using namespace ::com::sun::star;
56 #include <svdata.hxx>
58 struct ImplMouseData
60 MouseSettingsOptions mnOptions = MouseSettingsOptions::NONE;
61 sal_uInt64 mnDoubleClkTime = 500;
62 long mnDoubleClkWidth = 2;
63 long mnDoubleClkHeight = 2;
64 long mnStartDragWidth = 2 ;
65 long mnStartDragHeight = 2;
66 sal_uLong mnButtonRepeat = 90;
67 sal_uLong mnMenuDelay = 150;
68 MouseFollowFlags mnFollow = MouseFollowFlags::Menu | MouseFollowFlags::DDList;
69 MouseMiddleButtonAction mnMiddleButtonAction= MouseMiddleButtonAction::AutoScroll;
70 MouseWheelBehaviour mnWheelBehavior = MouseWheelBehaviour::ALWAYS;
73 struct ImplStyleData
75 ImplStyleData();
76 ImplStyleData( const ImplStyleData& rData );
78 void SetStandardStyles();
80 Color maActiveBorderColor;
81 Color maActiveColor;
82 Color maActiveTextColor;
83 Color maAlternatingRowColor;
84 Color maButtonTextColor;
85 Color maDefaultActionButtonTextColor;
86 Color maActionButtonTextColor;
87 Color maActionButtonRolloverTextColor;
88 Color maButtonRolloverTextColor;
89 Color maButtonPressedRolloverTextColor;
90 Color maCheckedColor;
91 Color maDarkShadowColor;
92 Color maDeactiveBorderColor;
93 Color maDeactiveColor;
94 Color maDeactiveTextColor;
95 Color maDialogColor;
96 Color maDialogTextColor;
97 Color maDisableColor;
98 Color maFaceColor;
99 Color maFieldColor;
100 Color maFieldTextColor;
101 Color maFieldRolloverTextColor;
102 Color maFontColor;
103 Color maGroupTextColor;
104 Color maHelpColor;
105 Color maHelpTextColor;
106 Color maHighlightColor;
107 Color maHighlightLinkColor;
108 Color maHighlightTextColor;
109 Color maLabelTextColor;
110 Color maLightBorderColor;
111 Color maLightColor;
112 Color maLinkColor;
113 Color maMenuBarColor;
114 Color maMenuBarRolloverColor;
115 Color maMenuBorderColor;
116 Color maMenuColor;
117 Color maMenuHighlightColor;
118 Color maMenuHighlightTextColor;
119 Color maMenuTextColor;
120 Color maMenuBarTextColor;
121 Color maMenuBarRolloverTextColor;
122 Color maMenuBarHighlightTextColor;
123 Color maMonoColor;
124 Color maRadioCheckTextColor;
125 Color maShadowColor;
126 Color maVisitedLinkColor;
127 Color maToolTextColor;
128 Color maWindowColor;
129 Color maWindowTextColor;
130 Color maWorkspaceColor;
131 Color maActiveTabColor;
132 Color maInactiveTabColor;
133 Color maTabTextColor;
134 Color maTabRolloverTextColor;
135 Color maTabHighlightTextColor;
136 vcl::Font maAppFont;
137 vcl::Font maHelpFont;
138 vcl::Font maTitleFont;
139 vcl::Font maFloatTitleFont;
140 vcl::Font maMenuFont;
141 vcl::Font maToolFont;
142 vcl::Font maLabelFont;
143 vcl::Font maRadioCheckFont;
144 vcl::Font maPushButtonFont;
145 vcl::Font maFieldFont;
146 vcl::Font maIconFont;
147 vcl::Font maTabFont;
148 vcl::Font maGroupFont;
149 long mnTitleHeight;
150 long mnFloatTitleHeight;
151 long mnScrollBarSize;
152 long mnSpinSize;
153 long mnCursorSize;
154 long mnAntialiasedMin;
155 sal_uInt64 mnCursorBlinkTime;
156 DragFullOptions mnDragFullOptions;
157 SelectionOptions mnSelectionOptions;
158 DisplayOptions mnDisplayOptions;
159 ToolbarIconSize mnToolbarIconSize;
160 bool mnUseFlatMenus;
161 StyleSettingsOptions mnOptions;
162 bool mbHighContrast;
163 bool mbUseSystemUIFonts;
165 * Disabling AA doesn't actually disable AA of fonts, instead it is taken
166 * from system settings.
168 bool mbUseFontAAFromSystem;
169 bool mbAutoMnemonic;
170 TriState meUseImagesInMenus;
171 bool mnUseFlatBorders;
172 bool mbPreferredUseImagesInMenus;
173 long mnMinThumbSize;
174 std::shared_ptr<vcl::IconThemeScanner>
175 mIconThemeScanner;
176 std::shared_ptr<vcl::IconThemeSelector>
177 mIconThemeSelector;
179 OUString mIconTheme;
180 bool mbSkipDisabledInMenus;
181 bool mbHideDisabledMenuItems;
182 bool mbPreferredContextMenuShortcuts;
183 TriState meContextMenuShortcuts;
184 //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise
185 //primary means scroll by single page. Secondary button takes the alternative behaviour
186 bool mbPrimaryButtonWarpsSlider;
187 DialogStyle maDialogStyle;
189 sal_uInt16 mnEdgeBlending;
190 Color maEdgeBlendingTopLeftColor;
191 Color maEdgeBlendingBottomRightColor;
192 sal_uInt16 mnListBoxMaximumLineCount;
193 sal_uInt16 mnColorValueSetColumnCount;
194 Size maListBoxPreviewDefaultLogicSize;
195 Size maListBoxPreviewDefaultPixelSize;
196 bool mbPreviewUsesCheckeredBackground;
198 OUString maPersonaHeaderFooter; ///< Cache the settings to detect changes.
200 BitmapEx maPersonaHeaderBitmap; ///< Cache the header bitmap.
201 BitmapEx maPersonaFooterBitmap; ///< Cache the footer bitmap.
202 boost::optional<Color> maPersonaMenuBarTextColor; ///< Cache the menubar color.
205 struct ImplMiscData
207 ImplMiscData();
208 TriState mnEnableATT;
209 bool mbEnableLocalizedDecimalSep;
210 TriState mnDisablePrinting;
213 struct ImplHelpData
215 sal_uLong mnTipTimeout = 3000;
218 struct ImplAllSettingsData
220 ImplAllSettingsData();
221 ImplAllSettingsData( const ImplAllSettingsData& rData );
222 ~ImplAllSettingsData();
224 MouseSettings maMouseSettings;
225 StyleSettings maStyleSettings;
226 MiscSettings maMiscSettings;
227 HelpSettings maHelpSettings;
228 LanguageTag maLocale;
229 LanguageTag maUILocale;
230 std::unique_ptr<LocaleDataWrapper> mpLocaleDataWrapper;
231 std::unique_ptr<LocaleDataWrapper> mpUILocaleDataWrapper;
232 std::unique_ptr<vcl::I18nHelper> mpI18nHelper;
233 std::unique_ptr<vcl::I18nHelper> mpUII18nHelper;
234 SvtSysLocale maSysLocale;
237 void
238 MouseSettings::SetOptions(MouseSettingsOptions nOptions)
240 CopyData();
241 mxData->mnOptions = nOptions;
244 MouseSettingsOptions
245 MouseSettings::GetOptions() const
247 return mxData->mnOptions;
250 void
251 MouseSettings::SetDoubleClickTime( sal_uInt64 nDoubleClkTime )
253 CopyData();
254 mxData->mnDoubleClkTime = nDoubleClkTime;
257 sal_uInt64
258 MouseSettings::GetDoubleClickTime() const
260 return mxData->mnDoubleClkTime;
263 void
264 MouseSettings::SetDoubleClickWidth( long nDoubleClkWidth )
266 CopyData();
267 mxData->mnDoubleClkWidth = nDoubleClkWidth;
270 long
271 MouseSettings::GetDoubleClickWidth() const
273 return mxData->mnDoubleClkWidth;
276 void
277 MouseSettings::SetDoubleClickHeight( long nDoubleClkHeight )
279 CopyData();
280 mxData->mnDoubleClkHeight = nDoubleClkHeight;
283 long
284 MouseSettings::GetDoubleClickHeight() const
286 return mxData->mnDoubleClkHeight;
289 void
290 MouseSettings::SetStartDragWidth( long nDragWidth )
292 CopyData();
293 mxData->mnStartDragWidth = nDragWidth;
296 long
297 MouseSettings::GetStartDragWidth() const
299 return mxData->mnStartDragWidth;
302 void
303 MouseSettings::SetStartDragHeight( long nDragHeight )
305 CopyData();
306 mxData->mnStartDragHeight = nDragHeight;
309 long
310 MouseSettings::GetStartDragHeight() const
312 return mxData->mnStartDragHeight;
315 sal_uInt16
316 MouseSettings::GetStartDragCode()
318 return MOUSE_LEFT;
321 sal_uInt16
322 MouseSettings::GetContextMenuCode()
324 return MOUSE_RIGHT;
327 sal_uInt16
328 MouseSettings::GetContextMenuClicks()
330 return 1;
333 sal_uLong
334 MouseSettings::GetScrollRepeat()
336 return 100;
339 sal_uLong
340 MouseSettings::GetButtonStartRepeat()
342 return 370;
345 void
346 MouseSettings::SetButtonRepeat( sal_uLong nRepeat )
348 CopyData();
349 mxData->mnButtonRepeat = nRepeat;
352 sal_uLong
353 MouseSettings::GetButtonRepeat() const
355 return mxData->mnButtonRepeat;
358 sal_uLong
359 MouseSettings::GetActionDelay()
361 return 250;
364 void
365 MouseSettings::SetMenuDelay( sal_uLong nDelay )
367 CopyData();
368 mxData->mnMenuDelay = nDelay;
371 sal_uLong
372 MouseSettings::GetMenuDelay() const
374 return mxData->mnMenuDelay;
377 void
378 MouseSettings::SetFollow( MouseFollowFlags nFollow )
380 CopyData();
381 mxData->mnFollow = nFollow;
384 MouseFollowFlags
385 MouseSettings::GetFollow() const
387 return mxData->mnFollow;
390 void
391 MouseSettings::SetMiddleButtonAction( MouseMiddleButtonAction nAction )
393 CopyData();
394 mxData->mnMiddleButtonAction = nAction;
397 MouseMiddleButtonAction
398 MouseSettings::GetMiddleButtonAction() const
400 return mxData->mnMiddleButtonAction;
403 void
404 MouseSettings::SetWheelBehavior( MouseWheelBehaviour nBehavior )
406 CopyData();
407 mxData->mnWheelBehavior = nBehavior;
410 MouseWheelBehaviour
411 MouseSettings::GetWheelBehavior() const
413 return mxData->mnWheelBehavior;
416 bool
417 MouseSettings::operator !=( const MouseSettings& rSet ) const
419 return !(*this == rSet);
422 MouseSettings::MouseSettings()
423 : mxData(std::make_shared<ImplMouseData>())
427 void MouseSettings::CopyData()
429 // copy if other references exist
430 if (mxData.use_count() > 1)
432 mxData = std::make_shared<ImplMouseData>(*mxData);
436 bool MouseSettings::operator ==( const MouseSettings& rSet ) const
438 if ( mxData == rSet.mxData )
439 return true;
441 return
442 (mxData->mnOptions == rSet.mxData->mnOptions) &&
443 (mxData->mnDoubleClkTime == rSet.mxData->mnDoubleClkTime) &&
444 (mxData->mnDoubleClkWidth == rSet.mxData->mnDoubleClkWidth) &&
445 (mxData->mnDoubleClkHeight == rSet.mxData->mnDoubleClkHeight) &&
446 (mxData->mnStartDragWidth == rSet.mxData->mnStartDragWidth) &&
447 (mxData->mnStartDragHeight == rSet.mxData->mnStartDragHeight) &&
448 (mxData->mnMiddleButtonAction == rSet.mxData->mnMiddleButtonAction) &&
449 (mxData->mnButtonRepeat == rSet.mxData->mnButtonRepeat) &&
450 (mxData->mnMenuDelay == rSet.mxData->mnMenuDelay) &&
451 (mxData->mnFollow == rSet.mxData->mnFollow) &&
452 (mxData->mnWheelBehavior == rSet.mxData->mnWheelBehavior );
455 ImplStyleData::ImplStyleData() :
456 mnScrollBarSize(16),
457 mnSpinSize(16),
458 mnCursorSize(2),
459 mnAntialiasedMin(0),
460 mnCursorBlinkTime(STYLE_CURSOR_NOBLINKTIME),
461 mnDragFullOptions(DragFullOptions::All),
462 mnSelectionOptions(SelectionOptions::NONE),
463 mnDisplayOptions(DisplayOptions::NONE),
464 mnToolbarIconSize(ToolbarIconSize::Unknown),
465 mnOptions(StyleSettingsOptions::NONE),
466 mbAutoMnemonic(true),
467 meUseImagesInMenus(TRISTATE_INDET),
468 mnMinThumbSize(16),
469 mIconThemeSelector(new vcl::IconThemeSelector()),
470 meContextMenuShortcuts(TRISTATE_INDET),
471 mnEdgeBlending(35),
472 maEdgeBlendingTopLeftColor(Color(0xC0, 0xC0, 0xC0)),
473 maEdgeBlendingBottomRightColor(Color(0x40, 0x40, 0x40)),
474 mnListBoxMaximumLineCount(25),
475 mnColorValueSetColumnCount(12),
476 maListBoxPreviewDefaultLogicSize(Size(15, 7)),
477 maListBoxPreviewDefaultPixelSize(Size(0, 0)), // on-demand calculated in GetListBoxPreviewDefaultPixelSize(),
478 mbPreviewUsesCheckeredBackground(true)
480 SetStandardStyles();
483 ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
484 maActiveBorderColor( rData.maActiveBorderColor ),
485 maActiveColor( rData.maActiveColor ),
486 maActiveTextColor( rData.maActiveTextColor ),
487 maAlternatingRowColor( rData.maAlternatingRowColor ),
488 maButtonTextColor( rData.maButtonTextColor ),
489 maDefaultActionButtonTextColor( rData.maDefaultActionButtonTextColor ),
490 maActionButtonTextColor( rData.maActionButtonTextColor ),
491 maActionButtonRolloverTextColor( rData.maActionButtonRolloverTextColor ),
492 maButtonRolloverTextColor( rData.maButtonRolloverTextColor ),
493 maButtonPressedRolloverTextColor( rData.maButtonPressedRolloverTextColor ),
494 maCheckedColor( rData.maCheckedColor ),
495 maDarkShadowColor( rData.maDarkShadowColor ),
496 maDeactiveBorderColor( rData.maDeactiveBorderColor ),
497 maDeactiveColor( rData.maDeactiveColor ),
498 maDeactiveTextColor( rData.maDeactiveTextColor ),
499 maDialogColor( rData.maDialogColor ),
500 maDialogTextColor( rData.maDialogTextColor ),
501 maDisableColor( rData.maDisableColor ),
502 maFaceColor( rData.maFaceColor ),
503 maFieldColor( rData.maFieldColor ),
504 maFieldTextColor( rData.maFieldTextColor ),
505 maFieldRolloverTextColor( rData.maFieldRolloverTextColor ),
506 maFontColor( rData.maFontColor ),
507 maGroupTextColor( rData.maGroupTextColor ),
508 maHelpColor( rData.maHelpColor ),
509 maHelpTextColor( rData.maHelpTextColor ),
510 maHighlightColor( rData.maHighlightColor ),
511 maHighlightLinkColor( rData.maHighlightLinkColor ),
512 maHighlightTextColor( rData.maHighlightTextColor ),
513 maLabelTextColor( rData.maLabelTextColor ),
514 maLightBorderColor( rData.maLightBorderColor ),
515 maLightColor( rData.maLightColor ),
516 maLinkColor( rData.maLinkColor ),
517 maMenuBarColor( rData.maMenuBarColor ),
518 maMenuBarRolloverColor( rData.maMenuBarRolloverColor ),
519 maMenuBorderColor( rData.maMenuBorderColor ),
520 maMenuColor( rData.maMenuColor ),
521 maMenuHighlightColor( rData.maMenuHighlightColor ),
522 maMenuHighlightTextColor( rData.maMenuHighlightTextColor ),
523 maMenuTextColor( rData.maMenuTextColor ),
524 maMenuBarTextColor( rData.maMenuBarTextColor ),
525 maMenuBarRolloverTextColor( rData.maMenuBarRolloverTextColor ),
526 maMenuBarHighlightTextColor( rData.maMenuBarHighlightTextColor ),
527 maMonoColor( rData.maMonoColor ),
528 maRadioCheckTextColor( rData.maRadioCheckTextColor ),
529 maShadowColor( rData.maShadowColor ),
530 maVisitedLinkColor( rData.maVisitedLinkColor ),
531 maToolTextColor( rData.maToolTextColor ),
532 maWindowColor( rData.maWindowColor ),
533 maWindowTextColor( rData.maWindowTextColor ),
534 maWorkspaceColor( rData.maWorkspaceColor ),
535 maActiveTabColor( rData.maActiveTabColor ),
536 maInactiveTabColor( rData.maInactiveTabColor ),
537 maTabTextColor( rData.maTabTextColor ),
538 maTabRolloverTextColor( rData.maTabRolloverTextColor ),
539 maTabHighlightTextColor( rData.maTabHighlightTextColor ),
540 maAppFont( rData.maAppFont ),
541 maHelpFont( rData.maAppFont ),
542 maTitleFont( rData.maTitleFont ),
543 maFloatTitleFont( rData.maFloatTitleFont ),
544 maMenuFont( rData.maMenuFont ),
545 maToolFont( rData.maToolFont ),
546 maLabelFont( rData.maLabelFont ),
547 maRadioCheckFont( rData.maRadioCheckFont ),
548 maPushButtonFont( rData.maPushButtonFont ),
549 maFieldFont( rData.maFieldFont ),
550 maIconFont( rData.maIconFont ),
551 maTabFont( rData.maTabFont ),
552 maGroupFont( rData.maGroupFont ),
553 mnTitleHeight(rData.mnTitleHeight),
554 mnFloatTitleHeight(rData.mnFloatTitleHeight),
555 mnScrollBarSize(rData.mnScrollBarSize),
556 mnSpinSize(rData.mnSpinSize),
557 mnCursorSize(rData.mnCursorSize),
558 mnAntialiasedMin(rData.mnAntialiasedMin),
559 mnCursorBlinkTime(rData.mnCursorBlinkTime),
560 mnDragFullOptions(rData.mnDragFullOptions),
561 mnSelectionOptions(rData.mnSelectionOptions),
562 mnDisplayOptions(rData.mnDisplayOptions),
563 mnToolbarIconSize(rData.mnToolbarIconSize),
564 mnUseFlatMenus(rData.mnUseFlatMenus),
565 mnOptions(rData.mnOptions),
566 mbHighContrast(rData.mbHighContrast),
567 mbUseSystemUIFonts(rData.mbUseSystemUIFonts),
568 mbUseFontAAFromSystem(rData.mbUseFontAAFromSystem),
569 mbAutoMnemonic(rData.mbAutoMnemonic),
570 meUseImagesInMenus(rData.meUseImagesInMenus),
571 mnUseFlatBorders(rData.mnUseFlatBorders),
572 mbPreferredUseImagesInMenus(rData.mbPreferredUseImagesInMenus),
573 mnMinThumbSize(rData.mnMinThumbSize),
574 mIconThemeScanner(rData.mIconThemeScanner?new vcl::IconThemeScanner(*rData.mIconThemeScanner):nullptr),
575 mIconThemeSelector(new vcl::IconThemeSelector(*rData.mIconThemeSelector)),
576 mIconTheme(rData.mIconTheme),
577 mbSkipDisabledInMenus(rData.mbSkipDisabledInMenus),
578 mbHideDisabledMenuItems(rData.mbHideDisabledMenuItems),
579 mbPreferredContextMenuShortcuts(rData.mbPreferredContextMenuShortcuts),
580 meContextMenuShortcuts(rData.meContextMenuShortcuts),
581 mbPrimaryButtonWarpsSlider(rData.mbPrimaryButtonWarpsSlider),
582 maDialogStyle( rData.maDialogStyle ),
583 mnEdgeBlending(rData.mnEdgeBlending),
584 maEdgeBlendingTopLeftColor(rData.maEdgeBlendingTopLeftColor),
585 maEdgeBlendingBottomRightColor(rData.maEdgeBlendingBottomRightColor),
586 mnListBoxMaximumLineCount(rData.mnListBoxMaximumLineCount),
587 mnColorValueSetColumnCount(rData.mnColorValueSetColumnCount),
588 maListBoxPreviewDefaultLogicSize(rData.maListBoxPreviewDefaultLogicSize),
589 maListBoxPreviewDefaultPixelSize(rData.maListBoxPreviewDefaultPixelSize),
590 mbPreviewUsesCheckeredBackground(rData.mbPreviewUsesCheckeredBackground),
591 maPersonaHeaderFooter( rData.maPersonaHeaderFooter ),
592 maPersonaHeaderBitmap( rData.maPersonaHeaderBitmap ),
593 maPersonaFooterBitmap( rData.maPersonaFooterBitmap ),
594 maPersonaMenuBarTextColor( rData.maPersonaMenuBarTextColor )
598 void ImplStyleData::SetStandardStyles()
600 vcl::Font aStdFont( FAMILY_SWISS, Size( 0, 8 ) );
601 aStdFont.SetCharSet( osl_getThreadTextEncoding() );
602 aStdFont.SetWeight( WEIGHT_NORMAL );
603 if (!utl::ConfigManager::IsFuzzing())
604 aStdFont.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en")));
605 else
606 aStdFont.SetFamilyName("Liberation Sans");
607 maAppFont = aStdFont;
608 maHelpFont = aStdFont;
609 maMenuFont = aStdFont;
610 maToolFont = aStdFont;
611 maGroupFont = aStdFont;
612 maLabelFont = aStdFont;
613 maRadioCheckFont = aStdFont;
614 maPushButtonFont = aStdFont;
615 maFieldFont = aStdFont;
616 maIconFont = aStdFont;
617 maTabFont = aStdFont;
618 aStdFont.SetWeight( WEIGHT_BOLD );
619 maFloatTitleFont = aStdFont;
620 maTitleFont = aStdFont;
622 maFaceColor = COL_LIGHTGRAY;
623 maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
624 maLightColor = COL_WHITE;
625 maLightBorderColor = COL_LIGHTGRAY;
626 maShadowColor = COL_GRAY;
627 maDarkShadowColor = COL_BLACK;
628 maButtonTextColor = COL_BLACK;
629 maDefaultActionButtonTextColor = COL_BLACK;
630 maActionButtonTextColor = COL_BLACK;
631 maActionButtonRolloverTextColor = COL_BLACK;
632 maButtonRolloverTextColor = COL_BLACK;
633 maButtonPressedRolloverTextColor = COL_BLACK;
634 maRadioCheckTextColor = COL_BLACK;
635 maGroupTextColor = COL_BLACK;
636 maLabelTextColor = COL_BLACK;
637 maWindowColor = COL_WHITE;
638 maWindowTextColor = COL_BLACK;
639 maDialogColor = COL_LIGHTGRAY;
640 maDialogTextColor = COL_BLACK;
641 maWorkspaceColor = Color( 0xDF, 0xDF, 0xDE );
642 maMonoColor = COL_BLACK;
643 maFieldColor = COL_WHITE;
644 maFieldTextColor = COL_BLACK;
645 maFieldRolloverTextColor = COL_BLACK;
646 maActiveColor = COL_BLUE;
647 maActiveTextColor = COL_WHITE;
648 maActiveBorderColor = COL_LIGHTGRAY;
649 maDeactiveColor = COL_GRAY;
650 maDeactiveTextColor = COL_LIGHTGRAY;
651 maDeactiveBorderColor = COL_LIGHTGRAY;
652 maMenuColor = COL_LIGHTGRAY;
653 maMenuBarColor = COL_LIGHTGRAY;
654 maMenuBarRolloverColor = COL_BLUE;
655 maMenuBorderColor = COL_LIGHTGRAY;
656 maMenuTextColor = COL_BLACK;
657 maMenuBarTextColor = COL_BLACK;
658 maMenuBarRolloverTextColor = COL_WHITE;
659 maMenuBarHighlightTextColor = COL_WHITE;
660 maMenuHighlightColor = COL_BLUE;
661 maMenuHighlightTextColor = COL_WHITE;
662 maHighlightColor = COL_BLUE;
663 maHighlightTextColor = COL_WHITE;
664 maActiveTabColor = COL_WHITE;
665 maInactiveTabColor = COL_LIGHTGRAY;
666 maTabTextColor = COL_BLACK;
667 maTabRolloverTextColor = COL_BLACK;
668 maTabHighlightTextColor = COL_BLACK;
669 maDisableColor = COL_GRAY;
670 maHelpColor = Color( 0xFF, 0xFF, 0xE0 );
671 maHelpTextColor = COL_BLACK;
672 maLinkColor = COL_BLUE;
673 maVisitedLinkColor = Color( 0x00, 0x00, 0xCC );
674 maToolTextColor = COL_BLACK;
675 maHighlightLinkColor = COL_LIGHTBLUE;
676 maFontColor = COL_BLACK;
677 maAlternatingRowColor = Color( 0xEE, 0xEE, 0xEE );
679 mnTitleHeight = 18;
680 mnFloatTitleHeight = 13;
681 mbHighContrast = false;
682 mbUseSystemUIFonts = true;
683 mbUseFontAAFromSystem = true;
684 mnUseFlatBorders = false;
685 mnUseFlatMenus = false;
686 mbPreferredUseImagesInMenus = true;
687 mbSkipDisabledInMenus = false;
688 mbHideDisabledMenuItems = false;
689 mbPreferredContextMenuShortcuts = true;
690 mbPrimaryButtonWarpsSlider = false;
693 StyleSettings::StyleSettings()
694 : mxData(std::make_shared<ImplStyleData>())
698 void
699 StyleSettings::SetFaceColor( const Color& rColor )
701 CopyData();
702 mxData->maFaceColor = rColor;
705 const Color&
706 StyleSettings::GetFaceColor() const
708 return mxData->maFaceColor;
711 void
712 StyleSettings::SetCheckedColor( const Color& rColor )
714 CopyData();
715 mxData->maCheckedColor = rColor;
718 const Color&
719 StyleSettings::GetCheckedColor() const
721 return mxData->maCheckedColor;
724 void
725 StyleSettings::SetLightColor( const Color& rColor )
727 CopyData();
728 mxData->maLightColor = rColor;
731 const Color&
732 StyleSettings::GetLightColor() const
734 return mxData->maLightColor;
737 void
738 StyleSettings::SetLightBorderColor( const Color& rColor )
740 CopyData();
741 mxData->maLightBorderColor = rColor;
744 const Color&
745 StyleSettings::GetLightBorderColor() const
747 return mxData->maLightBorderColor;
750 void
751 StyleSettings::SetShadowColor( const Color& rColor )
753 CopyData();
754 mxData->maShadowColor = rColor;
757 const Color&
758 StyleSettings::GetShadowColor() const
760 return mxData->maShadowColor;
763 void
764 StyleSettings::SetDarkShadowColor( const Color& rColor )
766 CopyData();
767 mxData->maDarkShadowColor = rColor;
770 const Color&
771 StyleSettings::GetDarkShadowColor() const
773 return mxData->maDarkShadowColor;
776 void
777 StyleSettings::SetButtonTextColor( const Color& rColor )
779 CopyData();
780 mxData->maButtonTextColor = rColor;
783 const Color&
784 StyleSettings::GetButtonTextColor() const
786 return mxData->maButtonTextColor;
789 void
790 StyleSettings::SetDefaultActionButtonTextColor( const Color& rColor )
792 CopyData();
793 mxData->maDefaultActionButtonTextColor = rColor;
796 const Color&
797 StyleSettings::GetDefaultActionButtonTextColor() const
799 return mxData->maDefaultActionButtonTextColor;
802 void
803 StyleSettings::SetActionButtonTextColor( const Color& rColor )
805 CopyData();
806 mxData->maActionButtonTextColor = rColor;
809 const Color&
810 StyleSettings::GetActionButtonTextColor() const
812 return mxData->maActionButtonTextColor;
815 void
816 StyleSettings::SetActionButtonRolloverTextColor( const Color& rColor )
818 CopyData();
819 mxData->maActionButtonRolloverTextColor = rColor;
822 const Color&
823 StyleSettings::GetActionButtonRolloverTextColor() const
825 return mxData->maActionButtonRolloverTextColor;
828 void
829 StyleSettings::SetButtonRolloverTextColor( const Color& rColor )
831 CopyData();
832 mxData->maButtonRolloverTextColor = rColor;
835 const Color&
836 StyleSettings::GetButtonRolloverTextColor() const
838 return mxData->maButtonRolloverTextColor;
841 void
842 StyleSettings::SetButtonPressedRolloverTextColor( const Color& rColor )
844 CopyData();
845 mxData->maButtonPressedRolloverTextColor = rColor;
848 const Color&
849 StyleSettings::GetButtonPressedRolloverTextColor() const
851 return mxData->maButtonPressedRolloverTextColor;
854 void
855 StyleSettings::SetRadioCheckTextColor( const Color& rColor )
857 CopyData();
858 mxData->maRadioCheckTextColor = rColor;
861 const Color&
862 StyleSettings::GetRadioCheckTextColor() const
864 return mxData->maRadioCheckTextColor;
867 void
868 StyleSettings::SetGroupTextColor( const Color& rColor )
870 CopyData();
871 mxData->maGroupTextColor = rColor;
874 const Color&
875 StyleSettings::GetGroupTextColor() const
877 return mxData->maGroupTextColor;
880 void
881 StyleSettings::SetLabelTextColor( const Color& rColor )
883 CopyData();
884 mxData->maLabelTextColor = rColor;
887 const Color&
888 StyleSettings::GetLabelTextColor() const
890 return mxData->maLabelTextColor;
893 void
894 StyleSettings::SetWindowColor( const Color& rColor )
896 CopyData();
897 mxData->maWindowColor = rColor;
900 const Color&
901 StyleSettings::GetWindowColor() const
903 return mxData->maWindowColor;
906 void
907 StyleSettings::SetWindowTextColor( const Color& rColor )
909 CopyData();
910 mxData->maWindowTextColor = rColor;
913 const Color&
914 StyleSettings::GetWindowTextColor() const
916 return mxData->maWindowTextColor;
919 void
920 StyleSettings::SetDialogColor( const Color& rColor )
922 CopyData();
923 mxData->maDialogColor = rColor;
926 const Color&
927 StyleSettings::GetDialogColor() const
929 return mxData->maDialogColor;
932 void
933 StyleSettings::SetDialogTextColor( const Color& rColor )
935 CopyData();
936 mxData->maDialogTextColor = rColor;
939 const Color&
940 StyleSettings::GetDialogTextColor() const
942 return mxData->maDialogTextColor;
945 void
946 StyleSettings::SetWorkspaceColor( const Color& rColor )
948 CopyData();
949 mxData->maWorkspaceColor = rColor;
952 const Color&
953 StyleSettings::GetWorkspaceColor() const
955 return mxData->maWorkspaceColor;
958 void
959 StyleSettings::SetFieldColor( const Color& rColor )
961 CopyData();
962 mxData->maFieldColor = rColor;
965 const Color&
966 StyleSettings::GetFieldColor() const
968 return mxData->maFieldColor;
971 void
972 StyleSettings::SetFieldTextColor( const Color& rColor )
974 CopyData();
975 mxData->maFieldTextColor = rColor;
978 const Color&
979 StyleSettings::GetFieldTextColor() const
981 return mxData->maFieldTextColor;
984 void
985 StyleSettings::SetFieldRolloverTextColor( const Color& rColor )
987 CopyData();
988 mxData->maFieldRolloverTextColor = rColor;
991 const Color&
992 StyleSettings::GetFieldRolloverTextColor() const
994 return mxData->maFieldRolloverTextColor;
997 void
998 StyleSettings::SetActiveColor( const Color& rColor )
1000 CopyData();
1001 mxData->maActiveColor = rColor;
1004 const Color&
1005 StyleSettings::GetActiveColor() const
1007 return mxData->maActiveColor;
1010 void
1011 StyleSettings::SetActiveTextColor( const Color& rColor )
1013 CopyData();
1014 mxData->maActiveTextColor = rColor;
1017 const Color&
1018 StyleSettings::GetActiveTextColor() const
1020 return mxData->maActiveTextColor;
1023 void
1024 StyleSettings::SetActiveBorderColor( const Color& rColor )
1026 CopyData();
1027 mxData->maActiveBorderColor = rColor;
1030 const Color&
1031 StyleSettings::GetActiveBorderColor() const
1033 return mxData->maActiveBorderColor;
1036 void
1037 StyleSettings::SetDeactiveColor( const Color& rColor )
1039 CopyData();
1040 mxData->maDeactiveColor = rColor;
1043 const Color&
1044 StyleSettings::GetDeactiveColor() const
1046 return mxData->maDeactiveColor;
1049 void
1050 StyleSettings::SetDeactiveTextColor( const Color& rColor )
1052 CopyData();
1053 mxData->maDeactiveTextColor = rColor;
1056 const Color&
1057 StyleSettings::GetDeactiveTextColor() const
1059 return mxData->maDeactiveTextColor;
1062 void
1063 StyleSettings::SetDeactiveBorderColor( const Color& rColor )
1065 CopyData();
1066 mxData->maDeactiveBorderColor = rColor;
1069 const Color&
1070 StyleSettings::GetDeactiveBorderColor() const
1072 return mxData->maDeactiveBorderColor;
1075 void
1076 StyleSettings::SetHighlightColor( const Color& rColor )
1078 CopyData();
1079 mxData->maHighlightColor = rColor;
1082 const Color&
1083 StyleSettings::GetHighlightColor() const
1085 return mxData->maHighlightColor;
1088 void
1089 StyleSettings::SetHighlightTextColor( const Color& rColor )
1091 CopyData();
1092 mxData->maHighlightTextColor = rColor;
1095 const Color&
1096 StyleSettings::GetHighlightTextColor() const
1098 return mxData->maHighlightTextColor;
1101 void
1102 StyleSettings::SetDisableColor( const Color& rColor )
1104 CopyData();
1105 mxData->maDisableColor = rColor;
1108 const Color&
1109 StyleSettings::GetDisableColor() const
1111 return mxData->maDisableColor;
1114 void
1115 StyleSettings::SetHelpColor( const Color& rColor )
1117 CopyData();
1118 mxData->maHelpColor = rColor;
1121 const Color&
1122 StyleSettings::GetHelpColor() const
1124 return mxData->maHelpColor;
1127 void
1128 StyleSettings::SetHelpTextColor( const Color& rColor )
1130 CopyData();
1131 mxData->maHelpTextColor = rColor;
1134 const Color&
1135 StyleSettings::GetHelpTextColor() const
1137 return mxData->maHelpTextColor;
1140 void
1141 StyleSettings::SetMenuColor( const Color& rColor )
1143 CopyData();
1144 mxData->maMenuColor = rColor;
1147 const Color&
1148 StyleSettings::GetMenuColor() const
1150 return mxData->maMenuColor;
1153 void
1154 StyleSettings::SetMenuBarColor( const Color& rColor )
1156 CopyData();
1157 mxData->maMenuBarColor = rColor;
1160 const Color&
1161 StyleSettings::GetMenuBarColor() const
1163 return mxData->maMenuBarColor;
1166 void
1167 StyleSettings::SetMenuBarRolloverColor( const Color& rColor )
1169 CopyData();
1170 mxData->maMenuBarRolloverColor = rColor;
1173 const Color&
1174 StyleSettings::GetMenuBarRolloverColor() const
1176 return mxData->maMenuBarRolloverColor;
1179 void
1180 StyleSettings::SetMenuBorderColor( const Color& rColor )
1182 CopyData();
1183 mxData->maMenuBorderColor = rColor;
1186 const Color&
1187 StyleSettings::GetMenuBorderColor() const
1189 return mxData->maMenuBorderColor;
1192 void
1193 StyleSettings::SetMenuTextColor( const Color& rColor )
1195 CopyData();
1196 mxData->maMenuTextColor = rColor;
1199 const Color&
1200 StyleSettings::GetMenuTextColor() const
1202 return mxData->maMenuTextColor;
1205 void
1206 StyleSettings::SetMenuBarTextColor( const Color& rColor )
1208 CopyData();
1209 mxData->maMenuBarTextColor = rColor;
1212 const Color&
1213 StyleSettings::GetMenuBarTextColor() const
1215 return mxData->maMenuBarTextColor;
1218 void
1219 StyleSettings::SetMenuBarRolloverTextColor( const Color& rColor )
1221 CopyData();
1222 mxData->maMenuBarRolloverTextColor = rColor;
1225 const Color&
1226 StyleSettings::GetMenuBarRolloverTextColor() const
1228 return mxData->maMenuBarRolloverTextColor;
1231 void
1232 StyleSettings::SetMenuBarHighlightTextColor( const Color& rColor )
1234 CopyData();
1235 mxData->maMenuBarHighlightTextColor = rColor;
1238 const Color&
1239 StyleSettings::GetMenuBarHighlightTextColor() const
1241 return mxData->maMenuBarHighlightTextColor;
1244 void
1245 StyleSettings::SetMenuHighlightColor( const Color& rColor )
1247 CopyData();
1248 mxData->maMenuHighlightColor = rColor;
1251 const Color&
1252 StyleSettings::GetMenuHighlightColor() const
1254 return mxData->maMenuHighlightColor;
1257 void
1258 StyleSettings::SetMenuHighlightTextColor( const Color& rColor )
1260 CopyData();
1261 mxData->maMenuHighlightTextColor = rColor;
1264 const Color&
1265 StyleSettings::GetMenuHighlightTextColor() const
1267 return mxData->maMenuHighlightTextColor;
1270 void
1271 StyleSettings::SetTabTextColor( const Color& rColor )
1273 CopyData();
1274 mxData->maTabTextColor = rColor;
1277 const Color&
1278 StyleSettings::GetTabTextColor() const
1280 return mxData->maTabTextColor;
1283 void
1284 StyleSettings::SetTabRolloverTextColor( const Color& rColor )
1286 CopyData();
1287 mxData->maTabRolloverTextColor = rColor;
1290 const Color&
1291 StyleSettings::GetTabRolloverTextColor() const
1293 return mxData->maTabRolloverTextColor;
1296 void
1297 StyleSettings::SetTabHighlightTextColor( const Color& rColor )
1299 CopyData();
1300 mxData->maTabHighlightTextColor = rColor;
1303 const Color&
1304 StyleSettings::GetTabHighlightTextColor() const
1306 return mxData->maTabHighlightTextColor;
1309 void
1310 StyleSettings::SetLinkColor( const Color& rColor )
1312 CopyData();
1313 mxData->maLinkColor = rColor;
1316 const Color&
1317 StyleSettings::GetLinkColor() const
1319 return mxData->maLinkColor;
1322 void
1323 StyleSettings::SetVisitedLinkColor( const Color& rColor )
1325 CopyData();
1326 mxData->maVisitedLinkColor = rColor;
1329 const Color&
1330 StyleSettings::GetVisitedLinkColor() const
1332 return mxData->maVisitedLinkColor;
1335 void
1336 StyleSettings::SetToolTextColor( const Color& rColor )
1338 CopyData();
1339 mxData->maToolTextColor = rColor;
1342 const Color&
1343 StyleSettings::GetToolTextColor() const
1345 return mxData->maToolTextColor;
1348 const Color&
1349 StyleSettings::GetHighlightLinkColor() const
1351 return mxData->maHighlightLinkColor;
1354 void
1355 StyleSettings::SetMonoColor( const Color& rColor )
1357 CopyData();
1358 mxData->maMonoColor = rColor;
1361 const Color&
1362 StyleSettings::GetMonoColor() const
1364 return mxData->maMonoColor;
1367 void
1368 StyleSettings::SetActiveTabColor( const Color& rColor )
1370 CopyData();
1371 mxData->maActiveTabColor = rColor;
1374 const Color&
1375 StyleSettings::GetActiveTabColor() const
1377 return mxData->maActiveTabColor;
1380 void
1381 StyleSettings::SetInactiveTabColor( const Color& rColor )
1383 CopyData();
1384 mxData->maInactiveTabColor = rColor;
1387 const Color&
1388 StyleSettings::GetInactiveTabColor() const
1390 return mxData->maInactiveTabColor;
1393 const Color&
1394 StyleSettings::GetAlternatingRowColor() const
1396 return mxData->maAlternatingRowColor;
1399 void
1400 StyleSettings::SetUseSystemUIFonts( bool bUseSystemUIFonts )
1402 CopyData();
1403 mxData->mbUseSystemUIFonts = bUseSystemUIFonts;
1406 bool
1407 StyleSettings::GetUseSystemUIFonts() const
1409 return mxData->mbUseSystemUIFonts;
1412 void StyleSettings::SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
1414 CopyData();
1415 mxData->mbUseFontAAFromSystem = bUseFontAAFromSystem;
1418 bool StyleSettings::GetUseFontAAFromSystem() const
1420 return mxData->mbUseFontAAFromSystem;
1423 void
1424 StyleSettings::SetUseFlatBorders( bool bUseFlatBorders )
1426 CopyData();
1427 mxData->mnUseFlatBorders = bUseFlatBorders;
1430 bool
1431 StyleSettings::GetUseFlatBorders() const
1433 return mxData->mnUseFlatBorders;
1436 void
1437 StyleSettings::SetUseFlatMenus( bool bUseFlatMenus )
1439 CopyData();
1440 mxData->mnUseFlatMenus = bUseFlatMenus;
1443 bool
1444 StyleSettings::GetUseFlatMenus() const
1446 return mxData->mnUseFlatMenus;
1449 void
1450 StyleSettings::SetUseImagesInMenus( TriState eUseImagesInMenus )
1452 CopyData();
1453 mxData->meUseImagesInMenus = eUseImagesInMenus;
1456 void
1457 StyleSettings::SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus )
1459 CopyData();
1460 mxData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus;
1463 bool
1464 StyleSettings::GetPreferredUseImagesInMenus() const
1466 return mxData->mbPreferredUseImagesInMenus;
1469 void
1470 StyleSettings::SetSkipDisabledInMenus( bool bSkipDisabledInMenus )
1472 CopyData();
1473 mxData->mbSkipDisabledInMenus = bSkipDisabledInMenus;
1476 bool
1477 StyleSettings::GetSkipDisabledInMenus() const
1479 return mxData->mbSkipDisabledInMenus;
1482 void
1483 StyleSettings::SetHideDisabledMenuItems( bool bHideDisabledMenuItems )
1485 CopyData();
1486 mxData->mbHideDisabledMenuItems = bHideDisabledMenuItems;
1489 bool
1490 StyleSettings::GetHideDisabledMenuItems() const
1492 return mxData->mbHideDisabledMenuItems;
1495 void
1496 StyleSettings::SetContextMenuShortcuts( TriState eContextMenuShortcuts )
1498 CopyData();
1499 mxData->meContextMenuShortcuts = eContextMenuShortcuts;
1502 bool
1503 StyleSettings::GetContextMenuShortcuts() const
1505 switch (mxData->meContextMenuShortcuts)
1507 case TRISTATE_FALSE:
1508 return false;
1509 case TRISTATE_TRUE:
1510 return true;
1511 default: // TRISTATE_INDET:
1512 return GetPreferredContextMenuShortcuts();
1516 void
1517 StyleSettings::SetPreferredContextMenuShortcuts( bool bContextMenuShortcuts )
1519 CopyData();
1520 mxData->mbPreferredContextMenuShortcuts = bContextMenuShortcuts;
1523 bool
1524 StyleSettings::GetPreferredContextMenuShortcuts() const
1526 return mxData->mbPreferredContextMenuShortcuts;
1529 void
1530 StyleSettings::SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider )
1532 CopyData();
1533 mxData->mbPrimaryButtonWarpsSlider = bPrimaryButtonWarpsSlider;
1536 bool
1537 StyleSettings::GetPrimaryButtonWarpsSlider() const
1539 return mxData->mbPrimaryButtonWarpsSlider;
1542 void
1543 StyleSettings::SetAppFont( const vcl::Font& rFont )
1545 CopyData();
1546 mxData->maAppFont = rFont;
1549 const vcl::Font&
1550 StyleSettings::GetAppFont() const
1552 return mxData->maAppFont;
1555 void
1556 StyleSettings::SetHelpFont( const vcl::Font& rFont )
1558 CopyData();
1559 mxData->maHelpFont = rFont;
1562 const vcl::Font&
1563 StyleSettings::GetHelpFont() const
1565 return mxData->maHelpFont;
1568 void
1569 StyleSettings::SetTitleFont( const vcl::Font& rFont )
1571 CopyData();
1572 mxData->maTitleFont = rFont;
1575 const vcl::Font&
1576 StyleSettings::GetTitleFont() const
1578 return mxData->maTitleFont;
1581 void
1582 StyleSettings::SetFloatTitleFont( const vcl::Font& rFont )
1584 CopyData();
1585 mxData->maFloatTitleFont = rFont;
1588 const vcl::Font&
1589 StyleSettings::GetFloatTitleFont() const
1591 return mxData->maFloatTitleFont;
1594 void
1595 StyleSettings::SetMenuFont( const vcl::Font& rFont )
1597 CopyData();
1598 mxData->maMenuFont = rFont;
1601 const vcl::Font&
1602 StyleSettings::GetMenuFont() const
1604 return mxData->maMenuFont;
1607 void
1608 StyleSettings::SetToolFont( const vcl::Font& rFont )
1610 CopyData();
1611 mxData->maToolFont = rFont;
1614 const vcl::Font&
1615 StyleSettings::GetToolFont() const
1617 return mxData->maToolFont;
1620 void
1621 StyleSettings::SetGroupFont( const vcl::Font& rFont )
1623 CopyData();
1624 mxData->maGroupFont = rFont;
1627 const vcl::Font&
1628 StyleSettings::GetGroupFont() const
1630 return mxData->maGroupFont;
1633 void
1634 StyleSettings::SetLabelFont( const vcl::Font& rFont )
1636 CopyData();
1637 mxData->maLabelFont = rFont;
1640 const vcl::Font&
1641 StyleSettings::GetLabelFont() const
1643 return mxData->maLabelFont;
1646 void
1647 StyleSettings::SetRadioCheckFont( const vcl::Font& rFont )
1649 CopyData();
1650 mxData->maRadioCheckFont = rFont;
1653 const vcl::Font&
1654 StyleSettings::GetRadioCheckFont() const
1656 return mxData->maRadioCheckFont;
1659 void
1660 StyleSettings::SetPushButtonFont( const vcl::Font& rFont )
1662 CopyData();
1663 mxData->maPushButtonFont = rFont;
1666 const vcl::Font&
1667 StyleSettings::GetPushButtonFont() const
1669 return mxData->maPushButtonFont;
1672 void
1673 StyleSettings::SetFieldFont( const vcl::Font& rFont )
1675 CopyData();
1676 mxData->maFieldFont = rFont;
1679 const vcl::Font&
1680 StyleSettings::GetFieldFont() const
1682 return mxData->maFieldFont;
1685 void
1686 StyleSettings::SetIconFont( const vcl::Font& rFont )
1688 CopyData();
1689 mxData->maIconFont = rFont;
1692 const vcl::Font&
1693 StyleSettings::GetIconFont() const
1695 return mxData->maIconFont;
1698 void
1699 StyleSettings::SetTabFont( const vcl::Font& rFont )
1701 CopyData();
1702 mxData->maTabFont = rFont;
1705 const vcl::Font&
1706 StyleSettings::GetTabFont() const
1708 return mxData->maTabFont;
1711 long
1712 StyleSettings::GetBorderSize()
1714 return 1;
1717 void
1718 StyleSettings::SetTitleHeight( long nSize )
1720 CopyData();
1721 mxData->mnTitleHeight = nSize;
1724 long
1725 StyleSettings::GetTitleHeight() const
1727 return mxData->mnTitleHeight;
1730 void
1731 StyleSettings::SetFloatTitleHeight( long nSize )
1733 CopyData();
1734 mxData->mnFloatTitleHeight = nSize;
1737 long
1738 StyleSettings::GetFloatTitleHeight() const
1740 return mxData->mnFloatTitleHeight;
1743 void
1744 StyleSettings::SetScrollBarSize( long nSize )
1746 CopyData();
1747 mxData->mnScrollBarSize = nSize;
1750 long
1751 StyleSettings::GetScrollBarSize() const
1753 return mxData->mnScrollBarSize;
1756 void
1757 StyleSettings::SetMinThumbSize( long nSize )
1759 CopyData();
1760 mxData->mnMinThumbSize = nSize;
1763 long
1764 StyleSettings::GetMinThumbSize() const
1766 return mxData->mnMinThumbSize;
1769 void
1770 StyleSettings::SetSpinSize( long nSize )
1772 CopyData();
1773 mxData->mnSpinSize = nSize;
1776 long
1777 StyleSettings::GetSpinSize() const
1779 return mxData->mnSpinSize;
1782 long
1783 StyleSettings::GetSplitSize()
1785 return 3;
1788 void
1789 StyleSettings::SetCursorSize( long nSize )
1791 CopyData();
1792 mxData->mnCursorSize = nSize;
1795 long
1796 StyleSettings::GetCursorSize() const
1798 return mxData->mnCursorSize;
1801 void
1802 StyleSettings::SetCursorBlinkTime( sal_uInt64 nBlinkTime )
1804 CopyData();
1805 mxData->mnCursorBlinkTime = nBlinkTime;
1808 sal_uInt64
1809 StyleSettings::GetCursorBlinkTime() const
1811 return static_cast<long>(mxData->mnCursorBlinkTime);
1814 void
1815 StyleSettings::SetDragFullOptions( DragFullOptions nOptions )
1817 CopyData();
1818 mxData->mnDragFullOptions = nOptions;
1821 DragFullOptions
1822 StyleSettings::GetDragFullOptions() const
1824 return mxData->mnDragFullOptions;
1827 void
1828 StyleSettings::SetSelectionOptions( SelectionOptions nOptions )
1830 CopyData();
1831 mxData->mnSelectionOptions = nOptions;
1834 SelectionOptions
1835 StyleSettings::GetSelectionOptions() const
1837 return mxData->mnSelectionOptions;
1840 void
1841 StyleSettings::SetDisplayOptions( DisplayOptions nOptions )
1843 CopyData();
1844 mxData->mnDisplayOptions = nOptions;
1847 DisplayOptions
1848 StyleSettings::GetDisplayOptions() const
1850 return mxData->mnDisplayOptions;
1853 void
1854 StyleSettings::SetAntialiasingMinPixelHeight( long nMinPixel )
1856 CopyData();
1857 mxData->mnAntialiasedMin = nMinPixel;
1860 sal_uLong
1861 StyleSettings::GetAntialiasingMinPixelHeight() const
1863 return mxData->mnAntialiasedMin;
1866 void
1867 StyleSettings::SetOptions( StyleSettingsOptions nOptions )
1869 CopyData();
1870 mxData->mnOptions = nOptions;
1873 void
1874 StyleSettings::SetAutoMnemonic( bool bAutoMnemonic )
1876 CopyData();
1877 mxData->mbAutoMnemonic = bAutoMnemonic;
1880 bool
1881 StyleSettings::GetAutoMnemonic() const
1883 return mxData->mbAutoMnemonic;
1886 bool
1887 StyleSettings::GetDockingFloatsSupported()
1889 ImplSVData* pSVData = ImplGetSVData();
1890 return pSVData->maNWFData.mbCanDetermineWindowPosition;
1893 void
1894 StyleSettings::SetFontColor( const Color& rColor )
1896 CopyData();
1897 mxData->maFontColor = rColor;
1900 const Color&
1901 StyleSettings::GetFontColor() const
1903 return mxData->maFontColor;
1906 void
1907 StyleSettings::SetToolbarIconSize( ToolbarIconSize nSize )
1909 CopyData();
1910 mxData->mnToolbarIconSize = nSize;
1913 ToolbarIconSize
1914 StyleSettings::GetToolbarIconSize() const
1916 return mxData->mnToolbarIconSize;
1919 const DialogStyle&
1920 StyleSettings::GetDialogStyle() const
1922 return mxData->maDialogStyle;
1925 void
1926 StyleSettings::SetEdgeBlending(sal_uInt16 nCount)
1928 CopyData();
1929 mxData->mnEdgeBlending = nCount;
1932 sal_uInt16
1933 StyleSettings::GetEdgeBlending() const
1935 return mxData->mnEdgeBlending;
1938 const Color&
1939 StyleSettings::GetEdgeBlendingTopLeftColor() const
1941 return mxData->maEdgeBlendingTopLeftColor;
1944 const Color&
1945 StyleSettings::GetEdgeBlendingBottomRightColor() const
1947 return mxData->maEdgeBlendingBottomRightColor;
1950 void
1951 StyleSettings::SetListBoxMaximumLineCount(sal_uInt16 nCount)
1953 CopyData();
1954 mxData->mnListBoxMaximumLineCount = nCount;
1957 sal_uInt16
1958 StyleSettings::GetListBoxMaximumLineCount() const
1960 return mxData->mnListBoxMaximumLineCount;
1963 void
1964 StyleSettings::SetColorValueSetColumnCount(sal_uInt16 nCount)
1966 CopyData();
1967 mxData->mnColorValueSetColumnCount = nCount;
1970 sal_uInt16
1971 StyleSettings::GetColorValueSetColumnCount() const
1973 return mxData->mnColorValueSetColumnCount;
1976 sal_uInt16
1977 StyleSettings::GetColorValueSetMaximumRowCount()
1979 return 10;
1982 sal_uInt16
1983 StyleSettings::GetListBoxPreviewDefaultLineWidth()
1985 return 1;
1988 void
1989 StyleSettings::SetPreviewUsesCheckeredBackground(bool bNew)
1991 CopyData();
1992 mxData->mbPreviewUsesCheckeredBackground = bNew;
1995 bool
1996 StyleSettings::GetPreviewUsesCheckeredBackground() const
1998 return mxData->mbPreviewUsesCheckeredBackground;
2001 bool
2002 StyleSettings::operator !=( const StyleSettings& rSet ) const
2004 return !(*this == rSet);
2007 void StyleSettings::SetListBoxPreviewDefaultLogicSize(Size const& rSize)
2009 mxData->maListBoxPreviewDefaultLogicSize = rSize;
2012 const Size& StyleSettings::GetListBoxPreviewDefaultPixelSize() const
2014 if(0 == mxData->maListBoxPreviewDefaultPixelSize.Width() || 0 == mxData->maListBoxPreviewDefaultPixelSize.Height())
2016 const_cast< StyleSettings* >(this)->mxData->maListBoxPreviewDefaultPixelSize =
2017 Application::GetDefaultDevice()->LogicToPixel(mxData->maListBoxPreviewDefaultLogicSize, MapMode(MapUnit::MapAppFont));
2020 return mxData->maListBoxPreviewDefaultPixelSize;
2023 void StyleSettings::Set3DColors( const Color& rColor )
2025 CopyData();
2026 mxData->maFaceColor = rColor;
2027 mxData->maLightBorderColor = rColor;
2028 mxData->maMenuBorderColor = rColor;
2029 mxData->maDarkShadowColor = COL_BLACK;
2030 if ( rColor != COL_LIGHTGRAY )
2032 mxData->maLightColor = rColor;
2033 mxData->maShadowColor = rColor;
2034 mxData->maDarkShadowColor=rColor;
2035 mxData->maLightColor.IncreaseLuminance( 64 );
2036 mxData->maShadowColor.DecreaseLuminance( 64 );
2037 mxData->maDarkShadowColor.DecreaseLuminance( 100 );
2038 sal_uLong nRed = mxData->maLightColor.GetRed();
2039 sal_uLong nGreen = mxData->maLightColor.GetGreen();
2040 sal_uLong nBlue = mxData->maLightColor.GetBlue();
2041 nRed += static_cast<sal_uLong>(mxData->maShadowColor.GetRed());
2042 nGreen += static_cast<sal_uLong>(mxData->maShadowColor.GetGreen());
2043 nBlue += static_cast<sal_uLong>(mxData->maShadowColor.GetBlue());
2044 mxData->maCheckedColor = Color( static_cast<sal_uInt8>(nRed/2), static_cast<sal_uInt8>(nGreen/2), static_cast<sal_uInt8>(nBlue/2) );
2046 else
2048 mxData->maCheckedColor = Color( 0x99, 0x99, 0x99 );
2049 mxData->maLightColor = COL_WHITE;
2050 mxData->maShadowColor = COL_GRAY;
2054 void StyleSettings::SetCheckedColorSpecialCase( )
2056 CopyData();
2057 // Light gray checked color special case
2058 if ( GetFaceColor() == COL_LIGHTGRAY )
2059 mxData->maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
2060 else
2062 sal_uInt8 nRed = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetRed()) + static_cast<sal_uInt16>(mxData->maLightColor.GetRed()))/2);
2063 sal_uInt8 nGreen = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetGreen()) + static_cast<sal_uInt16>(mxData->maLightColor.GetGreen()))/2);
2064 sal_uInt8 nBlue = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetBlue()) + static_cast<sal_uInt16>(mxData->maLightColor.GetBlue()))/2);
2065 mxData->maCheckedColor = Color( nRed, nGreen, nBlue );
2069 bool StyleSettings::GetUseImagesInMenus() const
2071 // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
2072 switch (mxData->meUseImagesInMenus) {
2073 case TRISTATE_FALSE:
2074 return false;
2075 case TRISTATE_TRUE:
2076 return true;
2077 default: // TRISTATE_INDET:
2078 return GetPreferredUseImagesInMenus();
2082 static BitmapEx readBitmapEx( const OUString& rPath )
2084 OUString aPath( rPath );
2085 rtl::Bootstrap::expandMacros( aPath );
2087 // import the image
2088 Graphic aGraphic;
2089 if ( GraphicFilter::LoadGraphic( aPath, OUString(), aGraphic ) != ERRCODE_NONE )
2090 return BitmapEx();
2091 return aGraphic.GetBitmapEx();
2094 enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
2096 /** Update the setting of the Persona header / footer in ImplStyleData */
2097 static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, boost::optional<Color>& rMenuBarTextColor )
2099 uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
2100 if ( !xContext.is() )
2101 return;
2103 // don't burn time loading images we don't need.
2104 if ( Application::IsHeadlessModeEnabled() )
2105 return;
2107 // read from the configuration
2108 OUString aPersona( officecfg::Office::Common::Misc::Persona::get( xContext ) );
2109 OUString aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get( xContext ) );
2111 // have the settings changed? marks if header /footer prepared before
2112 //should maybe extended to a flag that marks if header /footer /both are loaded
2113 OUString aOldValue= eWhich==PERSONA_HEADER?OUString(aPersona + ";" + aPersonaSettings+";h" ):OUString(aPersona + ";" + aPersonaSettings+";f" );
2114 if ( rHeaderFooter == aOldValue )
2115 return;
2117 rHeaderFooter = aOldValue;
2118 rHeaderFooterBitmap = BitmapEx();
2119 rMenuBarTextColor.reset();
2121 // now read the new values and setup bitmaps
2122 OUString aHeader, aFooter;
2123 if ( aPersona == "own" || aPersona == "default" )
2125 sal_Int32 nIndex = 0;
2127 // Skip the persona slug, name, and preview
2128 aHeader = aPersonaSettings.getToken( 3, ';', nIndex );
2130 if ( nIndex > 0 )
2131 aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
2133 // change menu text color, advance nIndex to skip the '#'
2134 if ( nIndex > 0 )
2136 OUString aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
2137 rMenuBarTextColor = Color( aColor.toUInt32( 16 ) );
2141 OUString aName;
2142 switch ( eWhich ) {
2143 case PERSONA_HEADER: aName = aHeader; break;
2144 case PERSONA_FOOTER: aName = aFooter; break;
2147 if ( !aName.isEmpty() )
2149 OUString gallery("");
2150 // try the gallery first, then the program path:
2151 if ( aPersona == "own" && !aPersonaSettings.startsWith( "vnd.sun.star.expand" ) )
2153 gallery = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
2154 rtl::Bootstrap::expandMacros( gallery );
2155 gallery += "/user/gallery/personas/";
2157 else if ( aPersona == "default" )
2159 gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/";
2161 rHeaderFooterBitmap = readBitmapEx( gallery + aName );
2163 if ( rHeaderFooterBitmap.IsEmpty() )
2164 rHeaderFooterBitmap = readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" + aName );
2167 // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
2169 if( rHeaderFooterBitmap.IsEmpty() )
2171 std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
2172 officecfg::Office::Common::Misc::Persona::set( "no", batch );
2173 officecfg::Office::Common::Misc::PersonaSettings::set( "", batch );
2174 batch->commit();
2178 BitmapEx const & StyleSettings::GetPersonaHeader() const
2180 setupPersonaHeaderFooter( PERSONA_HEADER, mxData->maPersonaHeaderFooter, mxData->maPersonaHeaderBitmap, mxData->maPersonaMenuBarTextColor );
2181 return mxData->maPersonaHeaderBitmap;
2184 BitmapEx const & StyleSettings::GetPersonaFooter() const
2186 setupPersonaHeaderFooter( PERSONA_FOOTER, mxData->maPersonaHeaderFooter, mxData->maPersonaFooterBitmap, mxData->maPersonaMenuBarTextColor );
2187 return mxData->maPersonaFooterBitmap;
2190 const boost::optional<Color>& StyleSettings::GetPersonaMenuBarTextColor() const
2192 GetPersonaHeader();
2193 return mxData->maPersonaMenuBarTextColor;
2196 void StyleSettings::SetStandardStyles()
2198 CopyData();
2199 mxData->SetStandardStyles();
2202 Color StyleSettings::GetFaceGradientColor() const
2204 // compute a brighter face color that can be used in gradients
2205 // for a convex look (eg toolbars)
2207 sal_uInt16 h, s, b;
2208 GetFaceColor().RGBtoHSB( h, s, b );
2209 if( s > 1) s=1;
2210 if( b < 98) b=98;
2211 return Color::HSBtoRGB( h, s, b );
2214 Color StyleSettings::GetSeparatorColor() const
2216 // compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
2217 sal_uInt16 h, s, b;
2218 GetShadowColor().RGBtoHSB( h, s, b );
2219 b += b/4;
2220 s -= s/4;
2221 return Color::HSBtoRGB( h, s, b );
2224 void StyleSettings::CopyData()
2226 // copy if other references exist
2227 if (mxData.use_count() > 1)
2229 mxData = std::make_shared<ImplStyleData>(*mxData);
2233 bool StyleSettings::operator ==( const StyleSettings& rSet ) const
2235 if ( mxData == rSet.mxData )
2236 return true;
2238 if (mxData->mIconTheme != rSet.mxData->mIconTheme) {
2239 return false;
2242 if (*mxData->mIconThemeSelector != *rSet.mxData->mIconThemeSelector) {
2243 return false;
2246 return (mxData->mnOptions == rSet.mxData->mnOptions) &&
2247 (mxData->mbAutoMnemonic == rSet.mxData->mbAutoMnemonic) &&
2248 (mxData->mnDragFullOptions == rSet.mxData->mnDragFullOptions) &&
2249 (mxData->mnSelectionOptions == rSet.mxData->mnSelectionOptions) &&
2250 (mxData->mnDisplayOptions == rSet.mxData->mnDisplayOptions) &&
2251 (mxData->mnCursorSize == rSet.mxData->mnCursorSize) &&
2252 (mxData->mnCursorBlinkTime == rSet.mxData->mnCursorBlinkTime) &&
2253 (mxData->mnTitleHeight == rSet.mxData->mnTitleHeight) &&
2254 (mxData->mnFloatTitleHeight == rSet.mxData->mnFloatTitleHeight) &&
2255 (mxData->mnScrollBarSize == rSet.mxData->mnScrollBarSize) &&
2256 (mxData->mnMinThumbSize == rSet.mxData->mnMinThumbSize) &&
2257 (mxData->mnSpinSize == rSet.mxData->mnSpinSize) &&
2258 (mxData->mnAntialiasedMin == rSet.mxData->mnAntialiasedMin) &&
2259 (mxData->mbHighContrast == rSet.mxData->mbHighContrast) &&
2260 (mxData->mbUseSystemUIFonts == rSet.mxData->mbUseSystemUIFonts) &&
2261 (mxData->mbUseFontAAFromSystem == rSet.mxData->mbUseFontAAFromSystem) &&
2262 (mxData->mnUseFlatBorders == rSet.mxData->mnUseFlatBorders) &&
2263 (mxData->mnUseFlatMenus == rSet.mxData->mnUseFlatMenus) &&
2264 (mxData->maFaceColor == rSet.mxData->maFaceColor) &&
2265 (mxData->maCheckedColor == rSet.mxData->maCheckedColor) &&
2266 (mxData->maLightColor == rSet.mxData->maLightColor) &&
2267 (mxData->maLightBorderColor == rSet.mxData->maLightBorderColor) &&
2268 (mxData->maShadowColor == rSet.mxData->maShadowColor) &&
2269 (mxData->maDarkShadowColor == rSet.mxData->maDarkShadowColor) &&
2270 (mxData->maButtonTextColor == rSet.mxData->maButtonTextColor) &&
2271 (mxData->maDefaultActionButtonTextColor == rSet.mxData->maDefaultActionButtonTextColor) &&
2272 (mxData->maActionButtonTextColor == rSet.mxData->maActionButtonTextColor) &&
2273 (mxData->maButtonRolloverTextColor == rSet.mxData->maButtonRolloverTextColor) &&
2274 (mxData->maActionButtonRolloverTextColor == rSet.mxData->maActionButtonRolloverTextColor) &&
2275 (mxData->maRadioCheckTextColor == rSet.mxData->maRadioCheckTextColor) &&
2276 (mxData->maGroupTextColor == rSet.mxData->maGroupTextColor) &&
2277 (mxData->maLabelTextColor == rSet.mxData->maLabelTextColor) &&
2278 (mxData->maWindowColor == rSet.mxData->maWindowColor) &&
2279 (mxData->maWindowTextColor == rSet.mxData->maWindowTextColor) &&
2280 (mxData->maDialogColor == rSet.mxData->maDialogColor) &&
2281 (mxData->maDialogTextColor == rSet.mxData->maDialogTextColor) &&
2282 (mxData->maWorkspaceColor == rSet.mxData->maWorkspaceColor) &&
2283 (mxData->maMonoColor == rSet.mxData->maMonoColor) &&
2284 (mxData->maFieldColor == rSet.mxData->maFieldColor) &&
2285 (mxData->maFieldTextColor == rSet.mxData->maFieldTextColor) &&
2286 (mxData->maActiveColor == rSet.mxData->maActiveColor) &&
2287 (mxData->maActiveTextColor == rSet.mxData->maActiveTextColor) &&
2288 (mxData->maActiveBorderColor == rSet.mxData->maActiveBorderColor) &&
2289 (mxData->maDeactiveColor == rSet.mxData->maDeactiveColor) &&
2290 (mxData->maDeactiveTextColor == rSet.mxData->maDeactiveTextColor) &&
2291 (mxData->maDeactiveBorderColor == rSet.mxData->maDeactiveBorderColor) &&
2292 (mxData->maMenuColor == rSet.mxData->maMenuColor) &&
2293 (mxData->maMenuBarColor == rSet.mxData->maMenuBarColor) &&
2294 (mxData->maMenuBarRolloverColor == rSet.mxData->maMenuBarRolloverColor) &&
2295 (mxData->maMenuBorderColor == rSet.mxData->maMenuBorderColor) &&
2296 (mxData->maMenuTextColor == rSet.mxData->maMenuTextColor) &&
2297 (mxData->maMenuBarTextColor == rSet.mxData->maMenuBarTextColor) &&
2298 (mxData->maMenuBarRolloverTextColor == rSet.mxData->maMenuBarRolloverTextColor) &&
2299 (mxData->maMenuHighlightColor == rSet.mxData->maMenuHighlightColor) &&
2300 (mxData->maMenuHighlightTextColor == rSet.mxData->maMenuHighlightTextColor) &&
2301 (mxData->maHighlightColor == rSet.mxData->maHighlightColor) &&
2302 (mxData->maHighlightTextColor == rSet.mxData->maHighlightTextColor) &&
2303 (mxData->maTabTextColor == rSet.mxData->maTabTextColor) &&
2304 (mxData->maTabRolloverTextColor == rSet.mxData->maTabRolloverTextColor) &&
2305 (mxData->maTabHighlightTextColor == rSet.mxData->maTabHighlightTextColor) &&
2306 (mxData->maActiveTabColor == rSet.mxData->maActiveTabColor) &&
2307 (mxData->maInactiveTabColor == rSet.mxData->maInactiveTabColor) &&
2308 (mxData->maDisableColor == rSet.mxData->maDisableColor) &&
2309 (mxData->maHelpColor == rSet.mxData->maHelpColor) &&
2310 (mxData->maHelpTextColor == rSet.mxData->maHelpTextColor) &&
2311 (mxData->maLinkColor == rSet.mxData->maLinkColor) &&
2312 (mxData->maVisitedLinkColor == rSet.mxData->maVisitedLinkColor) &&
2313 (mxData->maToolTextColor == rSet.mxData->maToolTextColor) &&
2314 (mxData->maHighlightLinkColor == rSet.mxData->maHighlightLinkColor) &&
2315 (mxData->maAppFont == rSet.mxData->maAppFont) &&
2316 (mxData->maHelpFont == rSet.mxData->maHelpFont) &&
2317 (mxData->maTitleFont == rSet.mxData->maTitleFont) &&
2318 (mxData->maFloatTitleFont == rSet.mxData->maFloatTitleFont) &&
2319 (mxData->maMenuFont == rSet.mxData->maMenuFont) &&
2320 (mxData->maToolFont == rSet.mxData->maToolFont) &&
2321 (mxData->maGroupFont == rSet.mxData->maGroupFont) &&
2322 (mxData->maLabelFont == rSet.mxData->maLabelFont) &&
2323 (mxData->maRadioCheckFont == rSet.mxData->maRadioCheckFont) &&
2324 (mxData->maPushButtonFont == rSet.mxData->maPushButtonFont) &&
2325 (mxData->maFieldFont == rSet.mxData->maFieldFont) &&
2326 (mxData->maIconFont == rSet.mxData->maIconFont) &&
2327 (mxData->maTabFont == rSet.mxData->maTabFont) &&
2328 (mxData->meUseImagesInMenus == rSet.mxData->meUseImagesInMenus) &&
2329 (mxData->mbPreferredUseImagesInMenus == rSet.mxData->mbPreferredUseImagesInMenus) &&
2330 (mxData->mbSkipDisabledInMenus == rSet.mxData->mbSkipDisabledInMenus) &&
2331 (mxData->mbHideDisabledMenuItems == rSet.mxData->mbHideDisabledMenuItems) &&
2332 (mxData->mbPreferredContextMenuShortcuts == rSet.mxData->mbPreferredContextMenuShortcuts)&&
2333 (mxData->meContextMenuShortcuts == rSet.mxData->meContextMenuShortcuts) &&
2334 (mxData->mbPrimaryButtonWarpsSlider == rSet.mxData->mbPrimaryButtonWarpsSlider) &&
2335 (mxData->maFontColor == rSet.mxData->maFontColor) &&
2336 (mxData->mnEdgeBlending == rSet.mxData->mnEdgeBlending) &&
2337 (mxData->maEdgeBlendingTopLeftColor == rSet.mxData->maEdgeBlendingTopLeftColor) &&
2338 (mxData->maEdgeBlendingBottomRightColor == rSet.mxData->maEdgeBlendingBottomRightColor) &&
2339 (mxData->mnListBoxMaximumLineCount == rSet.mxData->mnListBoxMaximumLineCount) &&
2340 (mxData->mnColorValueSetColumnCount == rSet.mxData->mnColorValueSetColumnCount) &&
2341 (mxData->maListBoxPreviewDefaultLogicSize == rSet.mxData->maListBoxPreviewDefaultLogicSize) &&
2342 (mxData->maListBoxPreviewDefaultPixelSize == rSet.mxData->maListBoxPreviewDefaultPixelSize) &&
2343 (mxData->mbPreviewUsesCheckeredBackground == rSet.mxData->mbPreviewUsesCheckeredBackground);
2346 ImplMiscData::ImplMiscData() :
2347 mnEnableATT(TRISTATE_INDET),
2348 mnDisablePrinting(TRISTATE_INDET)
2350 static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
2351 mbEnableLocalizedDecimalSep = (pEnv != nullptr);
2354 MiscSettings::MiscSettings()
2355 : mxData(std::make_shared<ImplMiscData>())
2359 bool MiscSettings::operator ==( const MiscSettings& rSet ) const
2361 if ( mxData == rSet.mxData )
2362 return true;
2364 return (mxData->mnEnableATT == rSet.mxData->mnEnableATT ) &&
2365 (mxData->mnDisablePrinting == rSet.mxData->mnDisablePrinting ) &&
2366 (mxData->mbEnableLocalizedDecimalSep == rSet.mxData->mbEnableLocalizedDecimalSep );
2369 bool
2370 MiscSettings::operator !=( const MiscSettings& rSet ) const
2372 return !(*this == rSet);
2375 bool MiscSettings::GetDisablePrinting() const
2377 if( mxData->mnDisablePrinting == TRISTATE_INDET )
2379 OUString aEnable =
2380 vcl::SettingsConfigItem::get()->
2381 getValue( "DesktopManagement",
2382 "DisablePrinting" );
2383 mxData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2386 return mxData->mnDisablePrinting != TRISTATE_FALSE;
2389 bool MiscSettings::GetEnableATToolSupport() const
2392 #ifdef _WIN32
2393 if( mxData->mnEnableATT == TRISTATE_INDET )
2395 // Check in the Windows registry if an AT tool wants Accessibility support to
2396 // be activated ..
2397 HKEY hkey;
2399 if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2400 L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2401 &hkey) )
2403 DWORD dwType;
2404 wchar_t Data[6]; // possible values: "true", "false", "1", "0", DWORD
2405 DWORD cbData = sizeof(Data);
2407 if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2408 nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2410 switch (dwType)
2412 case REG_SZ:
2413 mxData->mnEnableATT = ((0 == wcsicmp(Data, L"1")) || (0 == wcsicmp(Data, L"true"))) ? TRISTATE_TRUE : TRISTATE_FALSE;
2414 break;
2415 case REG_DWORD:
2416 switch (reinterpret_cast<DWORD *>(Data)[0]) {
2417 case 0:
2418 mxData->mnEnableATT = TRISTATE_FALSE;
2419 break;
2420 case 1:
2421 mxData->mnEnableATT = TRISTATE_TRUE;
2422 break;
2423 default:
2424 mxData->mnEnableATT = TRISTATE_INDET;
2425 //TODO: or TRISTATE_TRUE?
2426 break;
2428 break;
2429 default:
2430 // Unsupported registry type
2431 break;
2435 RegCloseKey(hkey);
2438 #endif
2440 if( mxData->mnEnableATT == TRISTATE_INDET )
2442 static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
2443 if( !pEnv || !*pEnv )
2445 OUString aEnable =
2446 vcl::SettingsConfigItem::get()->
2447 getValue( "Accessibility",
2448 "EnableATToolSupport" );
2449 mxData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2451 else
2453 mxData->mnEnableATT = TRISTATE_TRUE;
2457 return mxData->mnEnableATT != TRISTATE_FALSE;
2460 #ifdef _WIN32
2461 void MiscSettings::SetEnableATToolSupport( bool bEnable )
2463 if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mxData->mnEnableATT )
2465 if( bEnable && !ImplInitAccessBridge() )
2466 return;
2468 HKEY hkey;
2470 // If the accessibility key in the Windows registry exists, change it synchronously
2471 if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2472 L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2473 &hkey) )
2475 DWORD dwType;
2476 wchar_t Data[6]; // possible values: "true", "false", 1, 0
2477 DWORD cbData = sizeof(Data);
2479 if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2480 nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2482 switch (dwType)
2484 case REG_SZ:
2485 RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2486 0, dwType,
2487 reinterpret_cast<const BYTE*>(bEnable ? L"true" : L"false"),
2488 bEnable ? sizeof(L"true") : sizeof(L"false"));
2489 break;
2490 case REG_DWORD:
2491 reinterpret_cast<DWORD *>(Data)[0] = bEnable ? 1 : 0;
2492 RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2493 0, dwType, reinterpret_cast<const BYTE*>(Data), sizeof(DWORD));
2494 break;
2495 default:
2496 // Unsupported registry type
2497 break;
2501 RegCloseKey(hkey);
2504 vcl::SettingsConfigItem::get()->
2505 setValue( "Accessibility",
2506 "EnableATToolSupport",
2507 bEnable ? OUString("true") : OUString("false" ) );
2508 mxData->mnEnableATT = bEnable ? TRISTATE_TRUE : TRISTATE_FALSE;
2511 #endif
2513 void MiscSettings::SetEnableLocalizedDecimalSep( bool bEnable )
2515 // copy if other references exist
2516 if (mxData.use_count() > 1)
2518 mxData = std::make_shared<ImplMiscData>(*mxData);
2520 mxData->mbEnableLocalizedDecimalSep = bEnable;
2523 bool MiscSettings::GetEnableLocalizedDecimalSep() const
2525 return mxData->mbEnableLocalizedDecimalSep;
2528 HelpSettings::HelpSettings()
2529 : mxData(std::make_shared<ImplHelpData>())
2533 bool HelpSettings::operator ==( const HelpSettings& rSet ) const
2535 if ( mxData == rSet.mxData )
2536 return true;
2538 return (mxData->mnTipTimeout == rSet.mxData->mnTipTimeout );
2541 sal_uLong
2542 HelpSettings::GetTipDelay()
2544 return 500;
2547 void
2548 HelpSettings::SetTipTimeout( sal_uLong nTipTimeout )
2550 // copy if other references exist
2551 if (mxData.use_count() > 1)
2553 mxData = std::make_shared<ImplHelpData>(*mxData);
2555 mxData->mnTipTimeout = nTipTimeout;
2558 sal_uLong
2559 HelpSettings::GetTipTimeout() const
2561 return mxData->mnTipTimeout;
2564 sal_uLong
2565 HelpSettings::GetBalloonDelay()
2567 return 1500;
2570 bool
2571 HelpSettings::operator !=( const HelpSettings& rSet ) const
2573 return !(*this == rSet);
2576 ImplAllSettingsData::ImplAllSettingsData()
2578 maLocale( LANGUAGE_SYSTEM ),
2579 maUILocale( LANGUAGE_SYSTEM )
2581 if (!utl::ConfigManager::IsFuzzing())
2582 maMiscSettings.SetEnableLocalizedDecimalSep( maSysLocale.GetOptions().IsDecimalSeparatorAsLocale() );
2585 ImplAllSettingsData::ImplAllSettingsData( const ImplAllSettingsData& rData ) :
2586 maMouseSettings( rData.maMouseSettings ),
2587 maStyleSettings( rData.maStyleSettings ),
2588 maMiscSettings( rData.maMiscSettings ),
2589 maHelpSettings( rData.maHelpSettings ),
2590 maLocale( rData.maLocale ),
2591 maUILocale( rData.maUILocale )
2593 // Create the cache objects new when their getter is called.
2596 ImplAllSettingsData::~ImplAllSettingsData()
2598 mpLocaleDataWrapper.reset();
2599 mpUILocaleDataWrapper.reset();
2600 mpI18nHelper.reset();
2601 mpUII18nHelper.reset();
2604 AllSettings::AllSettings()
2605 : mxData(std::make_shared<ImplAllSettingsData>())
2609 void AllSettings::CopyData()
2611 // copy if other references exist
2612 if (mxData.use_count() > 1)
2614 mxData = std::make_shared<ImplAllSettingsData>(*mxData);
2619 AllSettingsFlags AllSettings::Update( AllSettingsFlags nFlags, const AllSettings& rSet )
2622 AllSettingsFlags nChangeFlags = AllSettingsFlags::NONE;
2624 if ( nFlags & AllSettingsFlags::MOUSE )
2626 if ( mxData->maMouseSettings != rSet.mxData->maMouseSettings )
2628 CopyData();
2629 mxData->maMouseSettings = rSet.mxData->maMouseSettings;
2630 nChangeFlags |= AllSettingsFlags::MOUSE;
2634 if ( nFlags & AllSettingsFlags::STYLE )
2636 if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2638 CopyData();
2639 mxData->maStyleSettings = rSet.mxData->maStyleSettings;
2640 nChangeFlags |= AllSettingsFlags::STYLE;
2644 if ( nFlags & AllSettingsFlags::MISC )
2646 if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2648 CopyData();
2649 mxData->maMiscSettings = rSet.mxData->maMiscSettings;
2650 nChangeFlags |= AllSettingsFlags::MISC;
2654 if ( nFlags & AllSettingsFlags::LOCALE )
2656 if ( mxData->maLocale != rSet.mxData->maLocale )
2658 SetLanguageTag( rSet.mxData->maLocale );
2659 nChangeFlags |= AllSettingsFlags::LOCALE;
2663 return nChangeFlags;
2666 AllSettingsFlags AllSettings::GetChangeFlags( const AllSettings& rSet ) const
2669 AllSettingsFlags nChangeFlags = AllSettingsFlags::NONE;
2671 if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2672 nChangeFlags |= AllSettingsFlags::STYLE;
2674 if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2675 nChangeFlags |= AllSettingsFlags::MISC;
2677 if ( mxData->maLocale != rSet.mxData->maLocale )
2678 nChangeFlags |= AllSettingsFlags::LOCALE;
2680 return nChangeFlags;
2683 bool AllSettings::operator ==( const AllSettings& rSet ) const
2685 if ( mxData == rSet.mxData )
2686 return true;
2688 if ( (mxData->maMouseSettings == rSet.mxData->maMouseSettings) &&
2689 (mxData->maStyleSettings == rSet.mxData->maStyleSettings) &&
2690 (mxData->maMiscSettings == rSet.mxData->maMiscSettings) &&
2691 (mxData->maHelpSettings == rSet.mxData->maHelpSettings) &&
2692 (mxData->maLocale == rSet.mxData->maLocale) )
2694 return true;
2697 return false;
2700 void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag )
2702 if (mxData->maLocale != rLanguageTag)
2704 CopyData();
2706 mxData->maLocale = rLanguageTag;
2708 if ( mxData->mpLocaleDataWrapper )
2710 mxData->mpLocaleDataWrapper.reset();
2712 if ( mxData->mpI18nHelper )
2714 mxData->mpI18nHelper.reset();
2719 namespace
2721 bool GetConfigLayoutRTL(bool bMath)
2723 static const char* pEnv = getenv("SAL_RTL_ENABLED" );
2724 static int nUIMirroring = -1; // -1: undef, 0: auto, 1: on 2: off
2726 // environment always overrides
2727 if( pEnv )
2728 return true;
2730 bool bRTL = false;
2732 if( nUIMirroring == -1 )
2734 nUIMirroring = 0; // ask configuration only once
2735 utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithComponentContext(
2736 comphelper::getProcessComponentContext(),
2737 "org.openoffice.Office.Common/I18N/CTL" ); // note: case sensitive !
2738 if ( aNode.isValid() )
2740 bool bTmp = bool();
2741 css::uno::Any aValue = aNode.getNodeValue( "UIMirroring" );
2742 if( aValue >>= bTmp )
2744 // found true or false; if it was nil, nothing is changed
2745 nUIMirroring = bTmp ? 1 : 2;
2750 if( nUIMirroring == 0 ) // no config found (eg, setup) or default (nil) was set: check language
2752 LanguageType aLang = SvtSysLocaleOptions().GetRealUILanguageTag().getLanguageType();
2753 if (bMath)
2754 bRTL = MsLangId::isRightToLeftMath( aLang );
2755 else
2756 bRTL = MsLangId::isRightToLeft( aLang );
2758 else
2759 bRTL = (nUIMirroring == 1);
2761 return bRTL;
2765 bool AllSettings::GetLayoutRTL()
2767 if (utl::ConfigManager::IsFuzzing())
2768 return false;
2769 return GetConfigLayoutRTL(false);
2772 bool AllSettings::GetMathLayoutRTL()
2774 if (utl::ConfigManager::IsFuzzing())
2775 return false;
2776 return GetConfigLayoutRTL(true);
2779 const LanguageTag& AllSettings::GetLanguageTag() const
2781 if (utl::ConfigManager::IsFuzzing())
2783 static LanguageTag aRet("en-US");
2784 return aRet;
2787 if (comphelper::LibreOfficeKit::isActive())
2788 return comphelper::LibreOfficeKit::getLanguageTag();
2790 // SYSTEM locale means: use settings from SvtSysLocale that is resolved
2791 if ( mxData->maLocale.isSystemLocale() )
2792 mxData->maLocale = mxData->maSysLocale.GetLanguageTag();
2794 return mxData->maLocale;
2797 const LanguageTag& AllSettings::GetUILanguageTag() const
2799 if (utl::ConfigManager::IsFuzzing())
2801 static LanguageTag aRet("en-US");
2802 return aRet;
2805 if (comphelper::LibreOfficeKit::isActive())
2806 return comphelper::LibreOfficeKit::getLanguageTag();
2808 // the UILocale is never changed
2809 if ( mxData->maUILocale.isSystemLocale() )
2810 mxData->maUILocale = mxData->maSysLocale.GetUILanguageTag();
2812 return mxData->maUILocale;
2815 const LocaleDataWrapper& AllSettings::GetLocaleDataWrapper() const
2817 if ( !mxData->mpLocaleDataWrapper )
2818 const_cast<AllSettings*>(this)->mxData->mpLocaleDataWrapper.reset( new LocaleDataWrapper(
2819 comphelper::getProcessComponentContext(), GetLanguageTag() ) );
2820 return *mxData->mpLocaleDataWrapper;
2823 const LocaleDataWrapper& AllSettings::GetUILocaleDataWrapper() const
2825 if ( !mxData->mpUILocaleDataWrapper )
2826 const_cast<AllSettings*>(this)->mxData->mpUILocaleDataWrapper.reset( new LocaleDataWrapper(
2827 comphelper::getProcessComponentContext(), GetUILanguageTag() ) );
2828 return *mxData->mpUILocaleDataWrapper;
2831 const vcl::I18nHelper& AllSettings::GetLocaleI18nHelper() const
2833 if ( !mxData->mpI18nHelper ) {
2834 const_cast<AllSettings*>(this)->mxData->mpI18nHelper.reset( new vcl::I18nHelper(
2835 comphelper::getProcessComponentContext(), GetLanguageTag() ) );
2837 return *mxData->mpI18nHelper;
2840 const vcl::I18nHelper& AllSettings::GetUILocaleI18nHelper() const
2842 if ( !mxData->mpUII18nHelper ) {
2843 const_cast<AllSettings*>(this)->mxData->mpUII18nHelper.reset( new vcl::I18nHelper(
2844 comphelper::getProcessComponentContext(), GetUILanguageTag() ) );
2846 return *mxData->mpUII18nHelper;
2849 void AllSettings::LocaleSettingsChanged( ConfigurationHints nHint )
2851 AllSettings aAllSettings( Application::GetSettings() );
2852 if ( nHint & ConfigurationHints::DecSep )
2854 MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
2855 bool bIsDecSepAsLocale = aAllSettings.mxData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale();
2856 if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale )
2858 aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale );
2859 aAllSettings.SetMiscSettings( aMiscSettings );
2863 if ( nHint & ConfigurationHints::Locale )
2864 aAllSettings.SetLanguageTag( aAllSettings.mxData->maSysLocale.GetOptions().GetLanguageTag() );
2866 Application::SetSettings( aAllSettings );
2869 const StyleSettings&
2870 AllSettings::GetStyleSettings() const
2872 return mxData->maStyleSettings;
2875 StyleSettingsOptions
2876 StyleSettings::GetOptions() const
2878 return mxData->mnOptions;
2881 std::vector<vcl::IconThemeInfo> const &
2882 StyleSettings::GetInstalledIconThemes() const
2884 if (!mxData->mIconThemeScanner) {
2885 const_cast<StyleSettings*>(this)->mxData->mIconThemeScanner = vcl::IconThemeScanner::Create(vcl::IconThemeScanner::GetStandardIconThemePath());
2887 return mxData->mIconThemeScanner->GetFoundIconThemes();
2890 /*static*/ OUString
2891 StyleSettings::GetAutomaticallyChosenIconTheme() const
2893 OUString desktopEnvironment = Application::GetDesktopEnvironment();
2894 if (!mxData->mIconThemeScanner) {
2895 const_cast<StyleSettings*>(this)->mxData->mIconThemeScanner = vcl::IconThemeScanner::Create(vcl::IconThemeScanner::GetStandardIconThemePath());
2897 OUString themeName = mxData->mIconThemeSelector->SelectIconThemeForDesktopEnvironment(
2898 mxData->mIconThemeScanner->GetFoundIconThemes(),
2899 desktopEnvironment
2901 return themeName;
2904 void
2905 StyleSettings::SetIconTheme(const OUString& theme)
2907 CopyData();
2908 mxData->mIconTheme = theme;
2911 OUString
2912 StyleSettings::DetermineIconTheme() const
2914 OUString sTheme(mxData->mIconTheme);
2915 if (sTheme.isEmpty())
2917 if (utl::ConfigManager::IsFuzzing())
2918 sTheme = "colibre";
2919 else
2921 // read from the configuration, or fallback to what the desktop wants
2922 uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
2923 if (xContext.is())
2925 sTheme = officecfg::Office::Common::Misc::SymbolStyle::get(xContext);
2927 if (sTheme.isEmpty() || sTheme == "auto")
2928 sTheme = GetAutomaticallyChosenIconTheme();
2933 if (!mxData->mIconThemeScanner) {
2934 const_cast<StyleSettings*>(this)->mxData->mIconThemeScanner = vcl::IconThemeScanner::Create(vcl::IconThemeScanner::GetStandardIconThemePath());
2936 OUString r = mxData->mIconThemeSelector->SelectIconTheme(
2937 mxData->mIconThemeScanner->GetFoundIconThemes(),
2938 sTheme);
2939 return r;
2942 void
2943 StyleSettings::SetHighContrastMode(bool bHighContrast )
2945 if (mxData->mbHighContrast == bHighContrast) {
2946 return;
2949 CopyData();
2950 mxData->mbHighContrast = bHighContrast;
2951 mxData->mIconThemeSelector->SetUseHighContrastTheme(bHighContrast);
2954 bool
2955 StyleSettings::GetHighContrastMode() const
2957 return mxData->mbHighContrast;
2960 void
2961 StyleSettings::SetPreferredIconTheme(const OUString& theme, bool bDarkIconTheme)
2963 mxData->mIconThemeSelector->SetPreferredIconTheme(theme, bDarkIconTheme);
2966 void
2967 AllSettings::SetMouseSettings( const MouseSettings& rSet )
2969 CopyData();
2970 mxData->maMouseSettings = rSet;
2973 const MouseSettings&
2974 AllSettings::GetMouseSettings() const
2976 return mxData->maMouseSettings;
2979 void
2980 AllSettings::SetStyleSettings( const StyleSettings& rSet )
2982 CopyData();
2983 mxData->maStyleSettings = rSet;
2986 void
2987 AllSettings::SetMiscSettings( const MiscSettings& rSet )
2989 CopyData();
2990 mxData->maMiscSettings = rSet;
2993 const MiscSettings&
2994 AllSettings::GetMiscSettings() const
2996 return mxData->maMiscSettings;
2999 void
3000 AllSettings::SetHelpSettings( const HelpSettings& rSet )
3002 CopyData();
3003 mxData->maHelpSettings = rSet;
3006 const HelpSettings&
3007 AllSettings::GetHelpSettings() const
3009 return mxData->maHelpSettings;
3012 bool
3013 AllSettings::operator !=( const AllSettings& rSet ) const
3015 return !(*this == rSet);
3018 SvtSysLocale&
3019 AllSettings::GetSysLocale()
3021 return mxData->maSysLocale;
3025 void StyleSettings::BatchSetBackgrounds( const Color &aBackColor,
3026 bool bCheckedColorSpecialCase )
3028 Set3DColors( aBackColor );
3029 SetFaceColor( aBackColor );
3030 SetDialogColor( aBackColor );
3031 SetWorkspaceColor( aBackColor );
3033 if (bCheckedColorSpecialCase)
3034 SetCheckedColorSpecialCase();
3037 void StyleSettings::BatchSetFonts( const vcl::Font& aAppFont,
3038 const vcl::Font& aLabelFont )
3040 SetAppFont( aAppFont );
3041 SetPushButtonFont( aAppFont );
3042 SetToolFont( aAppFont );
3043 SetHelpFont( aAppFont );
3045 SetMenuFont( aLabelFont );
3046 SetTabFont( aLabelFont );
3047 SetLabelFont( aLabelFont );
3048 SetRadioCheckFont( aLabelFont );
3049 SetFieldFont( aLabelFont );
3050 SetGroupFont( aLabelFont );
3051 SetIconFont( aLabelFont );
3054 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */