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>
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/ImageTree.hxx>
45 #include <vcl/configsettings.hxx>
46 #include <vcl/gradient.hxx>
47 #include <vcl/outdev.hxx>
49 #include "unotools/fontcfg.hxx"
50 #include "unotools/localedatawrapper.hxx"
51 #include "unotools/collatorwrapper.hxx"
52 #include "unotools/confignode.hxx"
53 #include "unotools/configmgr.hxx"
54 #include "unotools/syslocaleoptions.hxx"
56 using namespace ::com::sun::star
;
63 ImplMouseData( const ImplMouseData
& rData
);
65 MouseSettingsOptions mnOptions
;
66 sal_uInt64 mnDoubleClkTime
;
67 long mnDoubleClkWidth
;
68 long mnDoubleClkHeight
;
69 long mnStartDragWidth
;
70 long mnStartDragHeight
;
71 sal_uInt16 mnStartDragCode
;
72 sal_uInt16 mnContextMenuCode
;
73 sal_uInt16 mnContextMenuClicks
;
74 sal_uLong mnScrollRepeat
;
75 sal_uLong mnButtonStartRepeat
;
76 sal_uLong mnButtonRepeat
;
77 sal_uLong mnActionDelay
;
78 sal_uLong mnMenuDelay
;
79 MouseFollowFlags mnFollow
;
80 MouseMiddleButtonAction mnMiddleButtonAction
;
81 MouseWheelBehaviour mnWheelBehavior
;
87 ImplStyleData( const ImplStyleData
& rData
);
89 void SetStandardStyles();
91 Color maActiveBorderColor
;
93 Color maActiveTextColor
;
94 Color maAlternatingRowColor
;
95 Color maButtonTextColor
;
96 Color maButtonRolloverTextColor
;
98 Color maDarkShadowColor
;
99 Color maDeactiveBorderColor
;
100 Color maDeactiveColor
;
101 Color maDeactiveTextColor
;
103 Color maDialogTextColor
;
104 Color maDisableColor
;
107 Color maFieldTextColor
;
108 Color maFieldRolloverTextColor
;
110 Color maGroupTextColor
;
112 Color maHelpTextColor
;
113 Color maHighlightColor
;
114 Color maHighlightLinkColor
;
115 Color maHighlightTextColor
;
116 Color maLabelTextColor
;
117 Color maLightBorderColor
;
120 Color maMenuBarColor
;
121 Color maMenuBarRolloverColor
;
122 Color maMenuBorderColor
;
124 Color maMenuHighlightColor
;
125 Color maMenuHighlightTextColor
;
126 Color maMenuTextColor
;
127 Color maMenuBarTextColor
;
128 Color maMenuBarRolloverTextColor
;
129 Color maMenuBarHighlightTextColor
;
131 Color maRadioCheckTextColor
;
133 Color maVisitedLinkColor
;
134 Color maToolTextColor
;
136 Color maWindowTextColor
;
137 Color maWorkspaceColor
;
138 Color maActiveTabColor
;
139 Color maInactiveTabColor
;
140 Color maTabTextColor
;
141 Color maTabRolloverTextColor
;
142 Color maTabHighlightTextColor
;
144 vcl::Font maHelpFont
;
145 vcl::Font maTitleFont
;
146 vcl::Font maFloatTitleFont
;
147 vcl::Font maMenuFont
;
148 vcl::Font maToolFont
;
149 vcl::Font maLabelFont
;
150 vcl::Font maRadioCheckFont
;
151 vcl::Font maPushButtonFont
;
152 vcl::Font maFieldFont
;
153 vcl::Font maIconFont
;
155 vcl::Font maGroupFont
;
158 long mnFloatTitleHeight
;
159 long mnTearOffTitleHeight
;
160 long mnScrollBarSize
;
164 long mnAntialiasedMin
;
165 sal_uInt64 mnCursorBlinkTime
;
166 DragFullOptions mnDragFullOptions
;
167 SelectionOptions mnSelectionOptions
;
168 DisplayOptions mnDisplayOptions
;
169 ToolbarIconSize mnToolbarIconSize
;
171 StyleSettingsOptions mnOptions
;
173 bool mbUseSystemUIFonts
;
175 TriState meUseImagesInMenus
;
176 bool mnUseFlatBorders
;
177 bool mbPreferredUseImagesInMenus
;
179 std::shared_ptr
<vcl::IconThemeScanner
>
181 std::shared_ptr
<vcl::IconThemeSelector
>
184 rtl::OUString mIconTheme
;
185 bool mbSkipDisabledInMenus
;
186 bool mbHideDisabledMenuItems
;
187 bool mbPreferredContextMenuShortcuts
;
188 TriState meContextMenuShortcuts
;
189 //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise
190 //primary means scroll by single page. Secondary button takes the alternative behaviour
191 bool mbPrimaryButtonWarpsSlider
;
192 DialogStyle maDialogStyle
;
193 FrameStyle maFrameStyle
;
195 sal_uInt16 mnEdgeBlending
;
196 Color maEdgeBlendingTopLeftColor
;
197 Color maEdgeBlendingBottomRightColor
;
198 sal_uInt16 mnListBoxMaximumLineCount
;
199 sal_uInt16 mnColorValueSetColumnCount
;
200 sal_uInt16 mnColorValueSetMaximumRowCount
;
201 Size maListBoxPreviewDefaultLogicSize
;
202 Size maListBoxPreviewDefaultPixelSize
;
203 sal_uInt16 mnListBoxPreviewDefaultLineWidth
;
204 bool mbPreviewUsesCheckeredBackground
;
206 OUString maPersonaHeaderFooter
; ///< Cache the settings to detect changes.
208 BitmapEx maPersonaHeaderBitmap
; ///< Cache the header bitmap.
209 BitmapEx maPersonaFooterBitmap
; ///< Cache the footer bitmap.
210 boost::optional
<Color
> maPersonaMenuBarTextColor
; ///< Cache the menubar color.
216 ImplMiscData( const ImplMiscData
& rData
);
217 TriState mnEnableATT
;
218 bool mbEnableLocalizedDecimalSep
;
219 TriState mnDisablePrinting
;
220 bool mbPseudoHeadless
;
226 ImplHelpData( const ImplHelpData
& rData
);
228 sal_uLong mnTipDelay
;
229 sal_uLong mnTipTimeout
;
230 sal_uLong mnBalloonDelay
;
233 struct ImplAllSettingsData
235 ImplAllSettingsData();
236 ImplAllSettingsData( const ImplAllSettingsData
& rData
);
237 ~ImplAllSettingsData();
239 MouseSettings maMouseSettings
;
240 StyleSettings maStyleSettings
;
241 MiscSettings maMiscSettings
;
242 HelpSettings maHelpSettings
;
243 LanguageTag maLocale
;
244 AllSettingsFlags mnWindowUpdate
;
245 LanguageTag maUILocale
;
246 LocaleDataWrapper
* mpLocaleDataWrapper
;
247 LocaleDataWrapper
* mpUILocaleDataWrapper
;
248 vcl::I18nHelper
* mpI18nHelper
;
249 vcl::I18nHelper
* mpUII18nHelper
;
250 SvtSysLocale maSysLocale
;
253 ImplMouseData::ImplMouseData()
255 mnOptions
= MouseSettingsOptions::NONE
;
256 mnDoubleClkTime
= 500;
257 mnDoubleClkWidth
= 2;
258 mnDoubleClkHeight
= 2;
259 mnStartDragWidth
= 2;
260 mnStartDragHeight
= 2;
261 mnStartDragCode
= MOUSE_LEFT
;
262 mnContextMenuCode
= MOUSE_RIGHT
;
263 mnContextMenuClicks
= 1;
264 mnMiddleButtonAction
= MouseMiddleButtonAction::AutoScroll
;
265 mnScrollRepeat
= 100;
266 mnButtonStartRepeat
= 370;
270 mnFollow
= MouseFollowFlags::Menu
| MouseFollowFlags::DDList
;
271 mnWheelBehavior
= MouseWheelBehaviour::ALWAYS
;
274 ImplMouseData::ImplMouseData( const ImplMouseData
& rData
)
276 mnOptions
= rData
.mnOptions
;
277 mnDoubleClkTime
= rData
.mnDoubleClkTime
;
278 mnDoubleClkWidth
= rData
.mnDoubleClkWidth
;
279 mnDoubleClkHeight
= rData
.mnDoubleClkHeight
;
280 mnStartDragWidth
= rData
.mnStartDragWidth
;
281 mnStartDragHeight
= rData
.mnStartDragHeight
;
282 mnStartDragCode
= rData
.mnStartDragCode
;
283 mnContextMenuCode
= rData
.mnContextMenuCode
;
284 mnContextMenuClicks
= rData
.mnContextMenuClicks
;
285 mnMiddleButtonAction
= rData
.mnMiddleButtonAction
;
286 mnScrollRepeat
= rData
.mnScrollRepeat
;
287 mnButtonStartRepeat
= rData
.mnButtonStartRepeat
;
288 mnButtonRepeat
= rData
.mnButtonRepeat
;
289 mnActionDelay
= rData
.mnActionDelay
;
290 mnMenuDelay
= rData
.mnMenuDelay
;
291 mnFollow
= rData
.mnFollow
;
292 mnWheelBehavior
= rData
.mnWheelBehavior
;
296 MouseSettings::SetOptions(MouseSettingsOptions nOptions
)
299 mxData
->mnOptions
= nOptions
;
303 MouseSettings::GetOptions() const
305 return mxData
->mnOptions
;
309 MouseSettings::SetDoubleClickTime( sal_uInt64 nDoubleClkTime
)
312 mxData
->mnDoubleClkTime
= nDoubleClkTime
;
316 MouseSettings::GetDoubleClickTime() const
318 return mxData
->mnDoubleClkTime
;
322 MouseSettings::SetDoubleClickWidth( long nDoubleClkWidth
)
325 mxData
->mnDoubleClkWidth
= nDoubleClkWidth
;
329 MouseSettings::GetDoubleClickWidth() const
331 return mxData
->mnDoubleClkWidth
;
335 MouseSettings::SetDoubleClickHeight( long nDoubleClkHeight
)
338 mxData
->mnDoubleClkHeight
= nDoubleClkHeight
;
342 MouseSettings::GetDoubleClickHeight() const
344 return mxData
->mnDoubleClkHeight
;
348 MouseSettings::SetStartDragWidth( long nDragWidth
)
351 mxData
->mnStartDragWidth
= nDragWidth
;
355 MouseSettings::GetStartDragWidth() const
357 return mxData
->mnStartDragWidth
;
361 MouseSettings::SetStartDragHeight( long nDragHeight
)
364 mxData
->mnStartDragHeight
= nDragHeight
;
368 MouseSettings::GetStartDragHeight() const
370 return mxData
->mnStartDragHeight
;
374 MouseSettings::GetStartDragCode() const
376 return mxData
->mnStartDragCode
;
380 MouseSettings::GetContextMenuCode() const
382 return mxData
->mnContextMenuCode
;
386 MouseSettings::GetContextMenuClicks() const
388 return mxData
->mnContextMenuClicks
;
392 MouseSettings::GetScrollRepeat() const
394 return mxData
->mnScrollRepeat
;
398 MouseSettings::GetButtonStartRepeat() const
400 return mxData
->mnButtonStartRepeat
;
404 MouseSettings::SetButtonRepeat( sal_uLong nRepeat
)
407 mxData
->mnButtonRepeat
= nRepeat
;
411 MouseSettings::GetButtonRepeat() const
413 return mxData
->mnButtonRepeat
;
417 MouseSettings::GetActionDelay() const
419 return mxData
->mnActionDelay
;
423 MouseSettings::SetMenuDelay( sal_uLong nDelay
)
426 mxData
->mnMenuDelay
= nDelay
;
430 MouseSettings::GetMenuDelay() const
432 return mxData
->mnMenuDelay
;
436 MouseSettings::SetFollow( MouseFollowFlags nFollow
)
439 mxData
->mnFollow
= nFollow
;
443 MouseSettings::GetFollow() const
445 return mxData
->mnFollow
;
449 MouseSettings::SetMiddleButtonAction( MouseMiddleButtonAction nAction
)
452 mxData
->mnMiddleButtonAction
= nAction
;
455 MouseMiddleButtonAction
456 MouseSettings::GetMiddleButtonAction() const
458 return mxData
->mnMiddleButtonAction
;
462 MouseSettings::SetWheelBehavior( MouseWheelBehaviour nBehavior
)
465 mxData
->mnWheelBehavior
= nBehavior
;
469 MouseSettings::GetWheelBehavior() const
471 return mxData
->mnWheelBehavior
;
475 MouseSettings::operator !=( const MouseSettings
& rSet
) const
477 return !(*this == rSet
);
480 MouseSettings::MouseSettings()
481 : mxData(std::make_shared
<ImplMouseData
>())
485 MouseSettings::~MouseSettings()
489 void MouseSettings::CopyData()
491 // copy if other references exist
492 if ( ! mxData
.unique() ) {
493 mxData
= std::make_shared
<ImplMouseData
>(*mxData
);
497 bool MouseSettings::operator ==( const MouseSettings
& rSet
) const
499 if ( mxData
== rSet
.mxData
)
503 (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
);
522 ImplStyleData::ImplStyleData() :
523 mIconThemeScanner(vcl::IconThemeScanner::Create(vcl::IconThemeScanner::GetStandardIconThemePath())),
524 mIconThemeSelector(new vcl::IconThemeSelector()),
525 maPersonaHeaderFooter(),
526 maPersonaHeaderBitmap(),
527 maPersonaFooterBitmap(),
528 maPersonaMenuBarTextColor()
530 mnScrollBarSize
= 16;
534 mnAntialiasedMin
= 0;
536 mnCursorBlinkTime
= STYLE_CURSOR_NOBLINKTIME
;
537 mnDragFullOptions
= DragFullOptions::All
;
538 mnSelectionOptions
= SelectionOptions::NONE
;
539 mnDisplayOptions
= DisplayOptions::NONE
;
540 mnOptions
= StyleSettingsOptions::NONE
;
541 mbAutoMnemonic
= true;
542 mnToolbarIconSize
= ToolbarIconSize::Unknown
;
543 meUseImagesInMenus
= TRISTATE_INDET
;
544 meContextMenuShortcuts
= TRISTATE_INDET
;
546 maEdgeBlendingTopLeftColor
= RGB_COLORDATA(0xC0, 0xC0, 0xC0);
547 maEdgeBlendingBottomRightColor
= RGB_COLORDATA(0x40, 0x40, 0x40);
548 mnListBoxMaximumLineCount
= 25;
549 mnColorValueSetColumnCount
= 12;
550 mnColorValueSetMaximumRowCount
= 10;
551 maListBoxPreviewDefaultLogicSize
= Size(15, 7);
552 maListBoxPreviewDefaultPixelSize
= Size(0, 0); // on-demand calculated in GetListBoxPreviewDefaultPixelSize()
553 mnListBoxPreviewDefaultLineWidth
= 1;
554 mbPreviewUsesCheckeredBackground
= true;
559 ImplStyleData::ImplStyleData( const ImplStyleData
& rData
) :
560 maActiveBorderColor( rData
.maActiveBorderColor
),
561 maActiveColor( rData
.maActiveColor
),
562 maActiveTextColor( rData
.maActiveTextColor
),
563 maAlternatingRowColor( rData
.maAlternatingRowColor
),
564 maButtonTextColor( rData
.maButtonTextColor
),
565 maButtonRolloverTextColor( rData
.maButtonRolloverTextColor
),
566 maCheckedColor( rData
.maCheckedColor
),
567 maDarkShadowColor( rData
.maDarkShadowColor
),
568 maDeactiveBorderColor( rData
.maDeactiveBorderColor
),
569 maDeactiveColor( rData
.maDeactiveColor
),
570 maDeactiveTextColor( rData
.maDeactiveTextColor
),
571 maDialogColor( rData
.maDialogColor
),
572 maDialogTextColor( rData
.maDialogTextColor
),
573 maDisableColor( rData
.maDisableColor
),
574 maFaceColor( rData
.maFaceColor
),
575 maFieldColor( rData
.maFieldColor
),
576 maFieldTextColor( rData
.maFieldTextColor
),
577 maFieldRolloverTextColor( rData
.maFieldRolloverTextColor
),
578 maFontColor( rData
.maFontColor
),
579 maGroupTextColor( rData
.maGroupTextColor
),
580 maHelpColor( rData
.maHelpColor
),
581 maHelpTextColor( rData
.maHelpTextColor
),
582 maHighlightColor( rData
.maHighlightColor
),
583 maHighlightLinkColor( rData
.maHighlightLinkColor
),
584 maHighlightTextColor( rData
.maHighlightTextColor
),
585 maLabelTextColor( rData
.maLabelTextColor
),
586 maLightBorderColor( rData
.maLightBorderColor
),
587 maLightColor( rData
.maLightColor
),
588 maLinkColor( rData
.maLinkColor
),
589 maMenuBarColor( rData
.maMenuBarColor
),
590 maMenuBarRolloverColor( rData
.maMenuBarRolloverColor
),
591 maMenuBorderColor( rData
.maMenuBorderColor
),
592 maMenuColor( rData
.maMenuColor
),
593 maMenuHighlightColor( rData
.maMenuHighlightColor
),
594 maMenuHighlightTextColor( rData
.maMenuHighlightTextColor
),
595 maMenuTextColor( rData
.maMenuTextColor
),
596 maMenuBarTextColor( rData
.maMenuBarTextColor
),
597 maMenuBarRolloverTextColor( rData
.maMenuBarRolloverTextColor
),
598 maMenuBarHighlightTextColor( rData
.maMenuBarHighlightTextColor
),
599 maMonoColor( rData
.maMonoColor
),
600 maRadioCheckTextColor( rData
.maRadioCheckTextColor
),
601 maShadowColor( rData
.maShadowColor
),
602 maVisitedLinkColor( rData
.maVisitedLinkColor
),
603 maToolTextColor( rData
.maToolTextColor
),
604 maWindowColor( rData
.maWindowColor
),
605 maWindowTextColor( rData
.maWindowTextColor
),
606 maWorkspaceColor( rData
.maWorkspaceColor
),
607 maActiveTabColor( rData
.maActiveTabColor
),
608 maInactiveTabColor( rData
.maInactiveTabColor
),
609 maTabTextColor( rData
.maTabTextColor
),
610 maTabRolloverTextColor( rData
.maTabRolloverTextColor
),
611 maTabHighlightTextColor( rData
.maTabHighlightTextColor
),
612 maAppFont( rData
.maAppFont
),
613 maHelpFont( rData
.maAppFont
),
614 maTitleFont( rData
.maTitleFont
),
615 maFloatTitleFont( rData
.maFloatTitleFont
),
616 maMenuFont( rData
.maMenuFont
),
617 maToolFont( rData
.maToolFont
),
618 maLabelFont( rData
.maLabelFont
),
619 maRadioCheckFont( rData
.maRadioCheckFont
),
620 maPushButtonFont( rData
.maPushButtonFont
),
621 maFieldFont( rData
.maFieldFont
),
622 maIconFont( rData
.maIconFont
),
623 maTabFont( rData
.maTabFont
),
624 maGroupFont( rData
.maGroupFont
),
625 mIconTheme(rData
.mIconTheme
),
626 maDialogStyle( rData
.maDialogStyle
),
627 maFrameStyle( rData
.maFrameStyle
),
628 maPersonaHeaderFooter( rData
.maPersonaHeaderFooter
),
629 maPersonaHeaderBitmap( rData
.maPersonaHeaderBitmap
),
630 maPersonaFooterBitmap( rData
.maPersonaFooterBitmap
),
631 maPersonaMenuBarTextColor( rData
.maPersonaMenuBarTextColor
)
633 mnBorderSize
= rData
.mnBorderSize
;
634 mnTitleHeight
= rData
.mnTitleHeight
;
635 mnFloatTitleHeight
= rData
.mnFloatTitleHeight
;
636 mnTearOffTitleHeight
= rData
.mnTearOffTitleHeight
;
637 mnScrollBarSize
= rData
.mnScrollBarSize
;
638 mnMinThumbSize
= rData
.mnMinThumbSize
;
639 mnSplitSize
= rData
.mnSplitSize
;
640 mnSpinSize
= rData
.mnSpinSize
;
641 mnAntialiasedMin
= rData
.mnAntialiasedMin
;
642 mnCursorSize
= rData
.mnCursorSize
;
643 mnCursorBlinkTime
= rData
.mnCursorBlinkTime
;
644 mnDragFullOptions
= rData
.mnDragFullOptions
;
645 mnSelectionOptions
= rData
.mnSelectionOptions
;
646 mnDisplayOptions
= rData
.mnDisplayOptions
;
647 mnOptions
= rData
.mnOptions
;
648 mbHighContrast
= rData
.mbHighContrast
;
649 mbUseSystemUIFonts
= rData
.mbUseSystemUIFonts
;
650 mnUseFlatBorders
= rData
.mnUseFlatBorders
;
651 mnUseFlatMenus
= rData
.mnUseFlatMenus
;
652 mbAutoMnemonic
= rData
.mbAutoMnemonic
;
653 meUseImagesInMenus
= rData
.meUseImagesInMenus
;
654 mbPreferredUseImagesInMenus
= rData
.mbPreferredUseImagesInMenus
;
655 mbSkipDisabledInMenus
= rData
.mbSkipDisabledInMenus
;
656 mbHideDisabledMenuItems
= rData
.mbHideDisabledMenuItems
;
657 mbPreferredContextMenuShortcuts
= rData
.mbPreferredContextMenuShortcuts
;
658 meContextMenuShortcuts
= rData
.meContextMenuShortcuts
;
659 mbPrimaryButtonWarpsSlider
= rData
.mbPrimaryButtonWarpsSlider
;
660 mnToolbarIconSize
= rData
.mnToolbarIconSize
;
661 mIconThemeScanner
.reset(new vcl::IconThemeScanner(*rData
.mIconThemeScanner
));
662 mIconThemeSelector
.reset(new vcl::IconThemeSelector(*rData
.mIconThemeSelector
));
663 mnEdgeBlending
= rData
.mnEdgeBlending
;
664 maEdgeBlendingTopLeftColor
= rData
.maEdgeBlendingTopLeftColor
;
665 maEdgeBlendingBottomRightColor
= rData
.maEdgeBlendingBottomRightColor
;
666 mnListBoxMaximumLineCount
= rData
.mnListBoxMaximumLineCount
;
667 mnColorValueSetColumnCount
= rData
.mnColorValueSetColumnCount
;
668 mnColorValueSetMaximumRowCount
= rData
.mnColorValueSetMaximumRowCount
;
669 maListBoxPreviewDefaultLogicSize
= rData
.maListBoxPreviewDefaultLogicSize
;
670 maListBoxPreviewDefaultPixelSize
= rData
.maListBoxPreviewDefaultPixelSize
;
671 mnListBoxPreviewDefaultLineWidth
= rData
.mnListBoxPreviewDefaultLineWidth
;
672 mbPreviewUsesCheckeredBackground
= rData
.mbPreviewUsesCheckeredBackground
;
675 void ImplStyleData::SetStandardStyles()
677 vcl::Font
aStdFont( FAMILY_SWISS
, Size( 0, 8 ) );
678 aStdFont
.SetCharSet( osl_getThreadTextEncoding() );
679 aStdFont
.SetWeight( WEIGHT_NORMAL
);
680 if (!utl::ConfigManager::IsAvoidConfig())
681 aStdFont
.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en")));
683 aStdFont
.SetFamilyName("Liberation Serif");
684 maAppFont
= aStdFont
;
685 maHelpFont
= aStdFont
;
686 maMenuFont
= aStdFont
;
687 maToolFont
= aStdFont
;
688 maGroupFont
= aStdFont
;
689 maLabelFont
= aStdFont
;
690 maRadioCheckFont
= aStdFont
;
691 maPushButtonFont
= aStdFont
;
692 maFieldFont
= aStdFont
;
693 maIconFont
= aStdFont
;
694 maTabFont
= aStdFont
;
695 aStdFont
.SetWeight( WEIGHT_BOLD
);
696 maFloatTitleFont
= aStdFont
;
697 maTitleFont
= aStdFont
;
699 maFaceColor
= Color( COL_LIGHTGRAY
);
700 maCheckedColor
= Color( 0xCC, 0xCC, 0xCC );
701 maLightColor
= Color( COL_WHITE
);
702 maLightBorderColor
= Color( COL_LIGHTGRAY
);
703 maShadowColor
= Color( COL_GRAY
);
704 maDarkShadowColor
= Color( COL_BLACK
);
705 maButtonTextColor
= Color( COL_BLACK
);
706 maButtonRolloverTextColor
= Color( COL_BLACK
);
707 maRadioCheckTextColor
= Color( COL_BLACK
);
708 maGroupTextColor
= Color( COL_BLACK
);
709 maLabelTextColor
= Color( COL_BLACK
);
710 maWindowColor
= Color( COL_WHITE
);
711 maWindowTextColor
= Color( COL_BLACK
);
712 maDialogColor
= Color( COL_LIGHTGRAY
);
713 maDialogTextColor
= Color( COL_BLACK
);
714 maWorkspaceColor
= Color( 0xDF, 0xDF, 0xDE );
715 maMonoColor
= Color( COL_BLACK
);
716 maFieldColor
= Color( COL_WHITE
);
717 maFieldTextColor
= Color( COL_BLACK
);
718 maFieldRolloverTextColor
= Color( COL_BLACK
);
719 maActiveColor
= Color( COL_BLUE
);
720 maActiveTextColor
= Color( COL_WHITE
);
721 maActiveBorderColor
= Color( COL_LIGHTGRAY
);
722 maDeactiveColor
= Color( COL_GRAY
);
723 maDeactiveTextColor
= Color( COL_LIGHTGRAY
);
724 maDeactiveBorderColor
= Color( COL_LIGHTGRAY
);
725 maMenuColor
= Color( COL_LIGHTGRAY
);
726 maMenuBarColor
= Color( COL_LIGHTGRAY
);
727 maMenuBarRolloverColor
= Color( COL_BLUE
);
728 maMenuBorderColor
= Color( COL_LIGHTGRAY
);
729 maMenuTextColor
= Color( COL_BLACK
);
730 maMenuBarTextColor
= Color( COL_BLACK
);
731 maMenuBarRolloverTextColor
= Color( COL_WHITE
);
732 maMenuBarHighlightTextColor
= Color( COL_WHITE
);
733 maMenuHighlightColor
= Color( COL_BLUE
);
734 maMenuHighlightTextColor
= Color( COL_WHITE
);
735 maHighlightColor
= Color( COL_BLUE
);
736 maHighlightTextColor
= Color( COL_WHITE
);
737 maActiveTabColor
= Color( COL_WHITE
);
738 maInactiveTabColor
= Color( COL_LIGHTGRAY
);
739 maTabTextColor
= Color( COL_BLACK
);
740 maTabRolloverTextColor
= Color( COL_BLACK
);
741 maTabHighlightTextColor
= Color( COL_BLACK
);
742 maDisableColor
= Color( COL_GRAY
);
743 maHelpColor
= Color( 0xFF, 0xFF, 0xE0 );
744 maHelpTextColor
= Color( COL_BLACK
);
745 maLinkColor
= Color( COL_BLUE
);
746 maVisitedLinkColor
= Color( 0x00, 0x00, 0xCC );
747 maToolTextColor
= Color( COL_BLACK
);
748 maHighlightLinkColor
= Color( COL_LIGHTBLUE
);
749 maFontColor
= Color( COL_BLACK
);
750 maAlternatingRowColor
= Color( 0xEE, 0xEE, 0xEE );
754 mnFloatTitleHeight
= 13;
755 mnTearOffTitleHeight
= 8;
756 mbHighContrast
= false;
757 mbUseSystemUIFonts
= true;
758 mnUseFlatBorders
= false;
759 mnUseFlatMenus
= false;
760 mbPreferredUseImagesInMenus
= true;
761 mbSkipDisabledInMenus
= false;
762 mbHideDisabledMenuItems
= false;
763 mbPreferredContextMenuShortcuts
= true;
764 mbPrimaryButtonWarpsSlider
= false;
767 StyleSettings::StyleSettings()
768 : mxData(std::make_shared
<ImplStyleData
>())
772 StyleSettings::~StyleSettings()
777 StyleSettings::SetFaceColor( const Color
& rColor
)
780 mxData
->maFaceColor
= rColor
;
784 StyleSettings::GetFaceColor() const
786 return mxData
->maFaceColor
;
790 StyleSettings::SetCheckedColor( const Color
& rColor
)
793 mxData
->maCheckedColor
= rColor
;
797 StyleSettings::GetCheckedColor() const
799 return mxData
->maCheckedColor
;
803 StyleSettings::SetLightColor( const Color
& rColor
)
806 mxData
->maLightColor
= rColor
;
810 StyleSettings::GetLightColor() const
812 return mxData
->maLightColor
;
816 StyleSettings::SetLightBorderColor( const Color
& rColor
)
819 mxData
->maLightBorderColor
= rColor
;
823 StyleSettings::GetLightBorderColor() const
825 return mxData
->maLightBorderColor
;
829 StyleSettings::SetShadowColor( const Color
& rColor
)
832 mxData
->maShadowColor
= rColor
;
836 StyleSettings::GetShadowColor() const
838 return mxData
->maShadowColor
;
842 StyleSettings::SetDarkShadowColor( const Color
& rColor
)
845 mxData
->maDarkShadowColor
= rColor
;
849 StyleSettings::GetDarkShadowColor() const
851 return mxData
->maDarkShadowColor
;
855 StyleSettings::SetButtonTextColor( const Color
& rColor
)
858 mxData
->maButtonTextColor
= rColor
;
862 StyleSettings::GetButtonTextColor() const
864 return mxData
->maButtonTextColor
;
868 StyleSettings::SetButtonRolloverTextColor( const Color
& rColor
)
871 mxData
->maButtonRolloverTextColor
= rColor
;
875 StyleSettings::GetButtonRolloverTextColor() const
877 return mxData
->maButtonRolloverTextColor
;
881 StyleSettings::SetRadioCheckTextColor( const Color
& rColor
)
884 mxData
->maRadioCheckTextColor
= rColor
;
888 StyleSettings::GetRadioCheckTextColor() const
890 return mxData
->maRadioCheckTextColor
;
894 StyleSettings::SetGroupTextColor( const Color
& rColor
)
897 mxData
->maGroupTextColor
= rColor
;
901 StyleSettings::GetGroupTextColor() const
903 return mxData
->maGroupTextColor
;
907 StyleSettings::SetLabelTextColor( const Color
& rColor
)
910 mxData
->maLabelTextColor
= rColor
;
914 StyleSettings::GetLabelTextColor() const
916 return mxData
->maLabelTextColor
;
920 StyleSettings::SetWindowColor( const Color
& rColor
)
923 mxData
->maWindowColor
= rColor
;
927 StyleSettings::GetWindowColor() const
929 return mxData
->maWindowColor
;
933 StyleSettings::SetWindowTextColor( const Color
& rColor
)
936 mxData
->maWindowTextColor
= rColor
;
940 StyleSettings::GetWindowTextColor() const
942 return mxData
->maWindowTextColor
;
946 StyleSettings::SetDialogColor( const Color
& rColor
)
949 mxData
->maDialogColor
= rColor
;
953 StyleSettings::GetDialogColor() const
955 return mxData
->maDialogColor
;
959 StyleSettings::SetDialogTextColor( const Color
& rColor
)
962 mxData
->maDialogTextColor
= rColor
;
966 StyleSettings::GetDialogTextColor() const
968 return mxData
->maDialogTextColor
;
972 StyleSettings::SetWorkspaceColor( const Color
& rColor
)
975 mxData
->maWorkspaceColor
= rColor
;
979 StyleSettings::GetWorkspaceColor() const
981 return mxData
->maWorkspaceColor
;
985 StyleSettings::SetFieldColor( const Color
& rColor
)
988 mxData
->maFieldColor
= rColor
;
992 StyleSettings::GetFieldColor() const
994 return mxData
->maFieldColor
;
998 StyleSettings::SetFieldTextColor( const Color
& rColor
)
1001 mxData
->maFieldTextColor
= rColor
;
1005 StyleSettings::GetFieldTextColor() const
1007 return mxData
->maFieldTextColor
;
1011 StyleSettings::SetFieldRolloverTextColor( const Color
& rColor
)
1014 mxData
->maFieldRolloverTextColor
= rColor
;
1018 StyleSettings::GetFieldRolloverTextColor() const
1020 return mxData
->maFieldRolloverTextColor
;
1024 StyleSettings::SetActiveColor( const Color
& rColor
)
1027 mxData
->maActiveColor
= rColor
;
1031 StyleSettings::GetActiveColor() const
1033 return mxData
->maActiveColor
;
1037 StyleSettings::SetActiveTextColor( const Color
& rColor
)
1040 mxData
->maActiveTextColor
= rColor
;
1044 StyleSettings::GetActiveTextColor() const
1046 return mxData
->maActiveTextColor
;
1050 StyleSettings::SetActiveBorderColor( const Color
& rColor
)
1053 mxData
->maActiveBorderColor
= rColor
;
1057 StyleSettings::GetActiveBorderColor() const
1059 return mxData
->maActiveBorderColor
;
1063 StyleSettings::SetDeactiveColor( const Color
& rColor
)
1066 mxData
->maDeactiveColor
= rColor
;
1070 StyleSettings::GetDeactiveColor() const
1072 return mxData
->maDeactiveColor
;
1076 StyleSettings::SetDeactiveTextColor( const Color
& rColor
)
1079 mxData
->maDeactiveTextColor
= rColor
;
1083 StyleSettings::GetDeactiveTextColor() const
1085 return mxData
->maDeactiveTextColor
;
1089 StyleSettings::SetDeactiveBorderColor( const Color
& rColor
)
1092 mxData
->maDeactiveBorderColor
= rColor
;
1096 StyleSettings::GetDeactiveBorderColor() const
1098 return mxData
->maDeactiveBorderColor
;
1102 StyleSettings::SetHighlightColor( const Color
& rColor
)
1105 mxData
->maHighlightColor
= rColor
;
1109 StyleSettings::GetHighlightColor() const
1111 return mxData
->maHighlightColor
;
1115 StyleSettings::SetHighlightTextColor( const Color
& rColor
)
1118 mxData
->maHighlightTextColor
= rColor
;
1122 StyleSettings::GetHighlightTextColor() const
1124 return mxData
->maHighlightTextColor
;
1128 StyleSettings::SetDisableColor( const Color
& rColor
)
1131 mxData
->maDisableColor
= rColor
;
1135 StyleSettings::GetDisableColor() const
1137 return mxData
->maDisableColor
;
1141 StyleSettings::SetHelpColor( const Color
& rColor
)
1144 mxData
->maHelpColor
= rColor
;
1148 StyleSettings::GetHelpColor() const
1150 return mxData
->maHelpColor
;
1154 StyleSettings::SetHelpTextColor( const Color
& rColor
)
1157 mxData
->maHelpTextColor
= rColor
;
1161 StyleSettings::GetHelpTextColor() const
1163 return mxData
->maHelpTextColor
;
1167 StyleSettings::SetMenuColor( const Color
& rColor
)
1170 mxData
->maMenuColor
= rColor
;
1174 StyleSettings::GetMenuColor() const
1176 return mxData
->maMenuColor
;
1180 StyleSettings::SetMenuBarColor( const Color
& rColor
)
1183 mxData
->maMenuBarColor
= rColor
;
1187 StyleSettings::GetMenuBarColor() const
1189 return mxData
->maMenuBarColor
;
1193 StyleSettings::SetMenuBarRolloverColor( const Color
& rColor
)
1196 mxData
->maMenuBarRolloverColor
= rColor
;
1200 StyleSettings::GetMenuBarRolloverColor() const
1202 return mxData
->maMenuBarRolloverColor
;
1206 StyleSettings::SetMenuBorderColor( const Color
& rColor
)
1209 mxData
->maMenuBorderColor
= rColor
;
1213 StyleSettings::GetMenuBorderColor() const
1215 return mxData
->maMenuBorderColor
;
1219 StyleSettings::SetMenuTextColor( const Color
& rColor
)
1222 mxData
->maMenuTextColor
= rColor
;
1226 StyleSettings::GetMenuTextColor() const
1228 return mxData
->maMenuTextColor
;
1232 StyleSettings::SetMenuBarTextColor( const Color
& rColor
)
1235 mxData
->maMenuBarTextColor
= rColor
;
1239 StyleSettings::GetMenuBarTextColor() const
1241 return mxData
->maMenuBarTextColor
;
1245 StyleSettings::SetMenuBarRolloverTextColor( const Color
& rColor
)
1248 mxData
->maMenuBarRolloverTextColor
= rColor
;
1252 StyleSettings::GetMenuBarRolloverTextColor() const
1254 return mxData
->maMenuBarRolloverTextColor
;
1258 StyleSettings::SetMenuBarHighlightTextColor( const Color
& rColor
)
1261 mxData
->maMenuBarHighlightTextColor
= rColor
;
1265 StyleSettings::GetMenuBarHighlightTextColor() const
1267 return mxData
->maMenuBarHighlightTextColor
;
1271 StyleSettings::SetMenuHighlightColor( const Color
& rColor
)
1274 mxData
->maMenuHighlightColor
= rColor
;
1278 StyleSettings::GetMenuHighlightColor() const
1280 return mxData
->maMenuHighlightColor
;
1284 StyleSettings::SetMenuHighlightTextColor( const Color
& rColor
)
1287 mxData
->maMenuHighlightTextColor
= rColor
;
1291 StyleSettings::GetMenuHighlightTextColor() const
1293 return mxData
->maMenuHighlightTextColor
;
1297 StyleSettings::SetTabTextColor( const Color
& rColor
)
1300 mxData
->maTabTextColor
= rColor
;
1304 StyleSettings::GetTabTextColor() const
1306 return mxData
->maTabTextColor
;
1310 StyleSettings::SetTabRolloverTextColor( const Color
& rColor
)
1313 mxData
->maTabRolloverTextColor
= rColor
;
1317 StyleSettings::GetTabRolloverTextColor() const
1319 return mxData
->maTabRolloverTextColor
;
1323 StyleSettings::SetTabHighlightTextColor( const Color
& rColor
)
1326 mxData
->maTabHighlightTextColor
= rColor
;
1330 StyleSettings::GetTabHighlightTextColor() const
1332 return mxData
->maTabHighlightTextColor
;
1336 StyleSettings::SetLinkColor( const Color
& rColor
)
1339 mxData
->maLinkColor
= rColor
;
1343 StyleSettings::GetLinkColor() const
1345 return mxData
->maLinkColor
;
1349 StyleSettings::SetVisitedLinkColor( const Color
& rColor
)
1352 mxData
->maVisitedLinkColor
= rColor
;
1356 StyleSettings::GetVisitedLinkColor() const
1358 return mxData
->maVisitedLinkColor
;
1362 StyleSettings::SetToolTextColor( const Color
& rColor
)
1365 mxData
->maToolTextColor
= rColor
;
1369 StyleSettings::GetToolTextColor() const
1371 return mxData
->maToolTextColor
;
1375 StyleSettings::GetHighlightLinkColor() const
1377 return mxData
->maHighlightLinkColor
;
1381 StyleSettings::SetMonoColor( const Color
& rColor
)
1384 mxData
->maMonoColor
= rColor
;
1388 StyleSettings::GetMonoColor() const
1390 return mxData
->maMonoColor
;
1394 StyleSettings::SetActiveTabColor( const Color
& rColor
)
1397 mxData
->maActiveTabColor
= rColor
;
1401 StyleSettings::GetActiveTabColor() const
1403 return mxData
->maActiveTabColor
;
1407 StyleSettings::SetInactiveTabColor( const Color
& rColor
)
1410 mxData
->maInactiveTabColor
= rColor
;
1414 StyleSettings::GetInactiveTabColor() const
1416 return mxData
->maInactiveTabColor
;
1420 StyleSettings::GetAlternatingRowColor() const
1422 return mxData
->maAlternatingRowColor
;
1426 StyleSettings::SetUseSystemUIFonts( bool bUseSystemUIFonts
)
1429 mxData
->mbUseSystemUIFonts
= bUseSystemUIFonts
;
1433 StyleSettings::GetUseSystemUIFonts() const
1435 return mxData
->mbUseSystemUIFonts
;
1439 StyleSettings::SetUseFlatBorders( bool bUseFlatBorders
)
1442 mxData
->mnUseFlatBorders
= bUseFlatBorders
;
1446 StyleSettings::GetUseFlatBorders() const
1448 return mxData
->mnUseFlatBorders
;
1452 StyleSettings::SetUseFlatMenus( bool bUseFlatMenus
)
1455 mxData
->mnUseFlatMenus
= bUseFlatMenus
;
1459 StyleSettings::GetUseFlatMenus() const
1461 return mxData
->mnUseFlatMenus
;
1465 StyleSettings::SetUseImagesInMenus( TriState eUseImagesInMenus
)
1468 mxData
->meUseImagesInMenus
= eUseImagesInMenus
;
1472 StyleSettings::SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus
)
1475 mxData
->mbPreferredUseImagesInMenus
= bPreferredUseImagesInMenus
;
1479 StyleSettings::GetPreferredUseImagesInMenus() const
1481 return mxData
->mbPreferredUseImagesInMenus
;
1485 StyleSettings::SetSkipDisabledInMenus( bool bSkipDisabledInMenus
)
1488 mxData
->mbSkipDisabledInMenus
= bSkipDisabledInMenus
;
1492 StyleSettings::GetSkipDisabledInMenus() const
1494 return mxData
->mbSkipDisabledInMenus
;
1498 StyleSettings::SetHideDisabledMenuItems( bool bHideDisabledMenuItems
)
1501 mxData
->mbHideDisabledMenuItems
= bHideDisabledMenuItems
;
1505 StyleSettings::GetHideDisabledMenuItems() const
1507 return mxData
->mbHideDisabledMenuItems
;
1511 StyleSettings::SetContextMenuShortcuts( TriState eContextMenuShortcuts
)
1514 mxData
->meContextMenuShortcuts
= eContextMenuShortcuts
;
1518 StyleSettings::GetContextMenuShortcuts() const
1520 switch (mxData
->meContextMenuShortcuts
)
1522 case TRISTATE_FALSE
:
1526 default: // TRISTATE_INDET:
1527 return GetPreferredContextMenuShortcuts();
1532 StyleSettings::SetPreferredContextMenuShortcuts( bool bContextMenuShortcuts
)
1535 mxData
->mbPreferredContextMenuShortcuts
= bContextMenuShortcuts
;
1539 StyleSettings::GetPreferredContextMenuShortcuts() const
1541 return mxData
->mbPreferredContextMenuShortcuts
;
1545 StyleSettings::SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider
)
1548 mxData
->mbPrimaryButtonWarpsSlider
= bPrimaryButtonWarpsSlider
;
1552 StyleSettings::GetPrimaryButtonWarpsSlider() const
1554 return mxData
->mbPrimaryButtonWarpsSlider
;
1558 StyleSettings::SetAppFont( const vcl::Font
& rFont
)
1561 mxData
->maAppFont
= rFont
;
1565 StyleSettings::GetAppFont() const
1567 return mxData
->maAppFont
;
1571 StyleSettings::SetHelpFont( const vcl::Font
& rFont
)
1574 mxData
->maHelpFont
= rFont
;
1578 StyleSettings::GetHelpFont() const
1580 return mxData
->maHelpFont
;
1584 StyleSettings::SetTitleFont( const vcl::Font
& rFont
)
1587 mxData
->maTitleFont
= rFont
;
1591 StyleSettings::GetTitleFont() const
1593 return mxData
->maTitleFont
;
1597 StyleSettings::SetFloatTitleFont( const vcl::Font
& rFont
)
1600 mxData
->maFloatTitleFont
= rFont
;
1604 StyleSettings::GetFloatTitleFont() const
1606 return mxData
->maFloatTitleFont
;
1610 StyleSettings::SetMenuFont( const vcl::Font
& rFont
)
1613 mxData
->maMenuFont
= rFont
;
1617 StyleSettings::GetMenuFont() const
1619 return mxData
->maMenuFont
;
1623 StyleSettings::SetToolFont( const vcl::Font
& rFont
)
1626 mxData
->maToolFont
= rFont
;
1630 StyleSettings::GetToolFont() const
1632 return mxData
->maToolFont
;
1636 StyleSettings::SetGroupFont( const vcl::Font
& rFont
)
1639 mxData
->maGroupFont
= rFont
;
1643 StyleSettings::GetGroupFont() const
1645 return mxData
->maGroupFont
;
1649 StyleSettings::SetLabelFont( const vcl::Font
& rFont
)
1652 mxData
->maLabelFont
= rFont
;
1656 StyleSettings::GetLabelFont() const
1658 return mxData
->maLabelFont
;
1662 StyleSettings::SetRadioCheckFont( const vcl::Font
& rFont
)
1665 mxData
->maRadioCheckFont
= rFont
;
1669 StyleSettings::GetRadioCheckFont() const
1671 return mxData
->maRadioCheckFont
;
1675 StyleSettings::SetPushButtonFont( const vcl::Font
& rFont
)
1678 mxData
->maPushButtonFont
= rFont
;
1682 StyleSettings::GetPushButtonFont() const
1684 return mxData
->maPushButtonFont
;
1688 StyleSettings::SetFieldFont( const vcl::Font
& rFont
)
1691 mxData
->maFieldFont
= rFont
;
1695 StyleSettings::GetFieldFont() const
1697 return mxData
->maFieldFont
;
1701 StyleSettings::SetIconFont( const vcl::Font
& rFont
)
1704 mxData
->maIconFont
= rFont
;
1708 StyleSettings::GetIconFont() const
1710 return mxData
->maIconFont
;
1714 StyleSettings::SetTabFont( const vcl::Font
& rFont
)
1717 mxData
->maTabFont
= rFont
;
1721 StyleSettings::GetTabFont() const
1723 return mxData
->maTabFont
;
1727 StyleSettings::GetBorderSize() const
1729 return mxData
->mnBorderSize
;
1733 StyleSettings::SetTitleHeight( long nSize
)
1736 mxData
->mnTitleHeight
= nSize
;
1740 StyleSettings::GetTitleHeight() const
1742 return mxData
->mnTitleHeight
;
1746 StyleSettings::SetFloatTitleHeight( long nSize
)
1749 mxData
->mnFloatTitleHeight
= nSize
;
1753 StyleSettings::GetFloatTitleHeight() const
1755 return mxData
->mnFloatTitleHeight
;
1759 StyleSettings::GetTearOffTitleHeight() const
1761 return mxData
->mnTearOffTitleHeight
;
1765 StyleSettings::SetScrollBarSize( long nSize
)
1768 mxData
->mnScrollBarSize
= nSize
;
1772 StyleSettings::GetScrollBarSize() const
1774 return mxData
->mnScrollBarSize
;
1778 StyleSettings::SetMinThumbSize( long nSize
)
1781 mxData
->mnMinThumbSize
= nSize
;
1785 StyleSettings::GetMinThumbSize() const
1787 return mxData
->mnMinThumbSize
;
1791 StyleSettings::SetSpinSize( long nSize
)
1794 mxData
->mnSpinSize
= nSize
;
1798 StyleSettings::GetSpinSize() const
1800 return mxData
->mnSpinSize
;
1804 StyleSettings::GetSplitSize() const
1806 return mxData
->mnSplitSize
;
1810 StyleSettings::SetCursorSize( long nSize
)
1813 mxData
->mnCursorSize
= nSize
;
1817 StyleSettings::GetCursorSize() const
1819 return mxData
->mnCursorSize
;
1823 StyleSettings::SetCursorBlinkTime( sal_uInt64 nBlinkTime
)
1826 mxData
->mnCursorBlinkTime
= nBlinkTime
;
1830 StyleSettings::GetCursorBlinkTime() const
1832 return (long) mxData
->mnCursorBlinkTime
;
1836 StyleSettings::SetDragFullOptions( DragFullOptions nOptions
)
1839 mxData
->mnDragFullOptions
= nOptions
;
1843 StyleSettings::GetDragFullOptions() const
1845 return mxData
->mnDragFullOptions
;
1849 StyleSettings::SetSelectionOptions( SelectionOptions nOptions
)
1852 mxData
->mnSelectionOptions
= nOptions
;
1856 StyleSettings::GetSelectionOptions() const
1858 return mxData
->mnSelectionOptions
;
1862 StyleSettings::SetDisplayOptions( DisplayOptions nOptions
)
1865 mxData
->mnDisplayOptions
= nOptions
;
1869 StyleSettings::GetDisplayOptions() const
1871 return mxData
->mnDisplayOptions
;
1875 StyleSettings::SetAntialiasingMinPixelHeight( long nMinPixel
)
1878 mxData
->mnAntialiasedMin
= nMinPixel
;
1882 StyleSettings::GetAntialiasingMinPixelHeight() const
1884 return mxData
->mnAntialiasedMin
;
1888 StyleSettings::SetOptions( StyleSettingsOptions nOptions
)
1891 mxData
->mnOptions
= nOptions
;
1895 StyleSettings::SetAutoMnemonic( bool bAutoMnemonic
)
1898 mxData
->mbAutoMnemonic
= bAutoMnemonic
;
1902 StyleSettings::GetAutoMnemonic() const
1904 return mxData
->mbAutoMnemonic
;
1908 StyleSettings::GetDockingFloatsSupported()
1910 ImplSVData
* pSVData
= ImplGetSVData();
1911 return pSVData
->maNWFData
.mbCanDetermineWindowPosition
;
1915 StyleSettings::SetFontColor( const Color
& rColor
)
1918 mxData
->maFontColor
= rColor
;
1922 StyleSettings::GetFontColor() const
1924 return mxData
->maFontColor
;
1928 StyleSettings::SetToolbarIconSize( ToolbarIconSize nSize
)
1931 mxData
->mnToolbarIconSize
= nSize
;
1935 StyleSettings::GetToolbarIconSize() const
1937 return mxData
->mnToolbarIconSize
;
1941 StyleSettings::GetDialogStyle() const
1943 return mxData
->maDialogStyle
;
1947 StyleSettings::SetDialogStyle( const DialogStyle
& rStyle
)
1950 mxData
->maDialogStyle
= rStyle
;
1954 StyleSettings::GetFrameStyle() const
1956 return mxData
->maFrameStyle
;
1960 StyleSettings::SetFrameStyle( const FrameStyle
& rStyle
)
1963 mxData
->maFrameStyle
= rStyle
;
1967 StyleSettings::SetEdgeBlending(sal_uInt16 nCount
)
1970 mxData
->mnEdgeBlending
= nCount
;
1974 StyleSettings::GetEdgeBlending() const
1976 return mxData
->mnEdgeBlending
;
1980 StyleSettings::GetEdgeBlendingTopLeftColor() const
1982 return mxData
->maEdgeBlendingTopLeftColor
;
1986 StyleSettings::GetEdgeBlendingBottomRightColor() const
1988 return mxData
->maEdgeBlendingBottomRightColor
;
1992 StyleSettings::SetListBoxMaximumLineCount(sal_uInt16 nCount
)
1995 mxData
->mnListBoxMaximumLineCount
= nCount
;
1999 StyleSettings::GetListBoxMaximumLineCount() const
2001 return mxData
->mnListBoxMaximumLineCount
;
2005 StyleSettings::SetColorValueSetColumnCount(sal_uInt16 nCount
)
2008 mxData
->mnColorValueSetColumnCount
= nCount
;
2012 StyleSettings::GetColorValueSetColumnCount() const
2014 return mxData
->mnColorValueSetColumnCount
;
2018 StyleSettings::GetColorValueSetMaximumRowCount() const
2020 return mxData
->mnColorValueSetMaximumRowCount
;
2024 StyleSettings::GetListBoxPreviewDefaultLineWidth() const
2026 return mxData
->mnListBoxPreviewDefaultLineWidth
;
2030 StyleSettings::SetPreviewUsesCheckeredBackground(bool bNew
)
2033 mxData
->mbPreviewUsesCheckeredBackground
= bNew
;
2037 StyleSettings::GetPreviewUsesCheckeredBackground() const
2039 return mxData
->mbPreviewUsesCheckeredBackground
;
2043 StyleSettings::operator !=( const StyleSettings
& rSet
) const
2045 return !(*this == rSet
);
2048 const Size
& StyleSettings::GetListBoxPreviewDefaultPixelSize() const
2050 if(0 == mxData
->maListBoxPreviewDefaultPixelSize
.Width() || 0 == mxData
->maListBoxPreviewDefaultPixelSize
.Height())
2052 const_cast< StyleSettings
* >(this)->mxData
->maListBoxPreviewDefaultPixelSize
=
2053 Application::GetDefaultDevice()->LogicToPixel(mxData
->maListBoxPreviewDefaultLogicSize
, MapUnit::MapAppFont
);
2056 return mxData
->maListBoxPreviewDefaultPixelSize
;
2059 void StyleSettings::Set3DColors( const Color
& rColor
)
2062 mxData
->maFaceColor
= rColor
;
2063 mxData
->maLightBorderColor
= rColor
;
2064 mxData
->maMenuBorderColor
= rColor
;
2065 mxData
->maDarkShadowColor
= Color( COL_BLACK
);
2066 if ( rColor
!= Color( COL_LIGHTGRAY
) )
2068 mxData
->maLightColor
= rColor
;
2069 mxData
->maShadowColor
= rColor
;
2070 mxData
->maDarkShadowColor
=rColor
;
2071 mxData
->maLightColor
.IncreaseLuminance( 64 );
2072 mxData
->maShadowColor
.DecreaseLuminance( 64 );
2073 mxData
->maDarkShadowColor
.DecreaseLuminance( 100 );
2074 sal_uLong nRed
= mxData
->maLightColor
.GetRed();
2075 sal_uLong nGreen
= mxData
->maLightColor
.GetGreen();
2076 sal_uLong nBlue
= mxData
->maLightColor
.GetBlue();
2077 nRed
+= (sal_uLong
)(mxData
->maShadowColor
.GetRed());
2078 nGreen
+= (sal_uLong
)(mxData
->maShadowColor
.GetGreen());
2079 nBlue
+= (sal_uLong
)(mxData
->maShadowColor
.GetBlue());
2080 mxData
->maCheckedColor
= Color( (sal_uInt8
)(nRed
/2), (sal_uInt8
)(nGreen
/2), (sal_uInt8
)(nBlue
/2) );
2084 mxData
->maCheckedColor
= Color( 0x99, 0x99, 0x99 );
2085 mxData
->maLightColor
= Color( COL_WHITE
);
2086 mxData
->maShadowColor
= Color( COL_GRAY
);
2090 void StyleSettings::SetCheckedColorSpecialCase( )
2093 // Light gray checked color special case
2094 if ( GetFaceColor() == COL_LIGHTGRAY
)
2095 mxData
->maCheckedColor
= Color( 0xCC, 0xCC, 0xCC );
2098 sal_uInt8 nRed
= (sal_uInt8
)(((sal_uInt16
)mxData
->maFaceColor
.GetRed() + (sal_uInt16
)mxData
->maLightColor
.GetRed())/2);
2099 sal_uInt8 nGreen
= (sal_uInt8
)(((sal_uInt16
)mxData
->maFaceColor
.GetGreen() + (sal_uInt16
)mxData
->maLightColor
.GetGreen())/2);
2100 sal_uInt8 nBlue
= (sal_uInt8
)(((sal_uInt16
)mxData
->maFaceColor
.GetBlue() + (sal_uInt16
)mxData
->maLightColor
.GetBlue())/2);
2101 mxData
->maCheckedColor
= Color( nRed
, nGreen
, nBlue
);
2105 bool StyleSettings::GetUseImagesInMenus() const
2107 // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
2108 switch (mxData
->meUseImagesInMenus
) {
2109 case TRISTATE_FALSE
:
2113 default: // TRISTATE_INDET:
2114 return GetPreferredUseImagesInMenus();
2118 static BitmapEx
readBitmapEx( const OUString
& rPath
)
2120 OUString
aPath( rPath
);
2121 rtl::Bootstrap::expandMacros( aPath
);
2125 if ( GraphicFilter::LoadGraphic( aPath
, OUString(), aGraphic
) != GRFILTER_OK
)
2127 return aGraphic
.GetBitmapEx();
2130 enum WhichPersona
{ PERSONA_HEADER
, PERSONA_FOOTER
};
2132 /** Update the setting of the Persona header / footer in ImplStyleData */
2133 static void setupPersonaHeaderFooter( WhichPersona eWhich
, OUString
& rHeaderFooter
, BitmapEx
& rHeaderFooterBitmap
, boost::optional
<Color
>& rMenuBarTextColor
)
2135 uno::Reference
< uno::XComponentContext
> xContext( comphelper::getProcessComponentContext() );
2136 if ( !xContext
.is() )
2139 // don't burn time loading images we don't need.
2140 if ( Application::IsHeadlessModeEnabled() )
2143 // read from the configuration
2144 OUString
aPersona( officecfg::Office::Common::Misc::Persona::get( xContext
) );
2145 OUString
aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get( xContext
) );
2147 // have the settings changed? marks if header /footer prepared before
2148 //should maybe extended to a flag that marks if header /footer /both are loaded
2149 OUString aOldValue
= eWhich
==PERSONA_HEADER
?OUString(aPersona
+ ";" + aPersonaSettings
+";h" ):OUString(aPersona
+ ";" + aPersonaSettings
+";f" );
2150 if ( rHeaderFooter
== aOldValue
)
2153 rHeaderFooter
= aOldValue
;
2154 rHeaderFooterBitmap
= BitmapEx();
2155 rMenuBarTextColor
= boost::none
;
2157 // now read the new values and setup bitmaps
2158 OUString aHeader
, aFooter
;
2159 if ( aPersona
== "own" || aPersona
== "default" )
2161 sal_Int32 nIndex
= 0;
2162 aHeader
= aPersonaSettings
.getToken( 0, ';', nIndex
);
2164 aFooter
= aPersonaSettings
.getToken( 0, ';', nIndex
);
2166 // change menu text color, advance nIndex to skip the '#'
2169 OUString aColor
= aPersonaSettings
.getToken( 0, ';', ++nIndex
);
2170 rMenuBarTextColor
= Color( aColor
.toUInt64( 16 ) );
2176 case PERSONA_HEADER
: aName
= aHeader
; break;
2177 case PERSONA_FOOTER
: aName
= aFooter
; break;
2180 if ( !aName
.isEmpty() )
2182 OUString
gallery("");
2183 // try the gallery first, then the program path:
2184 if ( aPersona
== "own" && !aPersonaSettings
.startsWith( "vnd.sun.star.expand" ) )
2186 gallery
= "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
"/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
2187 rtl::Bootstrap::expandMacros( gallery
);
2188 gallery
+= "/user/gallery/personas/";
2190 else if ( aPersona
== "default" )
2192 gallery
= "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER
;
2193 gallery
+= "/gallery/personas/";
2195 rHeaderFooterBitmap
= readBitmapEx( gallery
+ aName
);
2197 if ( rHeaderFooterBitmap
.IsEmpty() )
2198 rHeaderFooterBitmap
= readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
"/" + aName
);
2201 // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
2203 if( rHeaderFooterBitmap
.IsEmpty() )
2205 std::shared_ptr
<comphelper::ConfigurationChanges
> batch(comphelper::ConfigurationChanges::create());
2206 officecfg::Office::Common::Misc::Persona::set( "no", batch
);
2207 officecfg::Office::Common::Misc::PersonaSettings::set( "", batch
);
2212 const BitmapEx
StyleSettings::GetPersonaHeader() const
2214 setupPersonaHeaderFooter( PERSONA_HEADER
, mxData
->maPersonaHeaderFooter
, mxData
->maPersonaHeaderBitmap
, mxData
->maPersonaMenuBarTextColor
);
2215 return mxData
->maPersonaHeaderBitmap
;
2218 const BitmapEx
StyleSettings::GetPersonaFooter() const
2220 setupPersonaHeaderFooter( PERSONA_FOOTER
, mxData
->maPersonaHeaderFooter
, mxData
->maPersonaFooterBitmap
, mxData
->maPersonaMenuBarTextColor
);
2221 return mxData
->maPersonaFooterBitmap
;
2224 const boost::optional
<Color
>& StyleSettings::GetPersonaMenuBarTextColor() const
2227 return mxData
->maPersonaMenuBarTextColor
;
2230 void StyleSettings::SetStandardStyles()
2233 mxData
->SetStandardStyles();
2236 Color
StyleSettings::GetFaceGradientColor() const
2238 // compute a brighter face color that can be used in gradients
2239 // for a convex look (eg toolbars)
2242 GetFaceColor().RGBtoHSB( h
, s
, b
);
2245 return Color( Color::HSBtoRGB( h
, s
, b
) );
2248 Color
StyleSettings::GetSeparatorColor() const
2250 // compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
2252 GetShadowColor().RGBtoHSB( h
, s
, b
);
2255 return Color( Color::HSBtoRGB( h
, s
, b
) );
2258 void StyleSettings::CopyData()
2260 // copy if other references exist
2261 if ( ! mxData
.unique() ) {
2262 mxData
= std::make_shared
<ImplStyleData
>(*mxData
);
2266 bool StyleSettings::operator ==( const StyleSettings
& rSet
) const
2268 if ( mxData
== rSet
.mxData
)
2271 if (mxData
->mIconTheme
!= rSet
.mxData
->mIconTheme
) {
2275 if (*mxData
->mIconThemeSelector
!= *rSet
.mxData
->mIconThemeSelector
) {
2279 return (mxData
->mnOptions
== rSet
.mxData
->mnOptions
) &&
2280 (mxData
->mbAutoMnemonic
== rSet
.mxData
->mbAutoMnemonic
) &&
2281 (mxData
->mnDragFullOptions
== rSet
.mxData
->mnDragFullOptions
) &&
2282 (mxData
->mnSelectionOptions
== rSet
.mxData
->mnSelectionOptions
) &&
2283 (mxData
->mnDisplayOptions
== rSet
.mxData
->mnDisplayOptions
) &&
2284 (mxData
->mnCursorSize
== rSet
.mxData
->mnCursorSize
) &&
2285 (mxData
->mnCursorBlinkTime
== rSet
.mxData
->mnCursorBlinkTime
) &&
2286 (mxData
->mnBorderSize
== rSet
.mxData
->mnBorderSize
) &&
2287 (mxData
->mnTitleHeight
== rSet
.mxData
->mnTitleHeight
) &&
2288 (mxData
->mnFloatTitleHeight
== rSet
.mxData
->mnFloatTitleHeight
) &&
2289 (mxData
->mnTearOffTitleHeight
== rSet
.mxData
->mnTearOffTitleHeight
) &&
2290 (mxData
->mnScrollBarSize
== rSet
.mxData
->mnScrollBarSize
) &&
2291 (mxData
->mnMinThumbSize
== rSet
.mxData
->mnMinThumbSize
) &&
2292 (mxData
->mnSplitSize
== rSet
.mxData
->mnSplitSize
) &&
2293 (mxData
->mnSpinSize
== rSet
.mxData
->mnSpinSize
) &&
2294 (mxData
->mnAntialiasedMin
== rSet
.mxData
->mnAntialiasedMin
) &&
2295 (mxData
->mbHighContrast
== rSet
.mxData
->mbHighContrast
) &&
2296 (mxData
->mbUseSystemUIFonts
== rSet
.mxData
->mbUseSystemUIFonts
) &&
2297 (mxData
->mnUseFlatBorders
== rSet
.mxData
->mnUseFlatBorders
) &&
2298 (mxData
->mnUseFlatMenus
== rSet
.mxData
->mnUseFlatMenus
) &&
2299 (mxData
->maFaceColor
== rSet
.mxData
->maFaceColor
) &&
2300 (mxData
->maCheckedColor
== rSet
.mxData
->maCheckedColor
) &&
2301 (mxData
->maLightColor
== rSet
.mxData
->maLightColor
) &&
2302 (mxData
->maLightBorderColor
== rSet
.mxData
->maLightBorderColor
) &&
2303 (mxData
->maShadowColor
== rSet
.mxData
->maShadowColor
) &&
2304 (mxData
->maDarkShadowColor
== rSet
.mxData
->maDarkShadowColor
) &&
2305 (mxData
->maButtonTextColor
== rSet
.mxData
->maButtonTextColor
) &&
2306 (mxData
->maRadioCheckTextColor
== rSet
.mxData
->maRadioCheckTextColor
) &&
2307 (mxData
->maGroupTextColor
== rSet
.mxData
->maGroupTextColor
) &&
2308 (mxData
->maLabelTextColor
== rSet
.mxData
->maLabelTextColor
) &&
2309 (mxData
->maWindowColor
== rSet
.mxData
->maWindowColor
) &&
2310 (mxData
->maWindowTextColor
== rSet
.mxData
->maWindowTextColor
) &&
2311 (mxData
->maDialogColor
== rSet
.mxData
->maDialogColor
) &&
2312 (mxData
->maDialogTextColor
== rSet
.mxData
->maDialogTextColor
) &&
2313 (mxData
->maWorkspaceColor
== rSet
.mxData
->maWorkspaceColor
) &&
2314 (mxData
->maMonoColor
== rSet
.mxData
->maMonoColor
) &&
2315 (mxData
->maFieldColor
== rSet
.mxData
->maFieldColor
) &&
2316 (mxData
->maFieldTextColor
== rSet
.mxData
->maFieldTextColor
) &&
2317 (mxData
->maActiveColor
== rSet
.mxData
->maActiveColor
) &&
2318 (mxData
->maActiveTextColor
== rSet
.mxData
->maActiveTextColor
) &&
2319 (mxData
->maActiveBorderColor
== rSet
.mxData
->maActiveBorderColor
) &&
2320 (mxData
->maDeactiveColor
== rSet
.mxData
->maDeactiveColor
) &&
2321 (mxData
->maDeactiveTextColor
== rSet
.mxData
->maDeactiveTextColor
) &&
2322 (mxData
->maDeactiveBorderColor
== rSet
.mxData
->maDeactiveBorderColor
) &&
2323 (mxData
->maMenuColor
== rSet
.mxData
->maMenuColor
) &&
2324 (mxData
->maMenuBarColor
== rSet
.mxData
->maMenuBarColor
) &&
2325 (mxData
->maMenuBarRolloverColor
== rSet
.mxData
->maMenuBarRolloverColor
) &&
2326 (mxData
->maMenuBorderColor
== rSet
.mxData
->maMenuBorderColor
) &&
2327 (mxData
->maMenuTextColor
== rSet
.mxData
->maMenuTextColor
) &&
2328 (mxData
->maMenuBarTextColor
== rSet
.mxData
->maMenuBarTextColor
) &&
2329 (mxData
->maMenuBarRolloverTextColor
== rSet
.mxData
->maMenuBarRolloverTextColor
) &&
2330 (mxData
->maMenuHighlightColor
== rSet
.mxData
->maMenuHighlightColor
) &&
2331 (mxData
->maMenuHighlightTextColor
== rSet
.mxData
->maMenuHighlightTextColor
) &&
2332 (mxData
->maHighlightColor
== rSet
.mxData
->maHighlightColor
) &&
2333 (mxData
->maHighlightTextColor
== rSet
.mxData
->maHighlightTextColor
) &&
2334 (mxData
->maTabTextColor
== rSet
.mxData
->maTabTextColor
) &&
2335 (mxData
->maTabRolloverTextColor
== rSet
.mxData
->maTabRolloverTextColor
) &&
2336 (mxData
->maTabHighlightTextColor
== rSet
.mxData
->maTabHighlightTextColor
) &&
2337 (mxData
->maActiveTabColor
== rSet
.mxData
->maActiveTabColor
) &&
2338 (mxData
->maInactiveTabColor
== rSet
.mxData
->maInactiveTabColor
) &&
2339 (mxData
->maDisableColor
== rSet
.mxData
->maDisableColor
) &&
2340 (mxData
->maHelpColor
== rSet
.mxData
->maHelpColor
) &&
2341 (mxData
->maHelpTextColor
== rSet
.mxData
->maHelpTextColor
) &&
2342 (mxData
->maLinkColor
== rSet
.mxData
->maLinkColor
) &&
2343 (mxData
->maVisitedLinkColor
== rSet
.mxData
->maVisitedLinkColor
) &&
2344 (mxData
->maToolTextColor
== rSet
.mxData
->maToolTextColor
) &&
2345 (mxData
->maHighlightLinkColor
== rSet
.mxData
->maHighlightLinkColor
) &&
2346 (mxData
->maAppFont
== rSet
.mxData
->maAppFont
) &&
2347 (mxData
->maHelpFont
== rSet
.mxData
->maHelpFont
) &&
2348 (mxData
->maTitleFont
== rSet
.mxData
->maTitleFont
) &&
2349 (mxData
->maFloatTitleFont
== rSet
.mxData
->maFloatTitleFont
) &&
2350 (mxData
->maMenuFont
== rSet
.mxData
->maMenuFont
) &&
2351 (mxData
->maToolFont
== rSet
.mxData
->maToolFont
) &&
2352 (mxData
->maGroupFont
== rSet
.mxData
->maGroupFont
) &&
2353 (mxData
->maLabelFont
== rSet
.mxData
->maLabelFont
) &&
2354 (mxData
->maRadioCheckFont
== rSet
.mxData
->maRadioCheckFont
) &&
2355 (mxData
->maPushButtonFont
== rSet
.mxData
->maPushButtonFont
) &&
2356 (mxData
->maFieldFont
== rSet
.mxData
->maFieldFont
) &&
2357 (mxData
->maIconFont
== rSet
.mxData
->maIconFont
) &&
2358 (mxData
->maTabFont
== rSet
.mxData
->maTabFont
) &&
2359 (mxData
->meUseImagesInMenus
== rSet
.mxData
->meUseImagesInMenus
) &&
2360 (mxData
->mbPreferredUseImagesInMenus
== rSet
.mxData
->mbPreferredUseImagesInMenus
) &&
2361 (mxData
->mbSkipDisabledInMenus
== rSet
.mxData
->mbSkipDisabledInMenus
) &&
2362 (mxData
->mbHideDisabledMenuItems
== rSet
.mxData
->mbHideDisabledMenuItems
) &&
2363 (mxData
->mbPreferredContextMenuShortcuts
== rSet
.mxData
->mbPreferredContextMenuShortcuts
)&&
2364 (mxData
->meContextMenuShortcuts
== rSet
.mxData
->meContextMenuShortcuts
) &&
2365 (mxData
->mbPrimaryButtonWarpsSlider
== rSet
.mxData
->mbPrimaryButtonWarpsSlider
) &&
2366 (mxData
->maFontColor
== rSet
.mxData
->maFontColor
) &&
2367 (mxData
->mnEdgeBlending
== rSet
.mxData
->mnEdgeBlending
) &&
2368 (mxData
->maEdgeBlendingTopLeftColor
== rSet
.mxData
->maEdgeBlendingTopLeftColor
) &&
2369 (mxData
->maEdgeBlendingBottomRightColor
== rSet
.mxData
->maEdgeBlendingBottomRightColor
) &&
2370 (mxData
->mnListBoxMaximumLineCount
== rSet
.mxData
->mnListBoxMaximumLineCount
) &&
2371 (mxData
->mnColorValueSetColumnCount
== rSet
.mxData
->mnColorValueSetColumnCount
) &&
2372 (mxData
->mnColorValueSetMaximumRowCount
== rSet
.mxData
->mnColorValueSetMaximumRowCount
) &&
2373 (mxData
->maListBoxPreviewDefaultLogicSize
== rSet
.mxData
->maListBoxPreviewDefaultLogicSize
) &&
2374 (mxData
->maListBoxPreviewDefaultPixelSize
== rSet
.mxData
->maListBoxPreviewDefaultPixelSize
) &&
2375 (mxData
->mnListBoxPreviewDefaultLineWidth
== rSet
.mxData
->mnListBoxPreviewDefaultLineWidth
) &&
2376 (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 return (mxData
->mnEnableATT
== rSet
.mxData
->mnEnableATT
) &&
2414 (mxData
->mnDisablePrinting
== rSet
.mxData
->mnDisablePrinting
) &&
2415 (mxData
->mbEnableLocalizedDecimalSep
== rSet
.mxData
->mbEnableLocalizedDecimalSep
);
2419 MiscSettings::operator !=( const MiscSettings
& rSet
) const
2421 return !(*this == rSet
);
2424 bool MiscSettings::GetDisablePrinting() const
2426 if( mxData
->mnDisablePrinting
== TRISTATE_INDET
)
2429 vcl::SettingsConfigItem::get()->
2430 getValue( "DesktopManagement",
2431 "DisablePrinting" );
2432 mxData
->mnDisablePrinting
= aEnable
.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE
: TRISTATE_FALSE
;
2435 return mxData
->mnDisablePrinting
!= TRISTATE_FALSE
;
2438 bool MiscSettings::GetEnableATToolSupport() const
2442 if( mxData
->mnEnableATT
== TRISTATE_INDET
)
2444 // Check in the Windows registry if an AT tool wants Accessibility support to
2448 if( ERROR_SUCCESS
== RegOpenKey(HKEY_CURRENT_USER
,
2449 "Software\\LibreOffice\\Accessibility\\AtToolSupport",
2453 sal_uInt8 Data
[6]; // possible values: "true", "false", "1", "0", DWORD
2454 DWORD cbData
= sizeof(Data
);
2456 if( ERROR_SUCCESS
== RegQueryValueEx(hkey
, "SupportAssistiveTechnology",
2457 nullptr, &dwType
, Data
, &cbData
) )
2462 mxData
->mnEnableATT
= ((0 == stricmp(reinterpret_cast<const char *>(Data
), "1")) || (0 == stricmp(reinterpret_cast<const char *>(Data
), "true"))) ? TRISTATE_TRUE
: TRISTATE_FALSE
;
2465 switch (reinterpret_cast<DWORD
*>(Data
)[0]) {
2467 mxData
->mnEnableATT
= TRISTATE_FALSE
;
2470 mxData
->mnEnableATT
= TRISTATE_TRUE
;
2473 mxData
->mnEnableATT
= TRISTATE_INDET
;
2474 //TODO: or TRISTATE_TRUE?
2479 // Unsupported registry type
2489 if( mxData
->mnEnableATT
== TRISTATE_INDET
)
2491 static const char* pEnv
= getenv("SAL_ACCESSIBILITY_ENABLED" );
2492 if( !pEnv
|| !*pEnv
)
2495 vcl::SettingsConfigItem::get()->
2496 getValue( "Accessibility",
2497 "EnableATToolSupport" );
2498 mxData
->mnEnableATT
= aEnable
.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE
: TRISTATE_FALSE
;
2502 mxData
->mnEnableATT
= TRISTATE_TRUE
;
2506 return mxData
->mnEnableATT
!= TRISTATE_FALSE
;
2510 void MiscSettings::SetEnableATToolSupport( bool bEnable
)
2512 if ( (bEnable
? TRISTATE_TRUE
: TRISTATE_FALSE
) != mxData
->mnEnableATT
)
2514 if( bEnable
&& !ImplInitAccessBridge() )
2519 // If the accessibility key in the Windows registry exists, change it synchronously
2520 if( ERROR_SUCCESS
== RegOpenKey(HKEY_CURRENT_USER
,
2521 "Software\\LibreOffice\\Accessibility\\AtToolSupport",
2525 sal_uInt8 Data
[6]; // possible values: "true", "false", 1, 0
2526 DWORD cbData
= sizeof(Data
);
2528 if( ERROR_SUCCESS
== RegQueryValueEx(hkey
, "SupportAssistiveTechnology",
2529 nullptr, &dwType
, Data
, &cbData
) )
2534 RegSetValueEx(hkey
, "SupportAssistiveTechnology",
2536 reinterpret_cast<sal_uInt8
const *>(bEnable
? "true" : "false"),
2537 bEnable
? sizeof("true") : sizeof("false"));
2540 reinterpret_cast<DWORD
*>(Data
)[0] = bEnable
? 1 : 0;
2541 RegSetValueEx(hkey
, "SupportAssistiveTechnology",
2542 0, dwType
, Data
, sizeof(DWORD
));
2545 // Unsupported registry type
2553 vcl::SettingsConfigItem::get()->
2554 setValue( "Accessibility",
2555 "EnableATToolSupport",
2556 bEnable
? OUString("true") : OUString("false" ) );
2557 mxData
->mnEnableATT
= bEnable
? TRISTATE_TRUE
: TRISTATE_FALSE
;
2562 void MiscSettings::SetEnableLocalizedDecimalSep( bool bEnable
)
2564 // copy if other references exist
2565 if ( ! mxData
.unique() ) {
2566 mxData
= std::make_shared
<ImplMiscData
>(*mxData
);
2568 mxData
->mbEnableLocalizedDecimalSep
= bEnable
;
2571 bool MiscSettings::GetEnableLocalizedDecimalSep() const
2573 return mxData
->mbEnableLocalizedDecimalSep
;
2576 bool MiscSettings::GetPseudoHeadless() const
2578 return mxData
->mbPseudoHeadless
;
2581 ImplHelpData::ImplHelpData()
2584 mnTipTimeout
= 3000;
2585 mnBalloonDelay
= 1500;
2588 ImplHelpData::ImplHelpData( const ImplHelpData
& rData
)
2590 mnTipDelay
= rData
.mnTipDelay
;
2591 mnTipTimeout
= rData
.mnTipTimeout
;
2592 mnBalloonDelay
= rData
.mnBalloonDelay
;
2595 HelpSettings::HelpSettings()
2596 : mxData(std::make_shared
<ImplHelpData
>())
2600 HelpSettings::~HelpSettings()
2604 bool HelpSettings::operator ==( const HelpSettings
& rSet
) const
2606 if ( mxData
== rSet
.mxData
)
2609 return (mxData
->mnTipDelay
== rSet
.mxData
->mnTipDelay
) &&
2610 (mxData
->mnTipTimeout
== rSet
.mxData
->mnTipTimeout
) &&
2611 (mxData
->mnBalloonDelay
== rSet
.mxData
->mnBalloonDelay
);
2615 HelpSettings::GetTipDelay() const
2617 return mxData
->mnTipDelay
;
2621 HelpSettings::SetTipTimeout( sal_uLong nTipTimeout
)
2623 // copy if other references exist
2624 if ( ! mxData
.unique() ) {
2625 mxData
= std::make_shared
<ImplHelpData
>(*mxData
);
2627 mxData
->mnTipTimeout
= nTipTimeout
;
2631 HelpSettings::GetTipTimeout() const
2633 return mxData
->mnTipTimeout
;
2637 HelpSettings::GetBalloonDelay() const
2639 return mxData
->mnBalloonDelay
;
2643 HelpSettings::operator !=( const HelpSettings
& rSet
) const
2645 return !(*this == rSet
);
2648 ImplAllSettingsData::ImplAllSettingsData()
2650 maLocale( LANGUAGE_SYSTEM
),
2651 maUILocale( LANGUAGE_SYSTEM
)
2653 mnWindowUpdate
= AllSettingsFlags::MOUSE
| AllSettingsFlags::STYLE
|
2654 AllSettingsFlags::MISC
| AllSettingsFlags::LOCALE
;
2655 mpLocaleDataWrapper
= nullptr;
2656 mpUILocaleDataWrapper
= nullptr;
2657 mpI18nHelper
= nullptr;
2658 mpUII18nHelper
= nullptr;
2659 if (!utl::ConfigManager::IsAvoidConfig())
2660 maMiscSettings
.SetEnableLocalizedDecimalSep( maSysLocale
.GetOptions().IsDecimalSeparatorAsLocale() );
2663 ImplAllSettingsData::ImplAllSettingsData( const ImplAllSettingsData
& rData
) :
2664 maMouseSettings( rData
.maMouseSettings
),
2665 maStyleSettings( rData
.maStyleSettings
),
2666 maMiscSettings( rData
.maMiscSettings
),
2667 maHelpSettings( rData
.maHelpSettings
),
2668 maLocale( rData
.maLocale
),
2669 maUILocale( rData
.maUILocale
)
2671 mnWindowUpdate
= rData
.mnWindowUpdate
;
2672 // Pointer couldn't shared and objects haven't a copy ctor
2673 // So we create the cache objects new, if the GetFunction is
2675 mpLocaleDataWrapper
= nullptr;
2676 mpUILocaleDataWrapper
= nullptr;
2677 mpI18nHelper
= nullptr;
2678 mpUII18nHelper
= nullptr;
2681 ImplAllSettingsData::~ImplAllSettingsData()
2683 delete mpLocaleDataWrapper
;
2684 delete mpUILocaleDataWrapper
;
2685 delete mpI18nHelper
;
2686 delete mpUII18nHelper
;
2689 AllSettings::AllSettings()
2690 : mxData(std::make_shared
<ImplAllSettingsData
>())
2694 AllSettings::AllSettings( const AllSettings
& rSet
)
2696 mxData
= rSet
.mxData
;
2699 AllSettings::~AllSettings()
2703 void AllSettings::CopyData()
2705 // copy if other references exist
2706 if ( ! mxData
.unique() ) {
2707 mxData
= std::make_shared
<ImplAllSettingsData
>(*mxData
);
2712 AllSettingsFlags
AllSettings::Update( AllSettingsFlags nFlags
, const AllSettings
& rSet
)
2715 AllSettingsFlags nChangeFlags
= AllSettingsFlags::NONE
;
2717 if ( nFlags
& AllSettingsFlags::MOUSE
)
2719 if ( mxData
->maMouseSettings
!= rSet
.mxData
->maMouseSettings
)
2722 mxData
->maMouseSettings
= rSet
.mxData
->maMouseSettings
;
2723 nChangeFlags
|= AllSettingsFlags::MOUSE
;
2727 if ( nFlags
& AllSettingsFlags::STYLE
)
2729 if ( mxData
->maStyleSettings
!= rSet
.mxData
->maStyleSettings
)
2732 mxData
->maStyleSettings
= rSet
.mxData
->maStyleSettings
;
2733 nChangeFlags
|= AllSettingsFlags::STYLE
;
2737 if ( nFlags
& AllSettingsFlags::MISC
)
2739 if ( mxData
->maMiscSettings
!= rSet
.mxData
->maMiscSettings
)
2742 mxData
->maMiscSettings
= rSet
.mxData
->maMiscSettings
;
2743 nChangeFlags
|= AllSettingsFlags::MISC
;
2747 if ( nFlags
& AllSettingsFlags::LOCALE
)
2749 if ( mxData
->maLocale
!= rSet
.mxData
->maLocale
)
2751 SetLanguageTag( rSet
.mxData
->maLocale
);
2752 nChangeFlags
|= AllSettingsFlags::LOCALE
;
2756 return nChangeFlags
;
2759 AllSettingsFlags
AllSettings::GetChangeFlags( const AllSettings
& rSet
) const
2762 AllSettingsFlags nChangeFlags
= AllSettingsFlags::NONE
;
2764 if ( mxData
->maStyleSettings
!= rSet
.mxData
->maStyleSettings
)
2765 nChangeFlags
|= AllSettingsFlags::STYLE
;
2767 if ( mxData
->maMiscSettings
!= rSet
.mxData
->maMiscSettings
)
2768 nChangeFlags
|= AllSettingsFlags::MISC
;
2770 if ( mxData
->maLocale
!= rSet
.mxData
->maLocale
)
2771 nChangeFlags
|= AllSettingsFlags::LOCALE
;
2773 return nChangeFlags
;
2776 bool AllSettings::operator ==( const AllSettings
& rSet
) const
2778 if ( mxData
== rSet
.mxData
)
2781 if ( (mxData
->maMouseSettings
== rSet
.mxData
->maMouseSettings
) &&
2782 (mxData
->maStyleSettings
== rSet
.mxData
->maStyleSettings
) &&
2783 (mxData
->maMiscSettings
== rSet
.mxData
->maMiscSettings
) &&
2784 (mxData
->maHelpSettings
== rSet
.mxData
->maHelpSettings
) &&
2785 (mxData
->maLocale
== rSet
.mxData
->maLocale
) &&
2786 (mxData
->mnWindowUpdate
== rSet
.mxData
->mnWindowUpdate
) )
2794 void AllSettings::SetLanguageTag( const LanguageTag
& rLanguageTag
)
2796 if (mxData
->maLocale
!= rLanguageTag
)
2800 mxData
->maLocale
= rLanguageTag
;
2802 if ( mxData
->mpLocaleDataWrapper
)
2804 delete mxData
->mpLocaleDataWrapper
;
2805 mxData
->mpLocaleDataWrapper
= nullptr;
2807 if ( mxData
->mpI18nHelper
)
2809 delete mxData
->mpI18nHelper
;
2810 mxData
->mpI18nHelper
= nullptr;
2817 bool GetConfigLayoutRTL(bool bMath
)
2819 static const char* pEnv
= getenv("SAL_RTL_ENABLED" );
2820 static int nUIMirroring
= -1; // -1: undef, 0: auto, 1: on 2: off
2822 // environment always overrides
2828 if( nUIMirroring
== -1 )
2830 nUIMirroring
= 0; // ask configuration only once
2831 utl::OConfigurationNode aNode
= utl::OConfigurationTreeRoot::tryCreateWithComponentContext(
2832 comphelper::getProcessComponentContext(),
2833 "org.openoffice.Office.Common/I18N/CTL" ); // note: case sensitive !
2834 if ( aNode
.isValid() )
2837 css::uno::Any aValue
= aNode
.getNodeValue( OUString("UIMirroring") );
2838 if( aValue
>>= bTmp
)
2840 // found true or false; if it was nil, nothing is changed
2841 nUIMirroring
= bTmp
? 1 : 2;
2846 if( nUIMirroring
== 0 ) // no config found (eg, setup) or default (nil) was set: check language
2848 LanguageType aLang
= SvtSysLocaleOptions().GetRealUILanguageTag().getLanguageType();
2850 bRTL
= MsLangId::isRightToLeftMath( aLang
);
2852 bRTL
= MsLangId::isRightToLeft( aLang
);
2855 bRTL
= (nUIMirroring
== 1);
2861 bool AllSettings::GetLayoutRTL()
2863 if (utl::ConfigManager::IsAvoidConfig())
2865 return GetConfigLayoutRTL(false);
2868 bool AllSettings::GetMathLayoutRTL()
2870 if (utl::ConfigManager::IsAvoidConfig())
2872 return GetConfigLayoutRTL(true);
2875 const LanguageTag
& AllSettings::GetLanguageTag() const
2877 if (utl::ConfigManager::IsAvoidConfig())
2879 static LanguageTag
aRet("en-US");
2883 // SYSTEM locale means: use settings from SvtSysLocale that is resolved
2884 if ( mxData
->maLocale
.isSystemLocale() )
2885 mxData
->maLocale
= mxData
->maSysLocale
.GetLanguageTag();
2887 return mxData
->maLocale
;
2890 const LanguageTag
& AllSettings::GetUILanguageTag() const
2892 if (utl::ConfigManager::IsAvoidConfig())
2894 static LanguageTag
aRet("en-US");
2898 // the UILocale is never changed
2899 if ( mxData
->maUILocale
.isSystemLocale() )
2900 mxData
->maUILocale
= mxData
->maSysLocale
.GetUILanguageTag();
2902 return mxData
->maUILocale
;
2905 const LocaleDataWrapper
& AllSettings::GetLocaleDataWrapper() const
2907 if ( !mxData
->mpLocaleDataWrapper
)
2908 const_cast<AllSettings
*>(this)->mxData
->mpLocaleDataWrapper
= new LocaleDataWrapper(
2909 comphelper::getProcessComponentContext(), GetLanguageTag() );
2910 return *mxData
->mpLocaleDataWrapper
;
2913 const LocaleDataWrapper
& AllSettings::GetUILocaleDataWrapper() const
2915 if ( !mxData
->mpUILocaleDataWrapper
)
2916 const_cast<AllSettings
*>(this)->mxData
->mpUILocaleDataWrapper
= new LocaleDataWrapper(
2917 comphelper::getProcessComponentContext(), GetUILanguageTag() );
2918 return *mxData
->mpUILocaleDataWrapper
;
2921 const vcl::I18nHelper
& AllSettings::GetLocaleI18nHelper() const
2923 if ( !mxData
->mpI18nHelper
) {
2924 const_cast<AllSettings
*>(this)->mxData
->mpI18nHelper
= new vcl::I18nHelper(
2925 comphelper::getProcessComponentContext(), GetLanguageTag() );
2927 return *mxData
->mpI18nHelper
;
2930 const vcl::I18nHelper
& AllSettings::GetUILocaleI18nHelper() const
2932 if ( !mxData
->mpUII18nHelper
) {
2933 const_cast<AllSettings
*>(this)->mxData
->mpUII18nHelper
= new vcl::I18nHelper(
2934 comphelper::getProcessComponentContext(), GetUILanguageTag() );
2936 return *mxData
->mpUII18nHelper
;
2939 void AllSettings::LocaleSettingsChanged( ConfigurationHints nHint
)
2941 AllSettings
aAllSettings( Application::GetSettings() );
2942 if ( nHint
& ConfigurationHints::DecSep
)
2944 MiscSettings aMiscSettings
= aAllSettings
.GetMiscSettings();
2945 bool bIsDecSepAsLocale
= aAllSettings
.mxData
->maSysLocale
.GetOptions().IsDecimalSeparatorAsLocale();
2946 if ( aMiscSettings
.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale
)
2948 aMiscSettings
.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale
);
2949 aAllSettings
.SetMiscSettings( aMiscSettings
);
2953 if ( nHint
& ConfigurationHints::Locale
)
2954 aAllSettings
.SetLanguageTag( aAllSettings
.mxData
->maSysLocale
.GetOptions().GetLanguageTag() );
2956 Application::SetSettings( aAllSettings
);
2959 const StyleSettings
&
2960 AllSettings::GetStyleSettings() const
2962 return mxData
->maStyleSettings
;
2965 StyleSettingsOptions
2966 StyleSettings::GetOptions() const
2968 return mxData
->mnOptions
;
2971 std::vector
<vcl::IconThemeInfo
>
2972 StyleSettings::GetInstalledIconThemes() const
2974 return mxData
->mIconThemeScanner
->GetFoundIconThemes();
2978 StyleSettings::GetAutomaticallyChosenIconTheme() const
2980 OUString desktopEnvironment
= Application::GetDesktopEnvironment();
2981 OUString themeName
= mxData
->mIconThemeSelector
->SelectIconThemeForDesktopEnvironment(
2982 mxData
->mIconThemeScanner
->GetFoundIconThemes(),
2989 StyleSettings::SetIconTheme(const OUString
& theme
)
2992 mxData
->mIconTheme
= theme
;
2996 StyleSettings::DetermineIconTheme() const
2998 OUString
sTheme(mxData
->mIconTheme
);
2999 if (sTheme
.isEmpty())
3001 if (utl::ConfigManager::IsAvoidConfig())
3005 // read from the configuration, or fallback to what the desktop wants
3006 uno::Reference
<uno::XComponentContext
> xContext(comphelper::getProcessComponentContext());
3009 sTheme
= officecfg::Office::Common::Misc::SymbolStyle::get(xContext
);
3011 if (sTheme
.isEmpty() || sTheme
== "auto")
3012 sTheme
= GetAutomaticallyChosenIconTheme();
3017 OUString r
= mxData
->mIconThemeSelector
->SelectIconTheme(
3018 mxData
->mIconThemeScanner
->GetFoundIconThemes(),
3024 StyleSettings::SetHighContrastMode(bool bHighContrast
)
3026 if (mxData
->mbHighContrast
== bHighContrast
) {
3031 mxData
->mbHighContrast
= bHighContrast
;
3032 mxData
->mIconThemeSelector
->SetUseHighContrastTheme(bHighContrast
);
3036 StyleSettings::GetHighContrastMode() const
3038 return mxData
->mbHighContrast
;
3042 StyleSettings::SetPreferredIconTheme(const OUString
& theme
, bool bDarkIconTheme
)
3044 mxData
->mIconThemeSelector
->SetPreferredIconTheme(theme
, bDarkIconTheme
);
3048 AllSettings::SetMouseSettings( const MouseSettings
& rSet
)
3051 mxData
->maMouseSettings
= rSet
;
3054 const MouseSettings
&
3055 AllSettings::GetMouseSettings() const
3057 return mxData
->maMouseSettings
;
3061 AllSettings::SetStyleSettings( const StyleSettings
& rSet
)
3064 mxData
->maStyleSettings
= rSet
;
3068 AllSettings::SetMiscSettings( const MiscSettings
& rSet
)
3071 mxData
->maMiscSettings
= rSet
;
3075 AllSettings::GetMiscSettings() const
3077 return mxData
->maMiscSettings
;
3081 AllSettings::SetHelpSettings( const HelpSettings
& rSet
)
3084 mxData
->maHelpSettings
= rSet
;
3088 AllSettings::GetHelpSettings() const
3090 return mxData
->maHelpSettings
;
3094 AllSettings::GetWindowUpdate() const
3096 return mxData
->mnWindowUpdate
;
3100 AllSettings::operator !=( const AllSettings
& rSet
) const
3102 return !(*this == rSet
);
3106 AllSettings::GetSysLocale()
3108 return mxData
->maSysLocale
;
3111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */