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 .
20 #include <config_folders.h>
22 #include <officecfg/Office/Common.hxx>
25 #include "win/svsys.h"
28 #include "comphelper/processfactory.hxx"
29 #include <rtl/bootstrap.hxx>
30 #include "tools/debug.hxx"
32 #include "i18nlangtag/mslangid.hxx"
33 #include "i18nlangtag/languagetag.hxx"
35 #include <comphelper/lok.hxx>
37 #include <vcl/graphicfilter.hxx>
38 #include <vcl/IconThemeScanner.hxx>
39 #include <vcl/IconThemeSelector.hxx>
40 #include <vcl/IconThemeInfo.hxx>
41 #include <vcl/svapp.hxx>
42 #include <vcl/event.hxx>
43 #include <vcl/settings.hxx>
44 #include <vcl/i18nhelp.hxx>
45 #include <vcl/ImageTree.hxx>
46 #include <vcl/configsettings.hxx>
47 #include <vcl/gradient.hxx>
48 #include <vcl/outdev.hxx>
50 #include "unotools/fontcfg.hxx"
51 #include "unotools/localedatawrapper.hxx"
52 #include "unotools/collatorwrapper.hxx"
53 #include "unotools/confignode.hxx"
54 #include "unotools/configmgr.hxx"
55 #include "unotools/syslocaleoptions.hxx"
57 using namespace ::com::sun::star
;
64 ImplMouseData( const ImplMouseData
& rData
);
66 MouseSettingsOptions mnOptions
;
67 sal_uInt64 mnDoubleClkTime
;
68 long mnDoubleClkWidth
;
69 long mnDoubleClkHeight
;
70 long mnStartDragWidth
;
71 long mnStartDragHeight
;
72 sal_uInt16 mnStartDragCode
;
73 sal_uInt16 mnContextMenuCode
;
74 sal_uInt16 mnContextMenuClicks
;
75 sal_uLong mnScrollRepeat
;
76 sal_uLong mnButtonStartRepeat
;
77 sal_uLong mnButtonRepeat
;
78 sal_uLong mnActionDelay
;
79 sal_uLong mnMenuDelay
;
80 MouseFollowFlags mnFollow
;
81 MouseMiddleButtonAction mnMiddleButtonAction
;
82 MouseWheelBehaviour mnWheelBehavior
;
88 ImplStyleData( const ImplStyleData
& rData
);
90 void SetStandardStyles();
92 Color maActiveBorderColor
;
94 Color maActiveTextColor
;
95 Color maAlternatingRowColor
;
96 Color maButtonTextColor
;
97 Color maButtonRolloverTextColor
;
99 Color maDarkShadowColor
;
100 Color maDeactiveBorderColor
;
101 Color maDeactiveColor
;
102 Color maDeactiveTextColor
;
104 Color maDialogTextColor
;
105 Color maDisableColor
;
108 Color maFieldTextColor
;
109 Color maFieldRolloverTextColor
;
111 Color maGroupTextColor
;
113 Color maHelpTextColor
;
114 Color maHighlightColor
;
115 Color maHighlightLinkColor
;
116 Color maHighlightTextColor
;
117 Color maLabelTextColor
;
118 Color maLightBorderColor
;
121 Color maMenuBarColor
;
122 Color maMenuBarRolloverColor
;
123 Color maMenuBorderColor
;
125 Color maMenuHighlightColor
;
126 Color maMenuHighlightTextColor
;
127 Color maMenuTextColor
;
128 Color maMenuBarTextColor
;
129 Color maMenuBarRolloverTextColor
;
130 Color maMenuBarHighlightTextColor
;
132 Color maRadioCheckTextColor
;
134 Color maVisitedLinkColor
;
135 Color maToolTextColor
;
137 Color maWindowTextColor
;
138 Color maWorkspaceColor
;
139 Color maActiveTabColor
;
140 Color maInactiveTabColor
;
141 Color maTabTextColor
;
142 Color maTabRolloverTextColor
;
143 Color maTabHighlightTextColor
;
145 vcl::Font maHelpFont
;
146 vcl::Font maTitleFont
;
147 vcl::Font maFloatTitleFont
;
148 vcl::Font maMenuFont
;
149 vcl::Font maToolFont
;
150 vcl::Font maLabelFont
;
151 vcl::Font maRadioCheckFont
;
152 vcl::Font maPushButtonFont
;
153 vcl::Font maFieldFont
;
154 vcl::Font maIconFont
;
156 vcl::Font maGroupFont
;
159 long mnFloatTitleHeight
;
160 long mnTearOffTitleHeight
;
161 long mnScrollBarSize
;
165 long mnAntialiasedMin
;
166 sal_uInt64 mnCursorBlinkTime
;
167 DragFullOptions mnDragFullOptions
;
168 SelectionOptions mnSelectionOptions
;
169 DisplayOptions mnDisplayOptions
;
170 ToolbarIconSize mnToolbarIconSize
;
172 StyleSettingsOptions mnOptions
;
174 bool mbUseSystemUIFonts
;
176 TriState meUseImagesInMenus
;
177 bool mnUseFlatBorders
;
178 bool mbPreferredUseImagesInMenus
;
180 std::shared_ptr
<vcl::IconThemeScanner
>
182 std::shared_ptr
<vcl::IconThemeSelector
>
185 rtl::OUString mIconTheme
;
186 bool mbSkipDisabledInMenus
;
187 bool mbHideDisabledMenuItems
;
188 bool mbPreferredContextMenuShortcuts
;
189 TriState meContextMenuShortcuts
;
190 //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise
191 //primary means scroll by single page. Secondary button takes the alternative behaviour
192 bool mbPrimaryButtonWarpsSlider
;
193 DialogStyle maDialogStyle
;
194 FrameStyle maFrameStyle
;
196 sal_uInt16 mnEdgeBlending
;
197 Color maEdgeBlendingTopLeftColor
;
198 Color maEdgeBlendingBottomRightColor
;
199 sal_uInt16 mnListBoxMaximumLineCount
;
200 sal_uInt16 mnColorValueSetColumnCount
;
201 sal_uInt16 mnColorValueSetMaximumRowCount
;
202 Size maListBoxPreviewDefaultLogicSize
;
203 Size maListBoxPreviewDefaultPixelSize
;
204 sal_uInt16 mnListBoxPreviewDefaultLineWidth
;
205 bool mbPreviewUsesCheckeredBackground
;
207 OUString maPersonaHeaderFooter
; ///< Cache the settings to detect changes.
209 BitmapEx maPersonaHeaderBitmap
; ///< Cache the header bitmap.
210 BitmapEx maPersonaFooterBitmap
; ///< Cache the footer bitmap.
211 boost::optional
<Color
> maPersonaMenuBarTextColor
; ///< Cache the menubar color.
217 ImplMiscData( const ImplMiscData
& rData
);
218 TriState mnEnableATT
;
219 bool mbEnableLocalizedDecimalSep
;
220 TriState mnDisablePrinting
;
221 bool mbPseudoHeadless
;
227 ImplHelpData( const ImplHelpData
& rData
);
229 sal_uLong mnTipDelay
;
230 sal_uLong mnTipTimeout
;
231 sal_uLong mnBalloonDelay
;
234 struct ImplAllSettingsData
236 ImplAllSettingsData();
237 ImplAllSettingsData( const ImplAllSettingsData
& rData
);
238 ~ImplAllSettingsData();
240 MouseSettings maMouseSettings
;
241 StyleSettings maStyleSettings
;
242 MiscSettings maMiscSettings
;
243 HelpSettings maHelpSettings
;
244 LanguageTag maLocale
;
245 AllSettingsFlags mnWindowUpdate
;
246 LanguageTag maUILocale
;
247 LocaleDataWrapper
* mpLocaleDataWrapper
;
248 LocaleDataWrapper
* mpUILocaleDataWrapper
;
249 vcl::I18nHelper
* mpI18nHelper
;
250 vcl::I18nHelper
* mpUII18nHelper
;
251 SvtSysLocale maSysLocale
;
254 ImplMouseData::ImplMouseData()
256 mnOptions
= MouseSettingsOptions::NONE
;
257 mnDoubleClkTime
= 500;
258 mnDoubleClkWidth
= 2;
259 mnDoubleClkHeight
= 2;
260 mnStartDragWidth
= 2;
261 mnStartDragHeight
= 2;
262 mnStartDragCode
= MOUSE_LEFT
;
263 mnContextMenuCode
= MOUSE_RIGHT
;
264 mnContextMenuClicks
= 1;
265 mnMiddleButtonAction
= MouseMiddleButtonAction::AutoScroll
;
266 mnScrollRepeat
= 100;
267 mnButtonStartRepeat
= 370;
271 mnFollow
= MouseFollowFlags::Menu
| MouseFollowFlags::DDList
;
272 mnWheelBehavior
= MouseWheelBehaviour::ALWAYS
;
275 ImplMouseData::ImplMouseData( const ImplMouseData
& rData
)
277 mnOptions
= rData
.mnOptions
;
278 mnDoubleClkTime
= rData
.mnDoubleClkTime
;
279 mnDoubleClkWidth
= rData
.mnDoubleClkWidth
;
280 mnDoubleClkHeight
= rData
.mnDoubleClkHeight
;
281 mnStartDragWidth
= rData
.mnStartDragWidth
;
282 mnStartDragHeight
= rData
.mnStartDragHeight
;
283 mnStartDragCode
= rData
.mnStartDragCode
;
284 mnContextMenuCode
= rData
.mnContextMenuCode
;
285 mnContextMenuClicks
= rData
.mnContextMenuClicks
;
286 mnMiddleButtonAction
= rData
.mnMiddleButtonAction
;
287 mnScrollRepeat
= rData
.mnScrollRepeat
;
288 mnButtonStartRepeat
= rData
.mnButtonStartRepeat
;
289 mnButtonRepeat
= rData
.mnButtonRepeat
;
290 mnActionDelay
= rData
.mnActionDelay
;
291 mnMenuDelay
= rData
.mnMenuDelay
;
292 mnFollow
= rData
.mnFollow
;
293 mnWheelBehavior
= rData
.mnWheelBehavior
;
297 MouseSettings::SetOptions(MouseSettingsOptions nOptions
)
300 mxData
->mnOptions
= nOptions
;
304 MouseSettings::GetOptions() const
306 return mxData
->mnOptions
;
310 MouseSettings::SetDoubleClickTime( sal_uInt64 nDoubleClkTime
)
313 mxData
->mnDoubleClkTime
= nDoubleClkTime
;
317 MouseSettings::GetDoubleClickTime() const
319 return mxData
->mnDoubleClkTime
;
323 MouseSettings::SetDoubleClickWidth( long nDoubleClkWidth
)
326 mxData
->mnDoubleClkWidth
= nDoubleClkWidth
;
330 MouseSettings::GetDoubleClickWidth() const
332 return mxData
->mnDoubleClkWidth
;
336 MouseSettings::SetDoubleClickHeight( long nDoubleClkHeight
)
339 mxData
->mnDoubleClkHeight
= nDoubleClkHeight
;
343 MouseSettings::GetDoubleClickHeight() const
345 return mxData
->mnDoubleClkHeight
;
349 MouseSettings::SetStartDragWidth( long nDragWidth
)
352 mxData
->mnStartDragWidth
= nDragWidth
;
356 MouseSettings::GetStartDragWidth() const
358 return mxData
->mnStartDragWidth
;
362 MouseSettings::SetStartDragHeight( long nDragHeight
)
365 mxData
->mnStartDragHeight
= nDragHeight
;
369 MouseSettings::GetStartDragHeight() const
371 return mxData
->mnStartDragHeight
;
375 MouseSettings::GetStartDragCode() const
377 return mxData
->mnStartDragCode
;
381 MouseSettings::GetContextMenuCode() const
383 return mxData
->mnContextMenuCode
;
387 MouseSettings::GetContextMenuClicks() const
389 return mxData
->mnContextMenuClicks
;
393 MouseSettings::GetScrollRepeat() const
395 return mxData
->mnScrollRepeat
;
399 MouseSettings::GetButtonStartRepeat() const
401 return mxData
->mnButtonStartRepeat
;
405 MouseSettings::SetButtonRepeat( sal_uLong nRepeat
)
408 mxData
->mnButtonRepeat
= nRepeat
;
412 MouseSettings::GetButtonRepeat() const
414 return mxData
->mnButtonRepeat
;
418 MouseSettings::GetActionDelay() const
420 return mxData
->mnActionDelay
;
424 MouseSettings::SetMenuDelay( sal_uLong nDelay
)
427 mxData
->mnMenuDelay
= nDelay
;
431 MouseSettings::GetMenuDelay() const
433 return mxData
->mnMenuDelay
;
437 MouseSettings::SetFollow( MouseFollowFlags nFollow
)
440 mxData
->mnFollow
= nFollow
;
444 MouseSettings::GetFollow() const
446 return mxData
->mnFollow
;
450 MouseSettings::SetMiddleButtonAction( MouseMiddleButtonAction nAction
)
453 mxData
->mnMiddleButtonAction
= nAction
;
456 MouseMiddleButtonAction
457 MouseSettings::GetMiddleButtonAction() const
459 return mxData
->mnMiddleButtonAction
;
463 MouseSettings::SetWheelBehavior( MouseWheelBehaviour nBehavior
)
466 mxData
->mnWheelBehavior
= nBehavior
;
470 MouseSettings::GetWheelBehavior() const
472 return mxData
->mnWheelBehavior
;
476 MouseSettings::operator !=( const MouseSettings
& rSet
) const
478 return !(*this == rSet
);
481 MouseSettings::MouseSettings()
482 : mxData(std::make_shared
<ImplMouseData
>())
486 MouseSettings::~MouseSettings()
490 void MouseSettings::CopyData()
492 // copy if other references exist
493 if ( ! mxData
.unique() ) {
494 mxData
= std::make_shared
<ImplMouseData
>(*mxData
);
498 bool MouseSettings::operator ==( const MouseSettings
& rSet
) const
500 if ( mxData
== rSet
.mxData
)
503 if ( (mxData
->mnOptions
== rSet
.mxData
->mnOptions
) &&
504 (mxData
->mnDoubleClkTime
== rSet
.mxData
->mnDoubleClkTime
) &&
505 (mxData
->mnDoubleClkWidth
== rSet
.mxData
->mnDoubleClkWidth
) &&
506 (mxData
->mnDoubleClkHeight
== rSet
.mxData
->mnDoubleClkHeight
) &&
507 (mxData
->mnStartDragWidth
== rSet
.mxData
->mnStartDragWidth
) &&
508 (mxData
->mnStartDragHeight
== rSet
.mxData
->mnStartDragHeight
) &&
509 (mxData
->mnStartDragCode
== rSet
.mxData
->mnStartDragCode
) &&
510 (mxData
->mnContextMenuCode
== rSet
.mxData
->mnContextMenuCode
) &&
511 (mxData
->mnContextMenuClicks
== rSet
.mxData
->mnContextMenuClicks
) &&
512 (mxData
->mnMiddleButtonAction
== rSet
.mxData
->mnMiddleButtonAction
) &&
513 (mxData
->mnScrollRepeat
== rSet
.mxData
->mnScrollRepeat
) &&
514 (mxData
->mnButtonStartRepeat
== rSet
.mxData
->mnButtonStartRepeat
) &&
515 (mxData
->mnButtonRepeat
== rSet
.mxData
->mnButtonRepeat
) &&
516 (mxData
->mnActionDelay
== rSet
.mxData
->mnActionDelay
) &&
517 (mxData
->mnMenuDelay
== rSet
.mxData
->mnMenuDelay
) &&
518 (mxData
->mnFollow
== rSet
.mxData
->mnFollow
) &&
519 (mxData
->mnWheelBehavior
== rSet
.mxData
->mnWheelBehavior
) )
525 ImplStyleData::ImplStyleData() :
526 mIconThemeScanner(vcl::IconThemeScanner::Create(vcl::IconThemeScanner::GetStandardIconThemePath())),
527 mIconThemeSelector(new vcl::IconThemeSelector()),
528 maPersonaHeaderFooter(),
529 maPersonaHeaderBitmap(),
530 maPersonaFooterBitmap(),
531 maPersonaMenuBarTextColor()
533 mnScrollBarSize
= 16;
537 mnAntialiasedMin
= 0;
539 mnCursorBlinkTime
= STYLE_CURSOR_NOBLINKTIME
;
540 mnDragFullOptions
= DragFullOptions::All
;
541 mnSelectionOptions
= SelectionOptions::NONE
;
542 mnDisplayOptions
= DisplayOptions::NONE
;
543 mnOptions
= StyleSettingsOptions::NONE
;
544 mbAutoMnemonic
= true;
545 mnToolbarIconSize
= ToolbarIconSize::Unknown
;
546 meUseImagesInMenus
= TRISTATE_INDET
;
547 meContextMenuShortcuts
= TRISTATE_INDET
;
549 maEdgeBlendingTopLeftColor
= RGB_COLORDATA(0xC0, 0xC0, 0xC0);
550 maEdgeBlendingBottomRightColor
= RGB_COLORDATA(0x40, 0x40, 0x40);
551 mnListBoxMaximumLineCount
= 25;
552 mnColorValueSetColumnCount
= 12;
553 mnColorValueSetMaximumRowCount
= 20;
554 maListBoxPreviewDefaultLogicSize
= Size(15, 7);
555 maListBoxPreviewDefaultPixelSize
= Size(0, 0); // on-demand calculated in GetListBoxPreviewDefaultPixelSize()
556 mnListBoxPreviewDefaultLineWidth
= 1;
557 mbPreviewUsesCheckeredBackground
= true;
562 ImplStyleData::ImplStyleData( const ImplStyleData
& rData
) :
563 maActiveBorderColor( rData
.maActiveBorderColor
),
564 maActiveColor( rData
.maActiveColor
),
565 maActiveTextColor( rData
.maActiveTextColor
),
566 maAlternatingRowColor( rData
.maAlternatingRowColor
),
567 maButtonTextColor( rData
.maButtonTextColor
),
568 maButtonRolloverTextColor( rData
.maButtonRolloverTextColor
),
569 maCheckedColor( rData
.maCheckedColor
),
570 maDarkShadowColor( rData
.maDarkShadowColor
),
571 maDeactiveBorderColor( rData
.maDeactiveBorderColor
),
572 maDeactiveColor( rData
.maDeactiveColor
),
573 maDeactiveTextColor( rData
.maDeactiveTextColor
),
574 maDialogColor( rData
.maDialogColor
),
575 maDialogTextColor( rData
.maDialogTextColor
),
576 maDisableColor( rData
.maDisableColor
),
577 maFaceColor( rData
.maFaceColor
),
578 maFieldColor( rData
.maFieldColor
),
579 maFieldTextColor( rData
.maFieldTextColor
),
580 maFieldRolloverTextColor( rData
.maFieldRolloverTextColor
),
581 maFontColor( rData
.maFontColor
),
582 maGroupTextColor( rData
.maGroupTextColor
),
583 maHelpColor( rData
.maHelpColor
),
584 maHelpTextColor( rData
.maHelpTextColor
),
585 maHighlightColor( rData
.maHighlightColor
),
586 maHighlightLinkColor( rData
.maHighlightLinkColor
),
587 maHighlightTextColor( rData
.maHighlightTextColor
),
588 maLabelTextColor( rData
.maLabelTextColor
),
589 maLightBorderColor( rData
.maLightBorderColor
),
590 maLightColor( rData
.maLightColor
),
591 maLinkColor( rData
.maLinkColor
),
592 maMenuBarColor( rData
.maMenuBarColor
),
593 maMenuBarRolloverColor( rData
.maMenuBarRolloverColor
),
594 maMenuBorderColor( rData
.maMenuBorderColor
),
595 maMenuColor( rData
.maMenuColor
),
596 maMenuHighlightColor( rData
.maMenuHighlightColor
),
597 maMenuHighlightTextColor( rData
.maMenuHighlightTextColor
),
598 maMenuTextColor( rData
.maMenuTextColor
),
599 maMenuBarTextColor( rData
.maMenuBarTextColor
),
600 maMenuBarRolloverTextColor( rData
.maMenuBarRolloverTextColor
),
601 maMenuBarHighlightTextColor( rData
.maMenuBarHighlightTextColor
),
602 maMonoColor( rData
.maMonoColor
),
603 maRadioCheckTextColor( rData
.maRadioCheckTextColor
),
604 maShadowColor( rData
.maShadowColor
),
605 maVisitedLinkColor( rData
.maVisitedLinkColor
),
606 maToolTextColor( rData
.maToolTextColor
),
607 maWindowColor( rData
.maWindowColor
),
608 maWindowTextColor( rData
.maWindowTextColor
),
609 maWorkspaceColor( rData
.maWorkspaceColor
),
610 maActiveTabColor( rData
.maActiveTabColor
),
611 maInactiveTabColor( rData
.maInactiveTabColor
),
612 maTabTextColor( rData
.maTabTextColor
),
613 maTabRolloverTextColor( rData
.maTabRolloverTextColor
),
614 maTabHighlightTextColor( rData
.maTabHighlightTextColor
),
615 maAppFont( rData
.maAppFont
),
616 maHelpFont( rData
.maAppFont
),
617 maTitleFont( rData
.maTitleFont
),
618 maFloatTitleFont( rData
.maFloatTitleFont
),
619 maMenuFont( rData
.maMenuFont
),
620 maToolFont( rData
.maToolFont
),
621 maLabelFont( rData
.maLabelFont
),
622 maRadioCheckFont( rData
.maRadioCheckFont
),
623 maPushButtonFont( rData
.maPushButtonFont
),
624 maFieldFont( rData
.maFieldFont
),
625 maIconFont( rData
.maIconFont
),
626 maTabFont( rData
.maTabFont
),
627 maGroupFont( rData
.maGroupFont
),
628 mIconTheme(rData
.mIconTheme
),
629 maDialogStyle( rData
.maDialogStyle
),
630 maFrameStyle( rData
.maFrameStyle
),
631 maPersonaHeaderFooter( rData
.maPersonaHeaderFooter
),
632 maPersonaHeaderBitmap( rData
.maPersonaHeaderBitmap
),
633 maPersonaFooterBitmap( rData
.maPersonaFooterBitmap
),
634 maPersonaMenuBarTextColor( rData
.maPersonaMenuBarTextColor
)
636 mnBorderSize
= rData
.mnBorderSize
;
637 mnTitleHeight
= rData
.mnTitleHeight
;
638 mnFloatTitleHeight
= rData
.mnFloatTitleHeight
;
639 mnTearOffTitleHeight
= rData
.mnTearOffTitleHeight
;
640 mnScrollBarSize
= rData
.mnScrollBarSize
;
641 mnMinThumbSize
= rData
.mnMinThumbSize
;
642 mnSplitSize
= rData
.mnSplitSize
;
643 mnSpinSize
= rData
.mnSpinSize
;
644 mnAntialiasedMin
= rData
.mnAntialiasedMin
;
645 mnCursorSize
= rData
.mnCursorSize
;
646 mnCursorBlinkTime
= rData
.mnCursorBlinkTime
;
647 mnDragFullOptions
= rData
.mnDragFullOptions
;
648 mnSelectionOptions
= rData
.mnSelectionOptions
;
649 mnDisplayOptions
= rData
.mnDisplayOptions
;
650 mnOptions
= rData
.mnOptions
;
651 mbHighContrast
= rData
.mbHighContrast
;
652 mbUseSystemUIFonts
= rData
.mbUseSystemUIFonts
;
653 mnUseFlatBorders
= rData
.mnUseFlatBorders
;
654 mnUseFlatMenus
= rData
.mnUseFlatMenus
;
655 mbAutoMnemonic
= rData
.mbAutoMnemonic
;
656 meUseImagesInMenus
= rData
.meUseImagesInMenus
;
657 mbPreferredUseImagesInMenus
= rData
.mbPreferredUseImagesInMenus
;
658 mbSkipDisabledInMenus
= rData
.mbSkipDisabledInMenus
;
659 mbHideDisabledMenuItems
= rData
.mbHideDisabledMenuItems
;
660 mbPreferredContextMenuShortcuts
= rData
.mbPreferredContextMenuShortcuts
;
661 meContextMenuShortcuts
= rData
.meContextMenuShortcuts
;
662 mbPrimaryButtonWarpsSlider
= rData
.mbPrimaryButtonWarpsSlider
;
663 mnToolbarIconSize
= rData
.mnToolbarIconSize
;
664 mIconThemeScanner
.reset(new vcl::IconThemeScanner(*rData
.mIconThemeScanner
));
665 mIconThemeSelector
.reset(new vcl::IconThemeSelector(*rData
.mIconThemeSelector
));
666 mnEdgeBlending
= rData
.mnEdgeBlending
;
667 maEdgeBlendingTopLeftColor
= rData
.maEdgeBlendingTopLeftColor
;
668 maEdgeBlendingBottomRightColor
= rData
.maEdgeBlendingBottomRightColor
;
669 mnListBoxMaximumLineCount
= rData
.mnListBoxMaximumLineCount
;
670 mnColorValueSetColumnCount
= rData
.mnColorValueSetColumnCount
;
671 mnColorValueSetMaximumRowCount
= rData
.mnColorValueSetMaximumRowCount
;
672 maListBoxPreviewDefaultLogicSize
= rData
.maListBoxPreviewDefaultLogicSize
;
673 maListBoxPreviewDefaultPixelSize
= rData
.maListBoxPreviewDefaultPixelSize
;
674 mnListBoxPreviewDefaultLineWidth
= rData
.mnListBoxPreviewDefaultLineWidth
;
675 mbPreviewUsesCheckeredBackground
= rData
.mbPreviewUsesCheckeredBackground
;
678 void ImplStyleData::SetStandardStyles()
680 vcl::Font
aStdFont( FAMILY_SWISS
, Size( 0, 8 ) );
681 aStdFont
.SetCharSet( osl_getThreadTextEncoding() );
682 aStdFont
.SetWeight( WEIGHT_NORMAL
);
683 if (!utl::ConfigManager::IsAvoidConfig())
684 aStdFont
.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en")));
686 aStdFont
.SetFamilyName("Liberation Serif");
687 maAppFont
= aStdFont
;
688 maHelpFont
= aStdFont
;
689 maMenuFont
= aStdFont
;
690 maToolFont
= aStdFont
;
691 maGroupFont
= aStdFont
;
692 maLabelFont
= aStdFont
;
693 maRadioCheckFont
= aStdFont
;
694 maPushButtonFont
= aStdFont
;
695 maFieldFont
= aStdFont
;
696 maIconFont
= aStdFont
;
697 maTabFont
= aStdFont
;
698 aStdFont
.SetWeight( WEIGHT_BOLD
);
699 maFloatTitleFont
= aStdFont
;
700 maTitleFont
= aStdFont
;
702 maFaceColor
= Color( COL_LIGHTGRAY
);
703 maCheckedColor
= Color( 0xCC, 0xCC, 0xCC );
704 maLightColor
= Color( COL_WHITE
);
705 maLightBorderColor
= Color( COL_LIGHTGRAY
);
706 maShadowColor
= Color( COL_GRAY
);
707 maDarkShadowColor
= Color( COL_BLACK
);
708 maButtonTextColor
= Color( COL_BLACK
);
709 maButtonRolloverTextColor
= Color( COL_BLACK
);
710 maRadioCheckTextColor
= Color( COL_BLACK
);
711 maGroupTextColor
= Color( COL_BLACK
);
712 maLabelTextColor
= Color( COL_BLACK
);
713 maWindowColor
= Color( COL_WHITE
);
714 maWindowTextColor
= Color( COL_BLACK
);
715 maDialogColor
= Color( COL_LIGHTGRAY
);
716 maDialogTextColor
= Color( COL_BLACK
);
717 maWorkspaceColor
= Color( 0xDF, 0xDF, 0xDE );
718 maMonoColor
= Color( COL_BLACK
);
719 maFieldColor
= Color( COL_WHITE
);
720 maFieldTextColor
= Color( COL_BLACK
);
721 maFieldRolloverTextColor
= Color( COL_BLACK
);
722 maActiveColor
= Color( COL_BLUE
);
723 maActiveTextColor
= Color( COL_WHITE
);
724 maActiveBorderColor
= Color( COL_LIGHTGRAY
);
725 maDeactiveColor
= Color( COL_GRAY
);
726 maDeactiveTextColor
= Color( COL_LIGHTGRAY
);
727 maDeactiveBorderColor
= Color( COL_LIGHTGRAY
);
728 maMenuColor
= Color( COL_LIGHTGRAY
);
729 maMenuBarColor
= Color( COL_LIGHTGRAY
);
730 maMenuBarRolloverColor
= Color( COL_BLUE
);
731 maMenuBorderColor
= Color( COL_LIGHTGRAY
);
732 maMenuTextColor
= Color( COL_BLACK
);
733 maMenuBarTextColor
= Color( COL_BLACK
);
734 maMenuBarRolloverTextColor
= Color( COL_WHITE
);
735 maMenuBarHighlightTextColor
= Color( COL_WHITE
);
736 maMenuHighlightColor
= Color( COL_BLUE
);
737 maMenuHighlightTextColor
= Color( COL_WHITE
);
738 maHighlightColor
= Color( COL_BLUE
);
739 maHighlightTextColor
= Color( COL_WHITE
);
740 maActiveTabColor
= Color( COL_WHITE
);
741 maInactiveTabColor
= Color( COL_LIGHTGRAY
);
742 maTabTextColor
= Color( COL_BLACK
);
743 maTabRolloverTextColor
= Color( COL_BLACK
);
744 maTabHighlightTextColor
= Color( COL_BLACK
);
745 maDisableColor
= Color( COL_GRAY
);
746 maHelpColor
= Color( 0xFF, 0xFF, 0xE0 );
747 maHelpTextColor
= Color( COL_BLACK
);
748 maLinkColor
= Color( COL_BLUE
);
749 maVisitedLinkColor
= Color( 0x00, 0x00, 0xCC );
750 maToolTextColor
= Color( COL_BLACK
);
751 maHighlightLinkColor
= Color( COL_LIGHTBLUE
);
752 maFontColor
= Color( COL_BLACK
);
753 maAlternatingRowColor
= Color( 0xEE, 0xEE, 0xEE );
757 mnFloatTitleHeight
= 13;
758 mnTearOffTitleHeight
= 8;
759 mbHighContrast
= false;
760 mbUseSystemUIFonts
= true;
761 mnUseFlatBorders
= false;
762 mnUseFlatMenus
= false;
763 mbPreferredUseImagesInMenus
= true;
764 mbSkipDisabledInMenus
= false;
765 mbHideDisabledMenuItems
= false;
766 mbPreferredContextMenuShortcuts
= true;
767 mbPrimaryButtonWarpsSlider
= false;
770 StyleSettings::StyleSettings()
771 : mxData(std::make_shared
<ImplStyleData
>())
775 StyleSettings::~StyleSettings()
780 StyleSettings::SetFaceColor( const Color
& rColor
)
783 mxData
->maFaceColor
= rColor
;
787 StyleSettings::GetFaceColor() const
789 return mxData
->maFaceColor
;
793 StyleSettings::SetCheckedColor( const Color
& rColor
)
796 mxData
->maCheckedColor
= rColor
;
800 StyleSettings::GetCheckedColor() const
802 return mxData
->maCheckedColor
;
806 StyleSettings::SetLightColor( const Color
& rColor
)
809 mxData
->maLightColor
= rColor
;
813 StyleSettings::GetLightColor() const
815 return mxData
->maLightColor
;
819 StyleSettings::SetLightBorderColor( const Color
& rColor
)
822 mxData
->maLightBorderColor
= rColor
;
826 StyleSettings::GetLightBorderColor() const
828 return mxData
->maLightBorderColor
;
832 StyleSettings::SetShadowColor( const Color
& rColor
)
835 mxData
->maShadowColor
= rColor
;
839 StyleSettings::GetShadowColor() const
841 return mxData
->maShadowColor
;
845 StyleSettings::SetDarkShadowColor( const Color
& rColor
)
848 mxData
->maDarkShadowColor
= rColor
;
852 StyleSettings::GetDarkShadowColor() const
854 return mxData
->maDarkShadowColor
;
858 StyleSettings::SetButtonTextColor( const Color
& rColor
)
861 mxData
->maButtonTextColor
= rColor
;
865 StyleSettings::GetButtonTextColor() const
867 return mxData
->maButtonTextColor
;
871 StyleSettings::SetButtonRolloverTextColor( const Color
& rColor
)
874 mxData
->maButtonRolloverTextColor
= rColor
;
878 StyleSettings::GetButtonRolloverTextColor() const
880 return mxData
->maButtonRolloverTextColor
;
884 StyleSettings::SetRadioCheckTextColor( const Color
& rColor
)
887 mxData
->maRadioCheckTextColor
= rColor
;
891 StyleSettings::GetRadioCheckTextColor() const
893 return mxData
->maRadioCheckTextColor
;
897 StyleSettings::SetGroupTextColor( const Color
& rColor
)
900 mxData
->maGroupTextColor
= rColor
;
904 StyleSettings::GetGroupTextColor() const
906 return mxData
->maGroupTextColor
;
910 StyleSettings::SetLabelTextColor( const Color
& rColor
)
913 mxData
->maLabelTextColor
= rColor
;
917 StyleSettings::GetLabelTextColor() const
919 return mxData
->maLabelTextColor
;
923 StyleSettings::SetWindowColor( const Color
& rColor
)
926 mxData
->maWindowColor
= rColor
;
930 StyleSettings::GetWindowColor() const
932 return mxData
->maWindowColor
;
936 StyleSettings::SetWindowTextColor( const Color
& rColor
)
939 mxData
->maWindowTextColor
= rColor
;
943 StyleSettings::GetWindowTextColor() const
945 return mxData
->maWindowTextColor
;
949 StyleSettings::SetDialogColor( const Color
& rColor
)
952 mxData
->maDialogColor
= rColor
;
956 StyleSettings::GetDialogColor() const
958 return mxData
->maDialogColor
;
962 StyleSettings::SetDialogTextColor( const Color
& rColor
)
965 mxData
->maDialogTextColor
= rColor
;
969 StyleSettings::GetDialogTextColor() const
971 return mxData
->maDialogTextColor
;
975 StyleSettings::SetWorkspaceColor( const Color
& rColor
)
978 mxData
->maWorkspaceColor
= rColor
;
982 StyleSettings::GetWorkspaceColor() const
984 return mxData
->maWorkspaceColor
;
988 StyleSettings::SetFieldColor( const Color
& rColor
)
991 mxData
->maFieldColor
= rColor
;
995 StyleSettings::GetFieldColor() const
997 return mxData
->maFieldColor
;
1001 StyleSettings::SetFieldTextColor( const Color
& rColor
)
1004 mxData
->maFieldTextColor
= rColor
;
1008 StyleSettings::GetFieldTextColor() const
1010 return mxData
->maFieldTextColor
;
1014 StyleSettings::SetFieldRolloverTextColor( const Color
& rColor
)
1017 mxData
->maFieldRolloverTextColor
= rColor
;
1021 StyleSettings::GetFieldRolloverTextColor() const
1023 return mxData
->maFieldRolloverTextColor
;
1027 StyleSettings::SetActiveColor( const Color
& rColor
)
1030 mxData
->maActiveColor
= rColor
;
1034 StyleSettings::GetActiveColor() const
1036 return mxData
->maActiveColor
;
1040 StyleSettings::SetActiveTextColor( const Color
& rColor
)
1043 mxData
->maActiveTextColor
= rColor
;
1047 StyleSettings::GetActiveTextColor() const
1049 return mxData
->maActiveTextColor
;
1053 StyleSettings::SetActiveBorderColor( const Color
& rColor
)
1056 mxData
->maActiveBorderColor
= rColor
;
1060 StyleSettings::GetActiveBorderColor() const
1062 return mxData
->maActiveBorderColor
;
1066 StyleSettings::SetDeactiveColor( const Color
& rColor
)
1069 mxData
->maDeactiveColor
= rColor
;
1073 StyleSettings::GetDeactiveColor() const
1075 return mxData
->maDeactiveColor
;
1079 StyleSettings::SetDeactiveTextColor( const Color
& rColor
)
1082 mxData
->maDeactiveTextColor
= rColor
;
1086 StyleSettings::GetDeactiveTextColor() const
1088 return mxData
->maDeactiveTextColor
;
1092 StyleSettings::SetDeactiveBorderColor( const Color
& rColor
)
1095 mxData
->maDeactiveBorderColor
= rColor
;
1099 StyleSettings::GetDeactiveBorderColor() const
1101 return mxData
->maDeactiveBorderColor
;
1105 StyleSettings::SetHighlightColor( const Color
& rColor
)
1108 mxData
->maHighlightColor
= rColor
;
1112 StyleSettings::GetHighlightColor() const
1114 return mxData
->maHighlightColor
;
1118 StyleSettings::SetHighlightTextColor( const Color
& rColor
)
1121 mxData
->maHighlightTextColor
= rColor
;
1125 StyleSettings::GetHighlightTextColor() const
1127 return mxData
->maHighlightTextColor
;
1131 StyleSettings::SetDisableColor( const Color
& rColor
)
1134 mxData
->maDisableColor
= rColor
;
1138 StyleSettings::GetDisableColor() const
1140 return mxData
->maDisableColor
;
1144 StyleSettings::SetHelpColor( const Color
& rColor
)
1147 mxData
->maHelpColor
= rColor
;
1151 StyleSettings::GetHelpColor() const
1153 return mxData
->maHelpColor
;
1157 StyleSettings::SetHelpTextColor( const Color
& rColor
)
1160 mxData
->maHelpTextColor
= rColor
;
1164 StyleSettings::GetHelpTextColor() const
1166 return mxData
->maHelpTextColor
;
1170 StyleSettings::SetMenuColor( const Color
& rColor
)
1173 mxData
->maMenuColor
= rColor
;
1177 StyleSettings::GetMenuColor() const
1179 return mxData
->maMenuColor
;
1183 StyleSettings::SetMenuBarColor( const Color
& rColor
)
1186 mxData
->maMenuBarColor
= rColor
;
1190 StyleSettings::GetMenuBarColor() const
1192 return mxData
->maMenuBarColor
;
1196 StyleSettings::SetMenuBarRolloverColor( const Color
& rColor
)
1199 mxData
->maMenuBarRolloverColor
= rColor
;
1203 StyleSettings::GetMenuBarRolloverColor() const
1205 return mxData
->maMenuBarRolloverColor
;
1209 StyleSettings::SetMenuBorderColor( const Color
& rColor
)
1212 mxData
->maMenuBorderColor
= rColor
;
1216 StyleSettings::GetMenuBorderColor() const
1218 return mxData
->maMenuBorderColor
;
1222 StyleSettings::SetMenuTextColor( const Color
& rColor
)
1225 mxData
->maMenuTextColor
= rColor
;
1229 StyleSettings::GetMenuTextColor() const
1231 return mxData
->maMenuTextColor
;
1235 StyleSettings::SetMenuBarTextColor( const Color
& rColor
)
1238 mxData
->maMenuBarTextColor
= rColor
;
1242 StyleSettings::GetMenuBarTextColor() const
1244 return mxData
->maMenuBarTextColor
;
1248 StyleSettings::SetMenuBarRolloverTextColor( const Color
& rColor
)
1251 mxData
->maMenuBarRolloverTextColor
= rColor
;
1255 StyleSettings::GetMenuBarRolloverTextColor() const
1257 return mxData
->maMenuBarRolloverTextColor
;
1261 StyleSettings::SetMenuBarHighlightTextColor( const Color
& rColor
)
1264 mxData
->maMenuBarHighlightTextColor
= rColor
;
1268 StyleSettings::GetMenuBarHighlightTextColor() const
1270 return mxData
->maMenuBarHighlightTextColor
;
1274 StyleSettings::SetMenuHighlightColor( const Color
& rColor
)
1277 mxData
->maMenuHighlightColor
= rColor
;
1281 StyleSettings::GetMenuHighlightColor() const
1283 return mxData
->maMenuHighlightColor
;
1287 StyleSettings::SetMenuHighlightTextColor( const Color
& rColor
)
1290 mxData
->maMenuHighlightTextColor
= rColor
;
1294 StyleSettings::GetMenuHighlightTextColor() const
1296 return mxData
->maMenuHighlightTextColor
;
1300 StyleSettings::SetTabTextColor( const Color
& rColor
)
1303 mxData
->maTabTextColor
= rColor
;
1307 StyleSettings::GetTabTextColor() const
1309 return mxData
->maTabTextColor
;
1313 StyleSettings::SetTabRolloverTextColor( const Color
& rColor
)
1316 mxData
->maTabRolloverTextColor
= rColor
;
1320 StyleSettings::GetTabRolloverTextColor() const
1322 return mxData
->maTabRolloverTextColor
;
1326 StyleSettings::SetTabHighlightTextColor( const Color
& rColor
)
1329 mxData
->maTabHighlightTextColor
= rColor
;
1333 StyleSettings::GetTabHighlightTextColor() const
1335 return mxData
->maTabHighlightTextColor
;
1339 StyleSettings::SetLinkColor( const Color
& rColor
)
1342 mxData
->maLinkColor
= rColor
;
1346 StyleSettings::GetLinkColor() const
1348 return mxData
->maLinkColor
;
1352 StyleSettings::SetVisitedLinkColor( const Color
& rColor
)
1355 mxData
->maVisitedLinkColor
= rColor
;
1359 StyleSettings::GetVisitedLinkColor() const
1361 return mxData
->maVisitedLinkColor
;
1365 StyleSettings::SetToolTextColor( const Color
& rColor
)
1368 mxData
->maToolTextColor
= rColor
;
1372 StyleSettings::GetToolTextColor() const
1374 return mxData
->maToolTextColor
;
1378 StyleSettings::GetHighlightLinkColor() const
1380 return mxData
->maHighlightLinkColor
;
1384 StyleSettings::SetMonoColor( const Color
& rColor
)
1387 mxData
->maMonoColor
= rColor
;
1391 StyleSettings::GetMonoColor() const
1393 return mxData
->maMonoColor
;
1397 StyleSettings::SetActiveTabColor( const Color
& rColor
)
1400 mxData
->maActiveTabColor
= rColor
;
1404 StyleSettings::GetActiveTabColor() const
1406 return mxData
->maActiveTabColor
;
1410 StyleSettings::SetInactiveTabColor( const Color
& rColor
)
1413 mxData
->maInactiveTabColor
= rColor
;
1417 StyleSettings::GetInactiveTabColor() const
1419 return mxData
->maInactiveTabColor
;
1423 StyleSettings::GetAlternatingRowColor() const
1425 return mxData
->maAlternatingRowColor
;
1429 StyleSettings::SetUseSystemUIFonts( bool bUseSystemUIFonts
)
1432 mxData
->mbUseSystemUIFonts
= bUseSystemUIFonts
;
1436 StyleSettings::GetUseSystemUIFonts() const
1438 return mxData
->mbUseSystemUIFonts
;
1442 StyleSettings::SetUseFlatBorders( bool bUseFlatBorders
)
1445 mxData
->mnUseFlatBorders
= bUseFlatBorders
;
1449 StyleSettings::GetUseFlatBorders() const
1451 return (bool) mxData
->mnUseFlatBorders
;
1455 StyleSettings::SetUseFlatMenus( bool bUseFlatMenus
)
1458 mxData
->mnUseFlatMenus
= bUseFlatMenus
;
1462 StyleSettings::GetUseFlatMenus() const
1464 return (bool) mxData
->mnUseFlatMenus
;
1468 StyleSettings::SetUseImagesInMenus( TriState eUseImagesInMenus
)
1471 mxData
->meUseImagesInMenus
= eUseImagesInMenus
;
1475 StyleSettings::SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus
)
1478 mxData
->mbPreferredUseImagesInMenus
= bPreferredUseImagesInMenus
;
1482 StyleSettings::GetPreferredUseImagesInMenus() const
1484 return mxData
->mbPreferredUseImagesInMenus
;
1488 StyleSettings::SetSkipDisabledInMenus( bool bSkipDisabledInMenus
)
1491 mxData
->mbSkipDisabledInMenus
= bSkipDisabledInMenus
;
1495 StyleSettings::GetSkipDisabledInMenus() const
1497 return mxData
->mbSkipDisabledInMenus
;
1501 StyleSettings::SetHideDisabledMenuItems( bool bHideDisabledMenuItems
)
1504 mxData
->mbHideDisabledMenuItems
= bHideDisabledMenuItems
;
1508 StyleSettings::GetHideDisabledMenuItems() const
1510 return mxData
->mbHideDisabledMenuItems
;
1514 StyleSettings::SetContextMenuShortcuts( TriState eContextMenuShortcuts
)
1517 mxData
->meContextMenuShortcuts
= eContextMenuShortcuts
;
1521 StyleSettings::GetContextMenuShortcuts() const
1523 switch (mxData
->meContextMenuShortcuts
)
1525 case TRISTATE_FALSE
:
1529 default: // TRISTATE_INDET:
1530 return GetPreferredUseImagesInMenus();
1535 StyleSettings::SetPreferredContextMenuShortcuts( bool bContextMenuShortcuts
)
1538 mxData
->mbPreferredContextMenuShortcuts
= bContextMenuShortcuts
;
1542 StyleSettings::SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider
)
1545 mxData
->mbPrimaryButtonWarpsSlider
= bPrimaryButtonWarpsSlider
;
1549 StyleSettings::GetPrimaryButtonWarpsSlider() const
1551 return mxData
->mbPrimaryButtonWarpsSlider
;
1555 StyleSettings::SetAppFont( const vcl::Font
& rFont
)
1558 mxData
->maAppFont
= rFont
;
1562 StyleSettings::GetAppFont() const
1564 return mxData
->maAppFont
;
1568 StyleSettings::SetHelpFont( const vcl::Font
& rFont
)
1571 mxData
->maHelpFont
= rFont
;
1575 StyleSettings::GetHelpFont() const
1577 return mxData
->maHelpFont
;
1581 StyleSettings::SetTitleFont( const vcl::Font
& rFont
)
1584 mxData
->maTitleFont
= rFont
;
1588 StyleSettings::GetTitleFont() const
1590 return mxData
->maTitleFont
;
1594 StyleSettings::SetFloatTitleFont( const vcl::Font
& rFont
)
1597 mxData
->maFloatTitleFont
= rFont
;
1601 StyleSettings::GetFloatTitleFont() const
1603 return mxData
->maFloatTitleFont
;
1607 StyleSettings::SetMenuFont( const vcl::Font
& rFont
)
1610 mxData
->maMenuFont
= rFont
;
1614 StyleSettings::GetMenuFont() const
1616 return mxData
->maMenuFont
;
1620 StyleSettings::SetToolFont( const vcl::Font
& rFont
)
1623 mxData
->maToolFont
= rFont
;
1627 StyleSettings::GetToolFont() const
1629 return mxData
->maToolFont
;
1633 StyleSettings::SetGroupFont( const vcl::Font
& rFont
)
1636 mxData
->maGroupFont
= rFont
;
1640 StyleSettings::GetGroupFont() const
1642 return mxData
->maGroupFont
;
1646 StyleSettings::SetLabelFont( const vcl::Font
& rFont
)
1649 mxData
->maLabelFont
= rFont
;
1653 StyleSettings::GetLabelFont() const
1655 return mxData
->maLabelFont
;
1659 StyleSettings::SetRadioCheckFont( const vcl::Font
& rFont
)
1662 mxData
->maRadioCheckFont
= rFont
;
1666 StyleSettings::GetRadioCheckFont() const
1668 return mxData
->maRadioCheckFont
;
1672 StyleSettings::SetPushButtonFont( const vcl::Font
& rFont
)
1675 mxData
->maPushButtonFont
= rFont
;
1679 StyleSettings::GetPushButtonFont() const
1681 return mxData
->maPushButtonFont
;
1685 StyleSettings::SetFieldFont( const vcl::Font
& rFont
)
1688 mxData
->maFieldFont
= rFont
;
1692 StyleSettings::GetFieldFont() const
1694 return mxData
->maFieldFont
;
1698 StyleSettings::SetIconFont( const vcl::Font
& rFont
)
1701 mxData
->maIconFont
= rFont
;
1705 StyleSettings::GetIconFont() const
1707 return mxData
->maIconFont
;
1711 StyleSettings::SetTabFont( const vcl::Font
& rFont
)
1714 mxData
->maTabFont
= rFont
;
1718 StyleSettings::GetTabFont() const
1720 return mxData
->maTabFont
;
1724 StyleSettings::GetBorderSize() const
1726 return mxData
->mnBorderSize
;
1730 StyleSettings::SetTitleHeight( long nSize
)
1733 mxData
->mnTitleHeight
= nSize
;
1737 StyleSettings::GetTitleHeight() const
1739 return mxData
->mnTitleHeight
;
1743 StyleSettings::SetFloatTitleHeight( long nSize
)
1746 mxData
->mnFloatTitleHeight
= nSize
;
1750 StyleSettings::GetFloatTitleHeight() const
1752 return mxData
->mnFloatTitleHeight
;
1756 StyleSettings::GetTearOffTitleHeight() const
1758 return mxData
->mnTearOffTitleHeight
;
1762 StyleSettings::SetScrollBarSize( long nSize
)
1765 mxData
->mnScrollBarSize
= nSize
;
1769 StyleSettings::GetScrollBarSize() const
1771 return mxData
->mnScrollBarSize
;
1775 StyleSettings::SetMinThumbSize( long nSize
)
1778 mxData
->mnMinThumbSize
= nSize
;
1782 StyleSettings::GetMinThumbSize() const
1784 return mxData
->mnMinThumbSize
;
1788 StyleSettings::SetSpinSize( long nSize
)
1791 mxData
->mnSpinSize
= nSize
;
1795 StyleSettings::GetSpinSize() const
1797 return mxData
->mnSpinSize
;
1801 StyleSettings::GetSplitSize() const
1803 return mxData
->mnSplitSize
;
1807 StyleSettings::SetCursorSize( long nSize
)
1810 mxData
->mnCursorSize
= nSize
;
1814 StyleSettings::GetCursorSize() const
1816 return mxData
->mnCursorSize
;
1820 StyleSettings::SetCursorBlinkTime( sal_uInt64 nBlinkTime
)
1823 mxData
->mnCursorBlinkTime
= nBlinkTime
;
1827 StyleSettings::GetCursorBlinkTime() const
1829 return (long) mxData
->mnCursorBlinkTime
;
1833 StyleSettings::SetDragFullOptions( DragFullOptions nOptions
)
1836 mxData
->mnDragFullOptions
= nOptions
;
1840 StyleSettings::GetDragFullOptions() const
1842 return mxData
->mnDragFullOptions
;
1846 StyleSettings::SetSelectionOptions( SelectionOptions nOptions
)
1849 mxData
->mnSelectionOptions
= nOptions
;
1853 StyleSettings::GetSelectionOptions() const
1855 return mxData
->mnSelectionOptions
;
1859 StyleSettings::SetDisplayOptions( DisplayOptions nOptions
)
1862 mxData
->mnDisplayOptions
= nOptions
;
1866 StyleSettings::GetDisplayOptions() const
1868 return mxData
->mnDisplayOptions
;
1872 StyleSettings::SetAntialiasingMinPixelHeight( long nMinPixel
)
1875 mxData
->mnAntialiasedMin
= nMinPixel
;
1879 StyleSettings::GetAntialiasingMinPixelHeight() const
1881 return mxData
->mnAntialiasedMin
;
1885 StyleSettings::SetOptions( StyleSettingsOptions nOptions
)
1888 mxData
->mnOptions
= nOptions
;
1892 StyleSettings::SetAutoMnemonic( bool bAutoMnemonic
)
1895 mxData
->mbAutoMnemonic
= bAutoMnemonic
;
1899 StyleSettings::GetAutoMnemonic() const
1901 return mxData
->mbAutoMnemonic
;
1905 StyleSettings::GetDockingFloatsSupported()
1907 ImplSVData
* pSVData
= ImplGetSVData();
1908 return pSVData
->maNWFData
.mbCanDetermineWindowPosition
;
1912 StyleSettings::SetFontColor( const Color
& rColor
)
1915 mxData
->maFontColor
= rColor
;
1919 StyleSettings::GetFontColor() const
1921 return mxData
->maFontColor
;
1925 StyleSettings::SetToolbarIconSize( ToolbarIconSize nSize
)
1928 mxData
->mnToolbarIconSize
= nSize
;
1932 StyleSettings::GetToolbarIconSize() const
1934 return mxData
->mnToolbarIconSize
;
1938 StyleSettings::GetDialogStyle() const
1940 return mxData
->maDialogStyle
;
1944 StyleSettings::SetDialogStyle( const DialogStyle
& rStyle
)
1947 mxData
->maDialogStyle
= rStyle
;
1951 StyleSettings::GetFrameStyle() const
1953 return mxData
->maFrameStyle
;
1957 StyleSettings::SetFrameStyle( const FrameStyle
& rStyle
)
1960 mxData
->maFrameStyle
= rStyle
;
1964 StyleSettings::SetEdgeBlending(sal_uInt16 nCount
)
1967 mxData
->mnEdgeBlending
= nCount
;
1971 StyleSettings::GetEdgeBlending() const
1973 return mxData
->mnEdgeBlending
;
1977 StyleSettings::GetEdgeBlendingTopLeftColor() const
1979 return mxData
->maEdgeBlendingTopLeftColor
;
1983 StyleSettings::GetEdgeBlendingBottomRightColor() const
1985 return mxData
->maEdgeBlendingBottomRightColor
;
1989 StyleSettings::SetListBoxMaximumLineCount(sal_uInt16 nCount
)
1992 mxData
->mnListBoxMaximumLineCount
= nCount
;
1996 StyleSettings::GetListBoxMaximumLineCount() const
1998 return mxData
->mnListBoxMaximumLineCount
;
2002 StyleSettings::SetColorValueSetColumnCount(sal_uInt16 nCount
)
2005 mxData
->mnColorValueSetColumnCount
= nCount
;
2009 StyleSettings::GetColorValueSetColumnCount() const
2011 return mxData
->mnColorValueSetColumnCount
;
2015 StyleSettings::GetColorValueSetMaximumRowCount() const
2017 return mxData
->mnColorValueSetMaximumRowCount
;
2021 StyleSettings::GetListBoxPreviewDefaultLineWidth() const
2023 return mxData
->mnListBoxPreviewDefaultLineWidth
;
2027 StyleSettings::SetPreviewUsesCheckeredBackground(bool bNew
)
2030 mxData
->mbPreviewUsesCheckeredBackground
= bNew
;
2034 StyleSettings::GetPreviewUsesCheckeredBackground() const
2036 return mxData
->mbPreviewUsesCheckeredBackground
;
2040 StyleSettings::operator !=( const StyleSettings
& rSet
) const
2042 return !(*this == rSet
);
2045 const Size
& StyleSettings::GetListBoxPreviewDefaultPixelSize() const
2047 if(0 == mxData
->maListBoxPreviewDefaultPixelSize
.Width() || 0 == mxData
->maListBoxPreviewDefaultPixelSize
.Height())
2049 const_cast< StyleSettings
* >(this)->mxData
->maListBoxPreviewDefaultPixelSize
=
2050 Application::GetDefaultDevice()->LogicToPixel(mxData
->maListBoxPreviewDefaultLogicSize
, MapUnit::MapAppFont
);
2053 return mxData
->maListBoxPreviewDefaultPixelSize
;
2056 void StyleSettings::Set3DColors( const Color
& rColor
)
2059 mxData
->maFaceColor
= rColor
;
2060 mxData
->maLightBorderColor
= rColor
;
2061 mxData
->maMenuBorderColor
= rColor
;
2062 mxData
->maDarkShadowColor
= Color( COL_BLACK
);
2063 if ( rColor
!= Color( COL_LIGHTGRAY
) )
2065 mxData
->maLightColor
= rColor
;
2066 mxData
->maShadowColor
= rColor
;
2067 mxData
->maDarkShadowColor
=rColor
;
2068 mxData
->maLightColor
.IncreaseLuminance( 64 );
2069 mxData
->maShadowColor
.DecreaseLuminance( 64 );
2070 mxData
->maDarkShadowColor
.DecreaseLuminance( 100 );
2071 sal_uLong nRed
= mxData
->maLightColor
.GetRed();
2072 sal_uLong nGreen
= mxData
->maLightColor
.GetGreen();
2073 sal_uLong nBlue
= mxData
->maLightColor
.GetBlue();
2074 nRed
+= (sal_uLong
)(mxData
->maShadowColor
.GetRed());
2075 nGreen
+= (sal_uLong
)(mxData
->maShadowColor
.GetGreen());
2076 nBlue
+= (sal_uLong
)(mxData
->maShadowColor
.GetBlue());
2077 mxData
->maCheckedColor
= Color( (sal_uInt8
)(nRed
/2), (sal_uInt8
)(nGreen
/2), (sal_uInt8
)(nBlue
/2) );
2081 mxData
->maCheckedColor
= Color( 0x99, 0x99, 0x99 );
2082 mxData
->maLightColor
= Color( COL_WHITE
);
2083 mxData
->maShadowColor
= Color( COL_GRAY
);
2087 void StyleSettings::SetCheckedColorSpecialCase( )
2090 // Light gray checked color special case
2091 if ( GetFaceColor() == COL_LIGHTGRAY
)
2092 mxData
->maCheckedColor
= Color( 0xCC, 0xCC, 0xCC );
2095 sal_uInt8 nRed
= (sal_uInt8
)(((sal_uInt16
)mxData
->maFaceColor
.GetRed() + (sal_uInt16
)mxData
->maLightColor
.GetRed())/2);
2096 sal_uInt8 nGreen
= (sal_uInt8
)(((sal_uInt16
)mxData
->maFaceColor
.GetGreen() + (sal_uInt16
)mxData
->maLightColor
.GetGreen())/2);
2097 sal_uInt8 nBlue
= (sal_uInt8
)(((sal_uInt16
)mxData
->maFaceColor
.GetBlue() + (sal_uInt16
)mxData
->maLightColor
.GetBlue())/2);
2098 mxData
->maCheckedColor
= Color( nRed
, nGreen
, nBlue
);
2102 bool StyleSettings::GetUseImagesInMenus() const
2104 // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
2105 switch (mxData
->meUseImagesInMenus
) {
2106 case TRISTATE_FALSE
:
2110 default: // TRISTATE_INDET:
2111 return GetPreferredUseImagesInMenus();
2115 static BitmapEx
readBitmapEx( const OUString
& rPath
)
2117 OUString
aPath( rPath
);
2118 rtl::Bootstrap::expandMacros( aPath
);
2122 if ( GraphicFilter::LoadGraphic( aPath
, OUString(), aGraphic
) != GRFILTER_OK
)
2124 return aGraphic
.GetBitmapEx();
2127 enum WhichPersona
{ PERSONA_HEADER
, PERSONA_FOOTER
};
2129 /** Update the setting of the Persona header / footer in ImplStyleData */
2130 static void setupPersonaHeaderFooter( WhichPersona eWhich
, OUString
& rHeaderFooter
, BitmapEx
& rHeaderFooterBitmap
, boost::optional
<Color
>& rMenuBarTextColor
)
2132 uno::Reference
< uno::XComponentContext
> xContext( comphelper::getProcessComponentContext() );
2133 if ( !xContext
.is() )
2136 // don't burn time loading images we don't need.
2137 if ( Application::IsHeadlessModeEnabled() )
2140 // read from the configuration
2141 OUString
aPersona( officecfg::Office::Common::Misc::Persona::get( xContext
) );
2142 OUString
aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get( xContext
) );
2144 // have the settings changed? marks if header /footer prepared before
2145 //should maybe extended to a flag that marks if header /footer /both are loaded
2146 OUString aOldValue
= eWhich
==PERSONA_HEADER
?OUString(aPersona
+ ";" + aPersonaSettings
+";h" ):OUString(aPersona
+ ";" + aPersonaSettings
+";f" );
2147 if ( rHeaderFooter
== aOldValue
)
2150 rHeaderFooter
= aOldValue
;
2151 rHeaderFooterBitmap
= BitmapEx();
2152 rMenuBarTextColor
= boost::none
;
2154 // now read the new values and setup bitmaps
2155 OUString aHeader
, aFooter
;
2156 if ( aPersona
== "own" || aPersona
== "default" )
2158 sal_Int32 nIndex
= 0;
2159 aHeader
= aPersonaSettings
.getToken( 0, ';', nIndex
);
2161 aFooter
= aPersonaSettings
.getToken( 0, ';', nIndex
);
2163 // change menu text color, advance nIndex to skip the '#'
2166 OUString aColor
= aPersonaSettings
.getToken( 0, ';', ++nIndex
);
2167 rMenuBarTextColor
= Color( aColor
.toUInt64( 16 ) );
2173 case PERSONA_HEADER
: aName
= aHeader
; break;
2174 case PERSONA_FOOTER
: aName
= aFooter
; break;
2177 if ( !aName
.isEmpty() )
2179 OUString
gallery("");
2180 // try the gallery first, then the program path:
2181 if ( aPersona
== "own" && !aPersonaSettings
.startsWith( "vnd.sun.star.expand" ) )
2183 gallery
= "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
"/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
2184 rtl::Bootstrap::expandMacros( gallery
);
2185 gallery
+= "/user/gallery/personas/";
2187 else if ( aPersona
== "default" )
2189 gallery
= "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER
;
2190 gallery
+= "/gallery/personas/";
2192 rHeaderFooterBitmap
= readBitmapEx( gallery
+ aName
);
2194 if ( rHeaderFooterBitmap
.IsEmpty() )
2195 rHeaderFooterBitmap
= readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
"/" + aName
);
2198 // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
2200 if( rHeaderFooterBitmap
.IsEmpty() )
2202 std::shared_ptr
<comphelper::ConfigurationChanges
> batch(comphelper::ConfigurationChanges::create());
2203 officecfg::Office::Common::Misc::Persona::set( "no", batch
);
2204 officecfg::Office::Common::Misc::PersonaSettings::set( "", batch
);
2209 const BitmapEx
StyleSettings::GetPersonaHeader() const
2211 setupPersonaHeaderFooter( PERSONA_HEADER
, mxData
->maPersonaHeaderFooter
, mxData
->maPersonaHeaderBitmap
, mxData
->maPersonaMenuBarTextColor
);
2212 return mxData
->maPersonaHeaderBitmap
;
2215 const BitmapEx
StyleSettings::GetPersonaFooter() const
2217 setupPersonaHeaderFooter( PERSONA_FOOTER
, mxData
->maPersonaHeaderFooter
, mxData
->maPersonaFooterBitmap
, mxData
->maPersonaMenuBarTextColor
);
2218 return mxData
->maPersonaFooterBitmap
;
2221 const boost::optional
<Color
>& StyleSettings::GetPersonaMenuBarTextColor() const
2224 return mxData
->maPersonaMenuBarTextColor
;
2227 void StyleSettings::SetStandardStyles()
2230 mxData
->SetStandardStyles();
2233 Color
StyleSettings::GetFaceGradientColor() const
2235 // compute a brighter face color that can be used in gradients
2236 // for a convex look (eg toolbars)
2239 GetFaceColor().RGBtoHSB( h
, s
, b
);
2242 return Color( Color::HSBtoRGB( h
, s
, b
) );
2245 Color
StyleSettings::GetSeparatorColor() const
2247 // compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
2249 GetShadowColor().RGBtoHSB( h
, s
, b
);
2252 return Color( Color::HSBtoRGB( h
, s
, b
) );
2255 void StyleSettings::CopyData()
2257 // copy if other references exist
2258 if ( ! mxData
.unique() ) {
2259 mxData
= std::make_shared
<ImplStyleData
>(*mxData
);
2263 bool StyleSettings::operator ==( const StyleSettings
& rSet
) const
2265 if ( mxData
== rSet
.mxData
)
2268 if (mxData
->mIconTheme
!= rSet
.mxData
->mIconTheme
) {
2272 if (*mxData
->mIconThemeSelector
!= *rSet
.mxData
->mIconThemeSelector
) {
2276 if ( (mxData
->mnOptions
== rSet
.mxData
->mnOptions
) &&
2277 (mxData
->mbAutoMnemonic
== rSet
.mxData
->mbAutoMnemonic
) &&
2278 (mxData
->mnDragFullOptions
== rSet
.mxData
->mnDragFullOptions
) &&
2279 (mxData
->mnSelectionOptions
== rSet
.mxData
->mnSelectionOptions
) &&
2280 (mxData
->mnDisplayOptions
== rSet
.mxData
->mnDisplayOptions
) &&
2281 (mxData
->mnCursorSize
== rSet
.mxData
->mnCursorSize
) &&
2282 (mxData
->mnCursorBlinkTime
== rSet
.mxData
->mnCursorBlinkTime
) &&
2283 (mxData
->mnBorderSize
== rSet
.mxData
->mnBorderSize
) &&
2284 (mxData
->mnTitleHeight
== rSet
.mxData
->mnTitleHeight
) &&
2285 (mxData
->mnFloatTitleHeight
== rSet
.mxData
->mnFloatTitleHeight
) &&
2286 (mxData
->mnTearOffTitleHeight
== rSet
.mxData
->mnTearOffTitleHeight
) &&
2287 (mxData
->mnScrollBarSize
== rSet
.mxData
->mnScrollBarSize
) &&
2288 (mxData
->mnMinThumbSize
== rSet
.mxData
->mnMinThumbSize
) &&
2289 (mxData
->mnSplitSize
== rSet
.mxData
->mnSplitSize
) &&
2290 (mxData
->mnSpinSize
== rSet
.mxData
->mnSpinSize
) &&
2291 (mxData
->mnAntialiasedMin
== rSet
.mxData
->mnAntialiasedMin
) &&
2292 (mxData
->mbHighContrast
== rSet
.mxData
->mbHighContrast
) &&
2293 (mxData
->mbUseSystemUIFonts
== rSet
.mxData
->mbUseSystemUIFonts
) &&
2294 (mxData
->mnUseFlatBorders
== rSet
.mxData
->mnUseFlatBorders
) &&
2295 (mxData
->mnUseFlatMenus
== rSet
.mxData
->mnUseFlatMenus
) &&
2296 (mxData
->maFaceColor
== rSet
.mxData
->maFaceColor
) &&
2297 (mxData
->maCheckedColor
== rSet
.mxData
->maCheckedColor
) &&
2298 (mxData
->maLightColor
== rSet
.mxData
->maLightColor
) &&
2299 (mxData
->maLightBorderColor
== rSet
.mxData
->maLightBorderColor
) &&
2300 (mxData
->maShadowColor
== rSet
.mxData
->maShadowColor
) &&
2301 (mxData
->maDarkShadowColor
== rSet
.mxData
->maDarkShadowColor
) &&
2302 (mxData
->maButtonTextColor
== rSet
.mxData
->maButtonTextColor
) &&
2303 (mxData
->maRadioCheckTextColor
== rSet
.mxData
->maRadioCheckTextColor
) &&
2304 (mxData
->maGroupTextColor
== rSet
.mxData
->maGroupTextColor
) &&
2305 (mxData
->maLabelTextColor
== rSet
.mxData
->maLabelTextColor
) &&
2306 (mxData
->maWindowColor
== rSet
.mxData
->maWindowColor
) &&
2307 (mxData
->maWindowTextColor
== rSet
.mxData
->maWindowTextColor
) &&
2308 (mxData
->maDialogColor
== rSet
.mxData
->maDialogColor
) &&
2309 (mxData
->maDialogTextColor
== rSet
.mxData
->maDialogTextColor
) &&
2310 (mxData
->maWorkspaceColor
== rSet
.mxData
->maWorkspaceColor
) &&
2311 (mxData
->maMonoColor
== rSet
.mxData
->maMonoColor
) &&
2312 (mxData
->maFieldColor
== rSet
.mxData
->maFieldColor
) &&
2313 (mxData
->maFieldTextColor
== rSet
.mxData
->maFieldTextColor
) &&
2314 (mxData
->maActiveColor
== rSet
.mxData
->maActiveColor
) &&
2315 (mxData
->maActiveTextColor
== rSet
.mxData
->maActiveTextColor
) &&
2316 (mxData
->maActiveBorderColor
== rSet
.mxData
->maActiveBorderColor
) &&
2317 (mxData
->maDeactiveColor
== rSet
.mxData
->maDeactiveColor
) &&
2318 (mxData
->maDeactiveTextColor
== rSet
.mxData
->maDeactiveTextColor
) &&
2319 (mxData
->maDeactiveBorderColor
== rSet
.mxData
->maDeactiveBorderColor
) &&
2320 (mxData
->maMenuColor
== rSet
.mxData
->maMenuColor
) &&
2321 (mxData
->maMenuBarColor
== rSet
.mxData
->maMenuBarColor
) &&
2322 (mxData
->maMenuBarRolloverColor
== rSet
.mxData
->maMenuBarRolloverColor
) &&
2323 (mxData
->maMenuBorderColor
== rSet
.mxData
->maMenuBorderColor
) &&
2324 (mxData
->maMenuTextColor
== rSet
.mxData
->maMenuTextColor
) &&
2325 (mxData
->maMenuBarTextColor
== rSet
.mxData
->maMenuBarTextColor
) &&
2326 (mxData
->maMenuBarRolloverTextColor
== rSet
.mxData
->maMenuBarRolloverTextColor
) &&
2327 (mxData
->maMenuHighlightColor
== rSet
.mxData
->maMenuHighlightColor
) &&
2328 (mxData
->maMenuHighlightTextColor
== rSet
.mxData
->maMenuHighlightTextColor
) &&
2329 (mxData
->maHighlightColor
== rSet
.mxData
->maHighlightColor
) &&
2330 (mxData
->maHighlightTextColor
== rSet
.mxData
->maHighlightTextColor
) &&
2331 (mxData
->maTabTextColor
== rSet
.mxData
->maTabTextColor
) &&
2332 (mxData
->maTabRolloverTextColor
== rSet
.mxData
->maTabRolloverTextColor
) &&
2333 (mxData
->maTabHighlightTextColor
== rSet
.mxData
->maTabHighlightTextColor
) &&
2334 (mxData
->maActiveTabColor
== rSet
.mxData
->maActiveTabColor
) &&
2335 (mxData
->maInactiveTabColor
== rSet
.mxData
->maInactiveTabColor
) &&
2336 (mxData
->maDisableColor
== rSet
.mxData
->maDisableColor
) &&
2337 (mxData
->maHelpColor
== rSet
.mxData
->maHelpColor
) &&
2338 (mxData
->maHelpTextColor
== rSet
.mxData
->maHelpTextColor
) &&
2339 (mxData
->maLinkColor
== rSet
.mxData
->maLinkColor
) &&
2340 (mxData
->maVisitedLinkColor
== rSet
.mxData
->maVisitedLinkColor
) &&
2341 (mxData
->maToolTextColor
== rSet
.mxData
->maToolTextColor
) &&
2342 (mxData
->maHighlightLinkColor
== rSet
.mxData
->maHighlightLinkColor
) &&
2343 (mxData
->maAppFont
== rSet
.mxData
->maAppFont
) &&
2344 (mxData
->maHelpFont
== rSet
.mxData
->maHelpFont
) &&
2345 (mxData
->maTitleFont
== rSet
.mxData
->maTitleFont
) &&
2346 (mxData
->maFloatTitleFont
== rSet
.mxData
->maFloatTitleFont
) &&
2347 (mxData
->maMenuFont
== rSet
.mxData
->maMenuFont
) &&
2348 (mxData
->maToolFont
== rSet
.mxData
->maToolFont
) &&
2349 (mxData
->maGroupFont
== rSet
.mxData
->maGroupFont
) &&
2350 (mxData
->maLabelFont
== rSet
.mxData
->maLabelFont
) &&
2351 (mxData
->maRadioCheckFont
== rSet
.mxData
->maRadioCheckFont
) &&
2352 (mxData
->maPushButtonFont
== rSet
.mxData
->maPushButtonFont
) &&
2353 (mxData
->maFieldFont
== rSet
.mxData
->maFieldFont
) &&
2354 (mxData
->maIconFont
== rSet
.mxData
->maIconFont
) &&
2355 (mxData
->maTabFont
== rSet
.mxData
->maTabFont
) &&
2356 (mxData
->meUseImagesInMenus
== rSet
.mxData
->meUseImagesInMenus
) &&
2357 (mxData
->mbPreferredUseImagesInMenus
== rSet
.mxData
->mbPreferredUseImagesInMenus
) &&
2358 (mxData
->mbSkipDisabledInMenus
== rSet
.mxData
->mbSkipDisabledInMenus
) &&
2359 (mxData
->mbHideDisabledMenuItems
== rSet
.mxData
->mbHideDisabledMenuItems
) &&
2360 (mxData
->mbPreferredContextMenuShortcuts
== rSet
.mxData
->mbPreferredContextMenuShortcuts
)&&
2361 (mxData
->meContextMenuShortcuts
== rSet
.mxData
->meContextMenuShortcuts
) &&
2362 (mxData
->mbPrimaryButtonWarpsSlider
== rSet
.mxData
->mbPrimaryButtonWarpsSlider
) &&
2363 (mxData
->maFontColor
== rSet
.mxData
->maFontColor
) &&
2364 (mxData
->mnEdgeBlending
== rSet
.mxData
->mnEdgeBlending
) &&
2365 (mxData
->maEdgeBlendingTopLeftColor
== rSet
.mxData
->maEdgeBlendingTopLeftColor
) &&
2366 (mxData
->maEdgeBlendingBottomRightColor
== rSet
.mxData
->maEdgeBlendingBottomRightColor
) &&
2367 (mxData
->mnListBoxMaximumLineCount
== rSet
.mxData
->mnListBoxMaximumLineCount
) &&
2368 (mxData
->mnColorValueSetColumnCount
== rSet
.mxData
->mnColorValueSetColumnCount
) &&
2369 (mxData
->mnColorValueSetMaximumRowCount
== rSet
.mxData
->mnColorValueSetMaximumRowCount
) &&
2370 (mxData
->maListBoxPreviewDefaultLogicSize
== rSet
.mxData
->maListBoxPreviewDefaultLogicSize
) &&
2371 (mxData
->maListBoxPreviewDefaultPixelSize
== rSet
.mxData
->maListBoxPreviewDefaultPixelSize
) &&
2372 (mxData
->mnListBoxPreviewDefaultLineWidth
== rSet
.mxData
->mnListBoxPreviewDefaultLineWidth
) &&
2373 (mxData
->mbPreviewUsesCheckeredBackground
== rSet
.mxData
->mbPreviewUsesCheckeredBackground
))
2379 ImplMiscData::ImplMiscData()
2381 mnEnableATT
= TRISTATE_INDET
;
2382 mnDisablePrinting
= TRISTATE_INDET
;
2383 static const char* pEnv
= getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
2384 mbEnableLocalizedDecimalSep
= (pEnv
!= nullptr);
2385 // Should we display any windows?
2387 // need to hardly mask here for now, needs to be adapted of course...
2388 mbPseudoHeadless
= getenv("VCL_HIDE_WINDOWS") || comphelper::LibreOfficeKit::isActive();
2391 ImplMiscData::ImplMiscData( const ImplMiscData
& rData
)
2393 mnEnableATT
= rData
.mnEnableATT
;
2394 mnDisablePrinting
= rData
.mnDisablePrinting
;
2395 mbEnableLocalizedDecimalSep
= rData
.mbEnableLocalizedDecimalSep
;
2396 mbPseudoHeadless
= rData
.mbPseudoHeadless
;
2399 MiscSettings::MiscSettings()
2400 : mxData(std::make_shared
<ImplMiscData
>())
2404 MiscSettings::~MiscSettings()
2408 bool MiscSettings::operator ==( const MiscSettings
& rSet
) const
2410 if ( mxData
== rSet
.mxData
)
2413 if ( (mxData
->mnEnableATT
== rSet
.mxData
->mnEnableATT
) &&
2414 (mxData
->mnDisablePrinting
== rSet
.mxData
->mnDisablePrinting
) &&
2415 (mxData
->mbEnableLocalizedDecimalSep
== rSet
.mxData
->mbEnableLocalizedDecimalSep
) )
2422 MiscSettings::operator !=( const MiscSettings
& rSet
) const
2424 return !(*this == rSet
);
2427 bool MiscSettings::GetDisablePrinting() const
2429 if( mxData
->mnDisablePrinting
== TRISTATE_INDET
)
2432 vcl::SettingsConfigItem::get()->
2433 getValue( "DesktopManagement",
2434 "DisablePrinting" );
2435 mxData
->mnDisablePrinting
= aEnable
.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE
: TRISTATE_FALSE
;
2438 return mxData
->mnDisablePrinting
!= TRISTATE_FALSE
;
2441 bool MiscSettings::GetEnableATToolSupport() const
2445 if( mxData
->mnEnableATT
== TRISTATE_INDET
)
2447 // Check in the Windows registry if an AT tool wants Accessibility support to
2451 if( ERROR_SUCCESS
== RegOpenKey(HKEY_CURRENT_USER
,
2452 "Software\\LibreOffice\\Accessibility\\AtToolSupport",
2456 sal_uInt8 Data
[6]; // possible values: "true", "false", "1", "0", DWORD
2457 DWORD cbData
= sizeof(Data
);
2459 if( ERROR_SUCCESS
== RegQueryValueEx(hkey
, "SupportAssistiveTechnology",
2460 nullptr, &dwType
, Data
, &cbData
) )
2465 mxData
->mnEnableATT
= ((0 == stricmp(reinterpret_cast<const char *>(Data
), "1")) || (0 == stricmp(reinterpret_cast<const char *>(Data
), "true"))) ? TRISTATE_TRUE
: TRISTATE_FALSE
;
2468 switch (reinterpret_cast<DWORD
*>(Data
)[0]) {
2470 mxData
->mnEnableATT
= TRISTATE_FALSE
;
2473 mxData
->mnEnableATT
= TRISTATE_TRUE
;
2476 mxData
->mnEnableATT
= TRISTATE_INDET
;
2477 //TODO: or TRISTATE_TRUE?
2482 // Unsupported registry type
2492 if( mxData
->mnEnableATT
== TRISTATE_INDET
)
2494 static const char* pEnv
= getenv("SAL_ACCESSIBILITY_ENABLED" );
2495 if( !pEnv
|| !*pEnv
)
2498 vcl::SettingsConfigItem::get()->
2499 getValue( "Accessibility",
2500 "EnableATToolSupport" );
2501 mxData
->mnEnableATT
= aEnable
.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE
: TRISTATE_FALSE
;
2505 mxData
->mnEnableATT
= TRISTATE_TRUE
;
2509 return mxData
->mnEnableATT
!= TRISTATE_FALSE
;
2513 void MiscSettings::SetEnableATToolSupport( bool bEnable
)
2515 if ( (bEnable
? TRISTATE_TRUE
: TRISTATE_FALSE
) != mxData
->mnEnableATT
)
2517 if( bEnable
&& !ImplInitAccessBridge() )
2522 // If the accessibility key in the Windows registry exists, change it synchronously
2523 if( ERROR_SUCCESS
== RegOpenKey(HKEY_CURRENT_USER
,
2524 "Software\\LibreOffice\\Accessibility\\AtToolSupport",
2528 sal_uInt8 Data
[6]; // possible values: "true", "false", 1, 0
2529 DWORD cbData
= sizeof(Data
);
2531 if( ERROR_SUCCESS
== RegQueryValueEx(hkey
, "SupportAssistiveTechnology",
2532 nullptr, &dwType
, Data
, &cbData
) )
2537 RegSetValueEx(hkey
, "SupportAssistiveTechnology",
2539 reinterpret_cast<sal_uInt8
const *>(bEnable
? "true" : "false"),
2540 bEnable
? sizeof("true") : sizeof("false"));
2543 reinterpret_cast<DWORD
*>(Data
)[0] = bEnable
? 1 : 0;
2544 RegSetValueEx(hkey
, "SupportAssistiveTechnology",
2545 0, dwType
, Data
, sizeof(DWORD
));
2548 // Unsupported registry type
2556 vcl::SettingsConfigItem::get()->
2557 setValue( "Accessibility",
2558 "EnableATToolSupport",
2559 bEnable
? OUString("true") : OUString("false" ) );
2560 mxData
->mnEnableATT
= bEnable
? TRISTATE_TRUE
: TRISTATE_FALSE
;
2565 void MiscSettings::SetEnableLocalizedDecimalSep( bool bEnable
)
2567 // copy if other references exist
2568 if ( ! mxData
.unique() ) {
2569 mxData
= std::make_shared
<ImplMiscData
>(*mxData
);
2571 mxData
->mbEnableLocalizedDecimalSep
= bEnable
;
2574 bool MiscSettings::GetEnableLocalizedDecimalSep() const
2576 return mxData
->mbEnableLocalizedDecimalSep
;
2579 bool MiscSettings::GetPseudoHeadless() const
2581 return mxData
->mbPseudoHeadless
;
2584 ImplHelpData::ImplHelpData()
2587 mnTipTimeout
= 3000;
2588 mnBalloonDelay
= 1500;
2591 ImplHelpData::ImplHelpData( const ImplHelpData
& rData
)
2593 mnTipDelay
= rData
.mnTipDelay
;
2594 mnTipTimeout
= rData
.mnTipTimeout
;
2595 mnBalloonDelay
= rData
.mnBalloonDelay
;
2598 HelpSettings::HelpSettings()
2599 : mxData(std::make_shared
<ImplHelpData
>())
2603 HelpSettings::~HelpSettings()
2607 bool HelpSettings::operator ==( const HelpSettings
& rSet
) const
2609 if ( mxData
== rSet
.mxData
)
2612 if ( (mxData
->mnTipDelay
== rSet
.mxData
->mnTipDelay
) &&
2613 (mxData
->mnTipTimeout
== rSet
.mxData
->mnTipTimeout
) &&
2614 (mxData
->mnBalloonDelay
== rSet
.mxData
->mnBalloonDelay
) )
2621 HelpSettings::GetTipDelay() const
2623 return mxData
->mnTipDelay
;
2627 HelpSettings::SetTipTimeout( sal_uLong nTipTimeout
)
2629 // copy if other references exist
2630 if ( ! mxData
.unique() ) {
2631 mxData
= std::make_shared
<ImplHelpData
>(*mxData
);
2633 mxData
->mnTipTimeout
= nTipTimeout
;
2637 HelpSettings::GetTipTimeout() const
2639 return mxData
->mnTipTimeout
;
2643 HelpSettings::GetBalloonDelay() const
2645 return mxData
->mnBalloonDelay
;
2649 HelpSettings::operator !=( const HelpSettings
& rSet
) const
2651 return !(*this == rSet
);
2654 ImplAllSettingsData::ImplAllSettingsData()
2656 maLocale( LANGUAGE_SYSTEM
),
2657 maUILocale( LANGUAGE_SYSTEM
)
2659 mnWindowUpdate
= AllSettingsFlags::MOUSE
| AllSettingsFlags::STYLE
|
2660 AllSettingsFlags::MISC
| AllSettingsFlags::LOCALE
;
2661 mpLocaleDataWrapper
= nullptr;
2662 mpUILocaleDataWrapper
= nullptr;
2663 mpI18nHelper
= nullptr;
2664 mpUII18nHelper
= nullptr;
2665 if (!utl::ConfigManager::IsAvoidConfig())
2666 maMiscSettings
.SetEnableLocalizedDecimalSep( maSysLocale
.GetOptions().IsDecimalSeparatorAsLocale() );
2669 ImplAllSettingsData::ImplAllSettingsData( const ImplAllSettingsData
& rData
) :
2670 maMouseSettings( rData
.maMouseSettings
),
2671 maStyleSettings( rData
.maStyleSettings
),
2672 maMiscSettings( rData
.maMiscSettings
),
2673 maHelpSettings( rData
.maHelpSettings
),
2674 maLocale( rData
.maLocale
),
2675 maUILocale( rData
.maUILocale
)
2677 mnWindowUpdate
= rData
.mnWindowUpdate
;
2678 // Pointer couldn't shared and objects haven't a copy ctor
2679 // So we create the cache objects new, if the GetFunction is
2681 mpLocaleDataWrapper
= nullptr;
2682 mpUILocaleDataWrapper
= nullptr;
2683 mpI18nHelper
= nullptr;
2684 mpUII18nHelper
= nullptr;
2687 ImplAllSettingsData::~ImplAllSettingsData()
2689 delete mpLocaleDataWrapper
;
2690 delete mpUILocaleDataWrapper
;
2691 delete mpI18nHelper
;
2692 delete mpUII18nHelper
;
2695 AllSettings::AllSettings()
2696 : mxData(std::make_shared
<ImplAllSettingsData
>())
2700 AllSettings::AllSettings( const AllSettings
& rSet
)
2702 mxData
= rSet
.mxData
;
2705 AllSettings::~AllSettings()
2709 void AllSettings::CopyData()
2711 // copy if other references exist
2712 if ( ! mxData
.unique() ) {
2713 mxData
= std::make_shared
<ImplAllSettingsData
>(*mxData
);
2718 AllSettingsFlags
AllSettings::Update( AllSettingsFlags nFlags
, const AllSettings
& rSet
)
2721 AllSettingsFlags nChangeFlags
= AllSettingsFlags::NONE
;
2723 if ( nFlags
& AllSettingsFlags::MOUSE
)
2725 if ( mxData
->maMouseSettings
!= rSet
.mxData
->maMouseSettings
)
2728 mxData
->maMouseSettings
= rSet
.mxData
->maMouseSettings
;
2729 nChangeFlags
|= AllSettingsFlags::MOUSE
;
2733 if ( nFlags
& AllSettingsFlags::STYLE
)
2735 if ( mxData
->maStyleSettings
!= rSet
.mxData
->maStyleSettings
)
2738 mxData
->maStyleSettings
= rSet
.mxData
->maStyleSettings
;
2739 nChangeFlags
|= AllSettingsFlags::STYLE
;
2743 if ( nFlags
& AllSettingsFlags::MISC
)
2745 if ( mxData
->maMiscSettings
!= rSet
.mxData
->maMiscSettings
)
2748 mxData
->maMiscSettings
= rSet
.mxData
->maMiscSettings
;
2749 nChangeFlags
|= AllSettingsFlags::MISC
;
2753 if ( nFlags
& AllSettingsFlags::LOCALE
)
2755 if ( mxData
->maLocale
!= rSet
.mxData
->maLocale
)
2757 SetLanguageTag( rSet
.mxData
->maLocale
);
2758 nChangeFlags
|= AllSettingsFlags::LOCALE
;
2762 return nChangeFlags
;
2765 AllSettingsFlags
AllSettings::GetChangeFlags( const AllSettings
& rSet
) const
2768 AllSettingsFlags nChangeFlags
= AllSettingsFlags::NONE
;
2770 if ( mxData
->maStyleSettings
!= rSet
.mxData
->maStyleSettings
)
2771 nChangeFlags
|= AllSettingsFlags::STYLE
;
2773 if ( mxData
->maMiscSettings
!= rSet
.mxData
->maMiscSettings
)
2774 nChangeFlags
|= AllSettingsFlags::MISC
;
2776 if ( mxData
->maLocale
!= rSet
.mxData
->maLocale
)
2777 nChangeFlags
|= AllSettingsFlags::LOCALE
;
2779 return nChangeFlags
;
2782 bool AllSettings::operator ==( const AllSettings
& rSet
) const
2784 if ( mxData
== rSet
.mxData
)
2787 if ( (mxData
->maMouseSettings
== rSet
.mxData
->maMouseSettings
) &&
2788 (mxData
->maStyleSettings
== rSet
.mxData
->maStyleSettings
) &&
2789 (mxData
->maMiscSettings
== rSet
.mxData
->maMiscSettings
) &&
2790 (mxData
->maHelpSettings
== rSet
.mxData
->maHelpSettings
) &&
2791 (mxData
->maLocale
== rSet
.mxData
->maLocale
) &&
2792 (mxData
->mnWindowUpdate
== rSet
.mxData
->mnWindowUpdate
) )
2800 void AllSettings::SetLanguageTag( const LanguageTag
& rLanguageTag
)
2802 if (mxData
->maLocale
!= rLanguageTag
)
2806 mxData
->maLocale
= rLanguageTag
;
2808 if ( mxData
->mpLocaleDataWrapper
)
2810 delete mxData
->mpLocaleDataWrapper
;
2811 mxData
->mpLocaleDataWrapper
= nullptr;
2813 if ( mxData
->mpI18nHelper
)
2815 delete mxData
->mpI18nHelper
;
2816 mxData
->mpI18nHelper
= nullptr;
2823 bool GetConfigLayoutRTL(bool bMath
)
2825 static const char* pEnv
= getenv("SAL_RTL_ENABLED" );
2826 static int nUIMirroring
= -1; // -1: undef, 0: auto, 1: on 2: off
2828 // environment always overrides
2834 if( nUIMirroring
== -1 )
2836 nUIMirroring
= 0; // ask configuration only once
2837 utl::OConfigurationNode aNode
= utl::OConfigurationTreeRoot::tryCreateWithComponentContext(
2838 comphelper::getProcessComponentContext(),
2839 "org.openoffice.Office.Common/I18N/CTL" ); // note: case sensitive !
2840 if ( aNode
.isValid() )
2843 css::uno::Any aValue
= aNode
.getNodeValue( OUString("UIMirroring") );
2844 if( aValue
>>= bTmp
)
2846 // found true or false; if it was nil, nothing is changed
2847 nUIMirroring
= bTmp
? 1 : 2;
2852 if( nUIMirroring
== 0 ) // no config found (eg, setup) or default (nil) was set: check language
2854 LanguageType aLang
= LANGUAGE_DONTKNOW
;
2855 ImplSVData
* pSVData
= ImplGetSVData();
2856 if ( pSVData
->maAppData
.mpSettings
)
2857 aLang
= pSVData
->maAppData
.mpSettings
->GetUILanguageTag().getLanguageType();
2859 bRTL
= MsLangId::isRightToLeftMath( aLang
);
2861 bRTL
= MsLangId::isRightToLeft( aLang
);
2864 bRTL
= (nUIMirroring
== 1);
2870 bool AllSettings::GetLayoutRTL()
2872 if (utl::ConfigManager::IsAvoidConfig())
2874 return GetConfigLayoutRTL(false);
2877 bool AllSettings::GetMathLayoutRTL()
2879 if (utl::ConfigManager::IsAvoidConfig())
2881 return GetConfigLayoutRTL(true);
2884 const LanguageTag
& AllSettings::GetLanguageTag() const
2886 if (utl::ConfigManager::IsAvoidConfig())
2888 static LanguageTag
aRet("en-US");
2892 if (comphelper::LibreOfficeKit::isActive())
2893 return comphelper::LibreOfficeKit::getLanguageTag();
2895 // SYSTEM locale means: use settings from SvtSysLocale that is resolved
2896 if ( mxData
->maLocale
.isSystemLocale() )
2897 mxData
->maLocale
= mxData
->maSysLocale
.GetLanguageTag();
2899 return mxData
->maLocale
;
2902 const LanguageTag
& AllSettings::GetUILanguageTag() const
2904 if (utl::ConfigManager::IsAvoidConfig())
2906 static LanguageTag
aRet("en-US");
2910 if (comphelper::LibreOfficeKit::isActive())
2911 return comphelper::LibreOfficeKit::getLanguageTag();
2913 // the UILocale is never changed
2914 if ( mxData
->maUILocale
.isSystemLocale() )
2915 mxData
->maUILocale
= mxData
->maSysLocale
.GetUILanguageTag();
2917 return mxData
->maUILocale
;
2920 const LocaleDataWrapper
& AllSettings::GetLocaleDataWrapper() const
2922 if ( !mxData
->mpLocaleDataWrapper
)
2923 const_cast<AllSettings
*>(this)->mxData
->mpLocaleDataWrapper
= new LocaleDataWrapper(
2924 comphelper::getProcessComponentContext(), GetLanguageTag() );
2925 return *mxData
->mpLocaleDataWrapper
;
2928 const LocaleDataWrapper
& AllSettings::GetUILocaleDataWrapper() const
2930 if ( !mxData
->mpUILocaleDataWrapper
)
2931 const_cast<AllSettings
*>(this)->mxData
->mpUILocaleDataWrapper
= new LocaleDataWrapper(
2932 comphelper::getProcessComponentContext(), GetUILanguageTag() );
2933 return *mxData
->mpUILocaleDataWrapper
;
2936 const vcl::I18nHelper
& AllSettings::GetLocaleI18nHelper() const
2938 if ( !mxData
->mpI18nHelper
) {
2939 const_cast<AllSettings
*>(this)->mxData
->mpI18nHelper
= new vcl::I18nHelper(
2940 comphelper::getProcessComponentContext(), GetLanguageTag() );
2942 return *mxData
->mpI18nHelper
;
2945 const vcl::I18nHelper
& AllSettings::GetUILocaleI18nHelper() const
2947 if ( !mxData
->mpUII18nHelper
) {
2948 const_cast<AllSettings
*>(this)->mxData
->mpUII18nHelper
= new vcl::I18nHelper(
2949 comphelper::getProcessComponentContext(), GetUILanguageTag() );
2951 return *mxData
->mpUII18nHelper
;
2954 void AllSettings::LocaleSettingsChanged( ConfigurationHints nHint
)
2956 AllSettings
aAllSettings( Application::GetSettings() );
2957 if ( nHint
& ConfigurationHints::DecSep
)
2959 MiscSettings aMiscSettings
= aAllSettings
.GetMiscSettings();
2960 bool bIsDecSepAsLocale
= aAllSettings
.mxData
->maSysLocale
.GetOptions().IsDecimalSeparatorAsLocale();
2961 if ( aMiscSettings
.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale
)
2963 aMiscSettings
.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale
);
2964 aAllSettings
.SetMiscSettings( aMiscSettings
);
2968 if ( nHint
& ConfigurationHints::Locale
)
2969 aAllSettings
.SetLanguageTag( aAllSettings
.mxData
->maSysLocale
.GetOptions().GetLanguageTag() );
2971 Application::SetSettings( aAllSettings
);
2974 const StyleSettings
&
2975 AllSettings::GetStyleSettings() const
2977 return mxData
->maStyleSettings
;
2980 StyleSettingsOptions
2981 StyleSettings::GetOptions() const
2983 return mxData
->mnOptions
;
2986 std::vector
<vcl::IconThemeInfo
>
2987 StyleSettings::GetInstalledIconThemes() const
2989 return mxData
->mIconThemeScanner
->GetFoundIconThemes();
2993 StyleSettings::GetAutomaticallyChosenIconTheme() const
2995 OUString desktopEnvironment
= Application::GetDesktopEnvironment();
2996 OUString themeName
= mxData
->mIconThemeSelector
->SelectIconThemeForDesktopEnvironment(
2997 mxData
->mIconThemeScanner
->GetFoundIconThemes(),
3004 StyleSettings::SetIconTheme(const OUString
& theme
)
3007 mxData
->mIconTheme
= theme
;
3011 StyleSettings::DetermineIconTheme() const
3013 OUString
sTheme(mxData
->mIconTheme
);
3014 if (sTheme
.isEmpty())
3016 // read from the configuration, or fallback to what the desktop wants
3017 uno::Reference
<uno::XComponentContext
> xContext(comphelper::getProcessComponentContext());
3020 sTheme
= officecfg::Office::Common::Misc::SymbolStyle::get(xContext
);
3022 if (sTheme
.isEmpty() || sTheme
== "auto")
3023 sTheme
= GetAutomaticallyChosenIconTheme();
3027 OUString r
= mxData
->mIconThemeSelector
->SelectIconTheme(
3028 mxData
->mIconThemeScanner
->GetFoundIconThemes(),
3034 StyleSettings::SetHighContrastMode(bool bHighContrast
)
3036 if (mxData
->mbHighContrast
== bHighContrast
) {
3041 mxData
->mbHighContrast
= bHighContrast
;
3042 mxData
->mIconThemeSelector
->SetUseHighContrastTheme(bHighContrast
);
3046 StyleSettings::GetHighContrastMode() const
3048 return mxData
->mbHighContrast
;
3052 StyleSettings::SetPreferredIconTheme(const OUString
& theme
, bool bDarkIconTheme
)
3054 mxData
->mIconThemeSelector
->SetPreferredIconTheme(theme
, bDarkIconTheme
);
3058 AllSettings::SetMouseSettings( const MouseSettings
& rSet
)
3061 mxData
->maMouseSettings
= rSet
;
3064 const MouseSettings
&
3065 AllSettings::GetMouseSettings() const
3067 return mxData
->maMouseSettings
;
3071 AllSettings::SetStyleSettings( const StyleSettings
& rSet
)
3074 mxData
->maStyleSettings
= rSet
;
3078 AllSettings::SetMiscSettings( const MiscSettings
& rSet
)
3081 mxData
->maMiscSettings
= rSet
;
3085 AllSettings::GetMiscSettings() const
3087 return mxData
->maMiscSettings
;
3091 AllSettings::SetHelpSettings( const HelpSettings
& rSet
)
3094 mxData
->maHelpSettings
= rSet
;
3098 AllSettings::GetHelpSettings() const
3100 return mxData
->maHelpSettings
;
3104 AllSettings::GetWindowUpdate() const
3106 return mxData
->mnWindowUpdate
;
3110 AllSettings::operator !=( const AllSettings
& rSet
) const
3112 return !(*this == rSet
);
3116 AllSettings::GetSysLocale()
3118 return mxData
->maSysLocale
;
3122 void StyleSettings::BatchSetBackgrounds( const Color
&aBackColor
,
3123 bool bCheckedColorSpecialCase
)
3125 Set3DColors( aBackColor
);
3126 SetFaceColor( aBackColor
);
3127 SetDialogColor( aBackColor
);
3128 SetWorkspaceColor( aBackColor
);
3130 if (bCheckedColorSpecialCase
)
3131 SetCheckedColorSpecialCase();
3134 void StyleSettings::BatchSetFonts( const vcl::Font
& aAppFont
,
3135 const vcl::Font
& aLabelFont
)
3137 SetAppFont( aAppFont
);
3138 SetPushButtonFont( aAppFont
);
3139 SetToolFont( aAppFont
);
3140 SetHelpFont( aAppFont
);
3142 SetMenuFont( aLabelFont
);
3143 SetTabFont( aLabelFont
);
3144 SetLabelFont( aLabelFont
);
3145 SetRadioCheckFont( aLabelFont
);
3146 SetFieldFont( aLabelFont
);
3147 SetGroupFont( aLabelFont
);
3148 SetIconFont( aLabelFont
);
3151 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */