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 <vcl/graphicfilter.hxx>
36 #include <vcl/IconThemeScanner.hxx>
37 #include <vcl/IconThemeSelector.hxx>
38 #include <vcl/IconThemeInfo.hxx>
39 #include <vcl/svapp.hxx>
40 #include <vcl/event.hxx>
41 #include <vcl/settings.hxx>
42 #include <vcl/i18nhelp.hxx>
43 #include <vcl/implimagetree.hxx>
44 #include <vcl/configsettings.hxx>
45 #include <vcl/gradient.hxx>
46 #include <vcl/outdev.hxx>
48 #include "unotools/fontcfg.hxx"
49 #include "unotools/localedatawrapper.hxx"
50 #include "unotools/collatorwrapper.hxx"
51 #include "unotools/confignode.hxx"
52 #include "unotools/syslocaleoptions.hxx"
54 using namespace ::com::sun::star
;
61 ImplMouseData( const ImplMouseData
& rData
);
63 MouseSettingsOptions mnOptions
;
64 sal_uInt64 mnDoubleClkTime
;
65 long mnDoubleClkWidth
;
66 long mnDoubleClkHeight
;
67 long mnStartDragWidth
;
68 long mnStartDragHeight
;
69 sal_uInt16 mnStartDragCode
;
70 sal_uInt16 mnContextMenuCode
;
71 sal_uInt16 mnContextMenuClicks
;
72 sal_uLong mnScrollRepeat
;
73 sal_uLong mnButtonStartRepeat
;
74 sal_uLong mnButtonRepeat
;
75 sal_uLong mnActionDelay
;
76 sal_uLong mnMenuDelay
;
77 MouseFollowFlags mnFollow
;
78 MouseMiddleButtonAction mnMiddleButtonAction
;
79 MouseWheelBehaviour mnWheelBehavior
;
85 ImplStyleData( const ImplStyleData
& rData
);
87 void SetStandardStyles();
89 Color maActiveBorderColor
;
91 Color maActiveTextColor
;
92 Color maAlternatingRowColor
;
93 Color maButtonTextColor
;
94 Color maButtonRolloverTextColor
;
96 Color maDarkShadowColor
;
97 Color maDeactiveBorderColor
;
98 Color maDeactiveColor
;
99 Color maDeactiveTextColor
;
101 Color maDialogTextColor
;
102 Color maDisableColor
;
105 Color maFieldTextColor
;
106 Color maFieldRolloverTextColor
;
108 Color maGroupTextColor
;
110 Color maHelpTextColor
;
111 Color maHighlightColor
;
112 Color maHighlightLinkColor
;
113 Color maHighlightTextColor
;
114 Color maInfoTextColor
;
115 Color maLabelTextColor
;
116 Color maLightBorderColor
;
119 Color maMenuBarColor
;
120 Color maMenuBarRolloverColor
;
121 Color maMenuBorderColor
;
123 Color maMenuHighlightColor
;
124 Color maMenuHighlightTextColor
;
125 Color maMenuTextColor
;
126 Color maMenuBarTextColor
;
127 Color maMenuBarRolloverTextColor
;
128 Color maMenuBarHighlightTextColor
;
130 Color maRadioCheckTextColor
;
132 Color maVisitedLinkColor
;
134 Color maWindowTextColor
;
135 Color maWorkspaceColor
;
136 Color maActiveTabColor
;
137 Color maInactiveTabColor
;
138 Color maTabTextColor
;
139 Color maTabRolloverTextColor
;
140 Color maTabHighlightTextColor
;
142 vcl::Font maHelpFont
;
143 vcl::Font maTitleFont
;
144 vcl::Font maFloatTitleFont
;
145 vcl::Font maMenuFont
;
146 vcl::Font maToolFont
;
147 vcl::Font maLabelFont
;
148 vcl::Font maInfoFont
;
149 vcl::Font maRadioCheckFont
;
150 vcl::Font maPushButtonFont
;
151 vcl::Font maFieldFont
;
152 vcl::Font maIconFont
;
154 vcl::Font maGroupFont
;
157 long mnFloatTitleHeight
;
158 long mnTearOffTitleHeight
;
159 long mnScrollBarSize
;
163 long mnAntialiasedMin
;
164 sal_uInt64 mnCursorBlinkTime
;
165 DragFullOptions mnDragFullOptions
;
166 SelectionOptions mnSelectionOptions
;
167 DisplayOptions mnDisplayOptions
;
168 ToolbarIconSize mnToolbarIconSize
;
170 StyleSettingsOptions mnOptions
;
171 sal_uInt16 mnScreenZoom
;
172 sal_uInt16 mnScreenFontZoom
;
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 mbAcceleratorsInContextMenus
;
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
;
194 const void* mpFontOptions
;
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
;
541 mnScreenFontZoom
= 100;
542 mnDragFullOptions
= DragFullOptions::All
;
543 mnSelectionOptions
= SelectionOptions::NONE
;
544 mnDisplayOptions
= DisplayOptions::NONE
;
545 mnOptions
= StyleSettingsOptions::NONE
;
546 mbAutoMnemonic
= true;
547 mnToolbarIconSize
= ToolbarIconSize::Unknown
;
548 meUseImagesInMenus
= TRISTATE_INDET
;
549 mpFontOptions
= NULL
;
551 maEdgeBlendingTopLeftColor
= RGB_COLORDATA(0xC0, 0xC0, 0xC0);
552 maEdgeBlendingBottomRightColor
= RGB_COLORDATA(0x40, 0x40, 0x40);
553 mnListBoxMaximumLineCount
= 25;
554 mnColorValueSetColumnCount
= 12;
555 mnColorValueSetMaximumRowCount
= 20;
556 maListBoxPreviewDefaultLogicSize
= Size(15, 7);
557 maListBoxPreviewDefaultPixelSize
= Size(0, 0); // on-demand calculated in GetListBoxPreviewDefaultPixelSize()
558 mnListBoxPreviewDefaultLineWidth
= 1;
559 mbPreviewUsesCheckeredBackground
= true;
564 ImplStyleData::ImplStyleData( const ImplStyleData
& rData
) :
565 maActiveBorderColor( rData
.maActiveBorderColor
),
566 maActiveColor( rData
.maActiveColor
),
567 maActiveTextColor( rData
.maActiveTextColor
),
568 maAlternatingRowColor( rData
.maAlternatingRowColor
),
569 maButtonTextColor( rData
.maButtonTextColor
),
570 maButtonRolloverTextColor( rData
.maButtonRolloverTextColor
),
571 maCheckedColor( rData
.maCheckedColor
),
572 maDarkShadowColor( rData
.maDarkShadowColor
),
573 maDeactiveBorderColor( rData
.maDeactiveBorderColor
),
574 maDeactiveColor( rData
.maDeactiveColor
),
575 maDeactiveTextColor( rData
.maDeactiveTextColor
),
576 maDialogColor( rData
.maDialogColor
),
577 maDialogTextColor( rData
.maDialogTextColor
),
578 maDisableColor( rData
.maDisableColor
),
579 maFaceColor( rData
.maFaceColor
),
580 maFieldColor( rData
.maFieldColor
),
581 maFieldTextColor( rData
.maFieldTextColor
),
582 maFieldRolloverTextColor( rData
.maFieldRolloverTextColor
),
583 maFontColor( rData
.maFontColor
),
584 maGroupTextColor( rData
.maGroupTextColor
),
585 maHelpColor( rData
.maHelpColor
),
586 maHelpTextColor( rData
.maHelpTextColor
),
587 maHighlightColor( rData
.maHighlightColor
),
588 maHighlightLinkColor( rData
.maHighlightLinkColor
),
589 maHighlightTextColor( rData
.maHighlightTextColor
),
590 maInfoTextColor( rData
.maInfoTextColor
),
591 maLabelTextColor( rData
.maLabelTextColor
),
592 maLightBorderColor( rData
.maLightBorderColor
),
593 maLightColor( rData
.maLightColor
),
594 maLinkColor( rData
.maLinkColor
),
595 maMenuBarColor( rData
.maMenuBarColor
),
596 maMenuBarRolloverColor( rData
.maMenuBarRolloverColor
),
597 maMenuBorderColor( rData
.maMenuBorderColor
),
598 maMenuColor( rData
.maMenuColor
),
599 maMenuHighlightColor( rData
.maMenuHighlightColor
),
600 maMenuHighlightTextColor( rData
.maMenuHighlightTextColor
),
601 maMenuTextColor( rData
.maMenuTextColor
),
602 maMenuBarTextColor( rData
.maMenuBarTextColor
),
603 maMenuBarRolloverTextColor( rData
.maMenuBarRolloverTextColor
),
604 maMenuBarHighlightTextColor( rData
.maMenuBarHighlightTextColor
),
605 maMonoColor( rData
.maMonoColor
),
606 maRadioCheckTextColor( rData
.maRadioCheckTextColor
),
607 maShadowColor( rData
.maShadowColor
),
608 maVisitedLinkColor( rData
.maVisitedLinkColor
),
609 maWindowColor( rData
.maWindowColor
),
610 maWindowTextColor( rData
.maWindowTextColor
),
611 maWorkspaceColor( rData
.maWorkspaceColor
),
612 maActiveTabColor( rData
.maActiveTabColor
),
613 maInactiveTabColor( rData
.maInactiveTabColor
),
614 maTabTextColor( rData
.maTabTextColor
),
615 maTabRolloverTextColor( rData
.maTabRolloverTextColor
),
616 maTabHighlightTextColor( rData
.maTabHighlightTextColor
),
617 maAppFont( rData
.maAppFont
),
618 maHelpFont( rData
.maAppFont
),
619 maTitleFont( rData
.maTitleFont
),
620 maFloatTitleFont( rData
.maFloatTitleFont
),
621 maMenuFont( rData
.maMenuFont
),
622 maToolFont( rData
.maToolFont
),
623 maLabelFont( rData
.maLabelFont
),
624 maInfoFont( rData
.maInfoFont
),
625 maRadioCheckFont( rData
.maRadioCheckFont
),
626 maPushButtonFont( rData
.maPushButtonFont
),
627 maFieldFont( rData
.maFieldFont
),
628 maIconFont( rData
.maIconFont
),
629 maTabFont( rData
.maTabFont
),
630 maGroupFont( rData
.maGroupFont
),
631 mIconTheme(rData
.mIconTheme
),
632 maDialogStyle( rData
.maDialogStyle
),
633 maFrameStyle( rData
.maFrameStyle
),
634 maPersonaHeaderFooter( rData
.maPersonaHeaderFooter
),
635 maPersonaHeaderBitmap( rData
.maPersonaHeaderBitmap
),
636 maPersonaFooterBitmap( rData
.maPersonaFooterBitmap
),
637 maPersonaMenuBarTextColor( rData
.maPersonaMenuBarTextColor
)
639 mnBorderSize
= rData
.mnBorderSize
;
640 mnTitleHeight
= rData
.mnTitleHeight
;
641 mnFloatTitleHeight
= rData
.mnFloatTitleHeight
;
642 mnTearOffTitleHeight
= rData
.mnTearOffTitleHeight
;
643 mnScrollBarSize
= rData
.mnScrollBarSize
;
644 mnMinThumbSize
= rData
.mnMinThumbSize
;
645 mnSplitSize
= rData
.mnSplitSize
;
646 mnSpinSize
= rData
.mnSpinSize
;
647 mnAntialiasedMin
= rData
.mnAntialiasedMin
;
648 mnCursorSize
= rData
.mnCursorSize
;
649 mnCursorBlinkTime
= rData
.mnCursorBlinkTime
;
650 mnScreenZoom
= rData
.mnScreenZoom
;
651 mnScreenFontZoom
= rData
.mnScreenFontZoom
;
652 mnDragFullOptions
= rData
.mnDragFullOptions
;
653 mnSelectionOptions
= rData
.mnSelectionOptions
;
654 mnDisplayOptions
= rData
.mnDisplayOptions
;
655 mnOptions
= rData
.mnOptions
;
656 mbHighContrast
= rData
.mbHighContrast
;
657 mbUseSystemUIFonts
= rData
.mbUseSystemUIFonts
;
658 mnUseFlatBorders
= rData
.mnUseFlatBorders
;
659 mnUseFlatMenus
= rData
.mnUseFlatMenus
;
660 mbAutoMnemonic
= rData
.mbAutoMnemonic
;
661 meUseImagesInMenus
= rData
.meUseImagesInMenus
;
662 mbPreferredUseImagesInMenus
= rData
.mbPreferredUseImagesInMenus
;
663 mbSkipDisabledInMenus
= rData
.mbSkipDisabledInMenus
;
664 mbHideDisabledMenuItems
= rData
.mbHideDisabledMenuItems
;
665 mbAcceleratorsInContextMenus
= rData
.mbAcceleratorsInContextMenus
;
666 mbPrimaryButtonWarpsSlider
= rData
.mbPrimaryButtonWarpsSlider
;
667 mnToolbarIconSize
= rData
.mnToolbarIconSize
;
668 mIconThemeScanner
.reset(new vcl::IconThemeScanner(*rData
.mIconThemeScanner
));
669 mIconThemeSelector
.reset(new vcl::IconThemeSelector(*rData
.mIconThemeSelector
));
670 mpFontOptions
= rData
.mpFontOptions
;
671 mnEdgeBlending
= rData
.mnEdgeBlending
;
672 maEdgeBlendingTopLeftColor
= rData
.maEdgeBlendingTopLeftColor
;
673 maEdgeBlendingBottomRightColor
= rData
.maEdgeBlendingBottomRightColor
;
674 mnListBoxMaximumLineCount
= rData
.mnListBoxMaximumLineCount
;
675 mnColorValueSetColumnCount
= rData
.mnColorValueSetColumnCount
;
676 mnColorValueSetMaximumRowCount
= rData
.mnColorValueSetMaximumRowCount
;
677 maListBoxPreviewDefaultLogicSize
= rData
.maListBoxPreviewDefaultLogicSize
;
678 maListBoxPreviewDefaultPixelSize
= rData
.maListBoxPreviewDefaultPixelSize
;
679 mnListBoxPreviewDefaultLineWidth
= rData
.mnListBoxPreviewDefaultLineWidth
;
680 mbPreviewUsesCheckeredBackground
= rData
.mbPreviewUsesCheckeredBackground
;
683 void ImplStyleData::SetStandardStyles()
685 vcl::Font
aStdFont( FAMILY_SWISS
, Size( 0, 8 ) );
686 aStdFont
.SetCharSet( osl_getThreadTextEncoding() );
687 aStdFont
.SetWeight( WEIGHT_NORMAL
);
688 aStdFont
.SetName( utl::DefaultFontConfiguration::get().getUserInterfaceFont( LanguageTag("en")) );
689 maAppFont
= aStdFont
;
690 maHelpFont
= aStdFont
;
691 maMenuFont
= aStdFont
;
692 maToolFont
= aStdFont
;
693 maGroupFont
= aStdFont
;
694 maLabelFont
= aStdFont
;
695 maInfoFont
= aStdFont
;
696 maRadioCheckFont
= aStdFont
;
697 maPushButtonFont
= aStdFont
;
698 maFieldFont
= aStdFont
;
699 maIconFont
= aStdFont
;
700 maTabFont
= aStdFont
;
701 aStdFont
.SetWeight( WEIGHT_BOLD
);
702 maFloatTitleFont
= aStdFont
;
703 maTitleFont
= aStdFont
;
705 maFaceColor
= Color( COL_LIGHTGRAY
);
706 maCheckedColor
= Color( 0xCC, 0xCC, 0xCC );
707 maLightColor
= Color( COL_WHITE
);
708 maLightBorderColor
= Color( COL_LIGHTGRAY
);
709 maShadowColor
= Color( COL_GRAY
);
710 maDarkShadowColor
= Color( COL_BLACK
);
711 maButtonTextColor
= Color( COL_BLACK
);
712 maButtonRolloverTextColor
= Color( COL_BLACK
);
713 maRadioCheckTextColor
= Color( COL_BLACK
);
714 maGroupTextColor
= Color( COL_BLACK
);
715 maLabelTextColor
= Color( COL_BLACK
);
716 maInfoTextColor
= Color( COL_BLACK
);
717 maWindowColor
= Color( COL_WHITE
);
718 maWindowTextColor
= Color( COL_BLACK
);
719 maDialogColor
= Color( COL_LIGHTGRAY
);
720 maDialogTextColor
= Color( COL_BLACK
);
721 maWorkspaceColor
= Color( 0xDF, 0xDF, 0xDE );
722 maMonoColor
= Color( COL_BLACK
);
723 maFieldColor
= Color( COL_WHITE
);
724 maFieldTextColor
= Color( COL_BLACK
);
725 maFieldRolloverTextColor
= Color( COL_BLACK
);
726 maActiveColor
= Color( COL_BLUE
);
727 maActiveTextColor
= Color( COL_WHITE
);
728 maActiveBorderColor
= Color( COL_LIGHTGRAY
);
729 maDeactiveColor
= Color( COL_GRAY
);
730 maDeactiveTextColor
= Color( COL_LIGHTGRAY
);
731 maDeactiveBorderColor
= Color( COL_LIGHTGRAY
);
732 maMenuColor
= Color( COL_LIGHTGRAY
);
733 maMenuBarColor
= Color( COL_LIGHTGRAY
);
734 maMenuBarRolloverColor
= Color( COL_BLUE
);
735 maMenuBorderColor
= Color( COL_LIGHTGRAY
);
736 maMenuTextColor
= Color( COL_BLACK
);
737 maMenuBarTextColor
= Color( COL_BLACK
);
738 maMenuBarRolloverTextColor
= Color( COL_WHITE
);
739 maMenuBarHighlightTextColor
= Color( COL_WHITE
);
740 maMenuHighlightColor
= Color( COL_BLUE
);
741 maMenuHighlightTextColor
= Color( COL_WHITE
);
742 maHighlightColor
= Color( COL_BLUE
);
743 maHighlightTextColor
= Color( COL_WHITE
);
744 maActiveTabColor
= Color( COL_WHITE
);
745 maInactiveTabColor
= Color( COL_LIGHTGRAY
);
746 maTabTextColor
= Color( COL_BLACK
);
747 maTabRolloverTextColor
= Color( COL_BLACK
);
748 maTabHighlightTextColor
= Color( COL_BLACK
);
749 maDisableColor
= Color( COL_GRAY
);
750 maHelpColor
= Color( 0xFF, 0xFF, 0xE0 );
751 maHelpTextColor
= Color( COL_BLACK
);
752 maLinkColor
= Color( COL_BLUE
);
753 maVisitedLinkColor
= Color( 0x00, 0x00, 0xCC );
754 maHighlightLinkColor
= Color( COL_LIGHTBLUE
);
755 maFontColor
= Color( COL_BLACK
);
756 maAlternatingRowColor
= Color( 0xEE, 0xEE, 0xEE );
760 mnFloatTitleHeight
= 13;
761 mnTearOffTitleHeight
= 8;
762 mbHighContrast
= false;
763 mbUseSystemUIFonts
= true;
764 mnUseFlatBorders
= false;
765 mnUseFlatMenus
= false;
766 mbPreferredUseImagesInMenus
= true;
767 mbSkipDisabledInMenus
= false;
768 mbHideDisabledMenuItems
= false;
769 mbAcceleratorsInContextMenus
= true;
770 mbPrimaryButtonWarpsSlider
= false;
773 StyleSettings::StyleSettings()
774 : mxData(std::make_shared
<ImplStyleData
>())
778 StyleSettings::~StyleSettings()
783 StyleSettings::SetFaceColor( const Color
& rColor
)
786 mxData
->maFaceColor
= rColor
;
790 StyleSettings::GetFaceColor() const
792 return mxData
->maFaceColor
;
796 StyleSettings::SetCheckedColor( const Color
& rColor
)
799 mxData
->maCheckedColor
= rColor
;
803 StyleSettings::GetCheckedColor() const
805 return mxData
->maCheckedColor
;
809 StyleSettings::SetLightColor( const Color
& rColor
)
812 mxData
->maLightColor
= rColor
;
816 StyleSettings::GetLightColor() const
818 return mxData
->maLightColor
;
822 StyleSettings::SetLightBorderColor( const Color
& rColor
)
825 mxData
->maLightBorderColor
= rColor
;
829 StyleSettings::GetLightBorderColor() const
831 return mxData
->maLightBorderColor
;
835 StyleSettings::SetShadowColor( const Color
& rColor
)
838 mxData
->maShadowColor
= rColor
;
842 StyleSettings::GetShadowColor() const
844 return mxData
->maShadowColor
;
848 StyleSettings::SetDarkShadowColor( const Color
& rColor
)
851 mxData
->maDarkShadowColor
= rColor
;
855 StyleSettings::GetDarkShadowColor() const
857 return mxData
->maDarkShadowColor
;
861 StyleSettings::SetButtonTextColor( const Color
& rColor
)
864 mxData
->maButtonTextColor
= rColor
;
868 StyleSettings::GetButtonTextColor() const
870 return mxData
->maButtonTextColor
;
874 StyleSettings::SetButtonRolloverTextColor( const Color
& rColor
)
877 mxData
->maButtonRolloverTextColor
= rColor
;
881 StyleSettings::GetButtonRolloverTextColor() const
883 return mxData
->maButtonRolloverTextColor
;
887 StyleSettings::SetRadioCheckTextColor( const Color
& rColor
)
890 mxData
->maRadioCheckTextColor
= rColor
;
894 StyleSettings::GetRadioCheckTextColor() const
896 return mxData
->maRadioCheckTextColor
;
900 StyleSettings::SetGroupTextColor( const Color
& rColor
)
903 mxData
->maGroupTextColor
= rColor
;
907 StyleSettings::GetGroupTextColor() const
909 return mxData
->maGroupTextColor
;
913 StyleSettings::SetLabelTextColor( const Color
& rColor
)
916 mxData
->maLabelTextColor
= rColor
;
920 StyleSettings::GetLabelTextColor() const
922 return mxData
->maLabelTextColor
;
926 StyleSettings::SetInfoTextColor( const Color
& rColor
)
929 mxData
->maInfoTextColor
= rColor
;
933 StyleSettings::GetInfoTextColor() const
935 return mxData
->maInfoTextColor
;
939 StyleSettings::SetWindowColor( const Color
& rColor
)
942 mxData
->maWindowColor
= rColor
;
946 StyleSettings::GetWindowColor() const
948 return mxData
->maWindowColor
;
952 StyleSettings::SetWindowTextColor( const Color
& rColor
)
955 mxData
->maWindowTextColor
= rColor
;
959 StyleSettings::GetWindowTextColor() const
961 return mxData
->maWindowTextColor
;
965 StyleSettings::SetDialogColor( const Color
& rColor
)
968 mxData
->maDialogColor
= rColor
;
972 StyleSettings::GetDialogColor() const
974 return mxData
->maDialogColor
;
978 StyleSettings::SetDialogTextColor( const Color
& rColor
)
981 mxData
->maDialogTextColor
= rColor
;
985 StyleSettings::GetDialogTextColor() const
987 return mxData
->maDialogTextColor
;
991 StyleSettings::SetWorkspaceColor( const Color
& rColor
)
994 mxData
->maWorkspaceColor
= rColor
;
998 StyleSettings::GetWorkspaceColor() const
1000 return mxData
->maWorkspaceColor
;
1004 StyleSettings::SetFieldColor( const Color
& rColor
)
1007 mxData
->maFieldColor
= rColor
;
1011 StyleSettings::GetFieldColor() const
1013 return mxData
->maFieldColor
;
1017 StyleSettings::SetFieldTextColor( const Color
& rColor
)
1020 mxData
->maFieldTextColor
= rColor
;
1024 StyleSettings::GetFieldTextColor() const
1026 return mxData
->maFieldTextColor
;
1030 StyleSettings::SetFieldRolloverTextColor( const Color
& rColor
)
1033 mxData
->maFieldRolloverTextColor
= rColor
;
1037 StyleSettings::GetFieldRolloverTextColor() const
1039 return mxData
->maFieldRolloverTextColor
;
1043 StyleSettings::SetActiveColor( const Color
& rColor
)
1046 mxData
->maActiveColor
= rColor
;
1050 StyleSettings::GetActiveColor() const
1052 return mxData
->maActiveColor
;
1056 StyleSettings::SetActiveTextColor( const Color
& rColor
)
1059 mxData
->maActiveTextColor
= rColor
;
1063 StyleSettings::GetActiveTextColor() const
1065 return mxData
->maActiveTextColor
;
1069 StyleSettings::SetActiveBorderColor( const Color
& rColor
)
1072 mxData
->maActiveBorderColor
= rColor
;
1076 StyleSettings::GetActiveBorderColor() const
1078 return mxData
->maActiveBorderColor
;
1082 StyleSettings::SetDeactiveColor( const Color
& rColor
)
1085 mxData
->maDeactiveColor
= rColor
;
1089 StyleSettings::GetDeactiveColor() const
1091 return mxData
->maDeactiveColor
;
1095 StyleSettings::SetDeactiveTextColor( const Color
& rColor
)
1098 mxData
->maDeactiveTextColor
= rColor
;
1102 StyleSettings::GetDeactiveTextColor() const
1104 return mxData
->maDeactiveTextColor
;
1108 StyleSettings::SetDeactiveBorderColor( const Color
& rColor
)
1111 mxData
->maDeactiveBorderColor
= rColor
;
1115 StyleSettings::GetDeactiveBorderColor() const
1117 return mxData
->maDeactiveBorderColor
;
1121 StyleSettings::SetHighlightColor( const Color
& rColor
)
1124 mxData
->maHighlightColor
= rColor
;
1128 StyleSettings::GetHighlightColor() const
1130 return mxData
->maHighlightColor
;
1134 StyleSettings::SetHighlightTextColor( const Color
& rColor
)
1137 mxData
->maHighlightTextColor
= rColor
;
1141 StyleSettings::GetHighlightTextColor() const
1143 return mxData
->maHighlightTextColor
;
1147 StyleSettings::SetDisableColor( const Color
& rColor
)
1150 mxData
->maDisableColor
= rColor
;
1154 StyleSettings::GetDisableColor() const
1156 return mxData
->maDisableColor
;
1160 StyleSettings::SetHelpColor( const Color
& rColor
)
1163 mxData
->maHelpColor
= rColor
;
1167 StyleSettings::GetHelpColor() const
1169 return mxData
->maHelpColor
;
1173 StyleSettings::SetHelpTextColor( const Color
& rColor
)
1176 mxData
->maHelpTextColor
= rColor
;
1180 StyleSettings::GetHelpTextColor() const
1182 return mxData
->maHelpTextColor
;
1186 StyleSettings::SetMenuColor( const Color
& rColor
)
1189 mxData
->maMenuColor
= rColor
;
1193 StyleSettings::GetMenuColor() const
1195 return mxData
->maMenuColor
;
1199 StyleSettings::SetMenuBarColor( const Color
& rColor
)
1202 mxData
->maMenuBarColor
= rColor
;
1206 StyleSettings::GetMenuBarColor() const
1208 return mxData
->maMenuBarColor
;
1212 StyleSettings::SetMenuBarRolloverColor( const Color
& rColor
)
1215 mxData
->maMenuBarRolloverColor
= rColor
;
1219 StyleSettings::GetMenuBarRolloverColor() const
1221 return mxData
->maMenuBarRolloverColor
;
1225 StyleSettings::SetMenuBorderColor( const Color
& rColor
)
1228 mxData
->maMenuBorderColor
= rColor
;
1232 StyleSettings::GetMenuBorderColor() const
1234 return mxData
->maMenuBorderColor
;
1238 StyleSettings::SetMenuTextColor( const Color
& rColor
)
1241 mxData
->maMenuTextColor
= rColor
;
1245 StyleSettings::GetMenuTextColor() const
1247 return mxData
->maMenuTextColor
;
1251 StyleSettings::SetMenuBarTextColor( const Color
& rColor
)
1254 mxData
->maMenuBarTextColor
= rColor
;
1258 StyleSettings::GetMenuBarTextColor() const
1260 return mxData
->maMenuBarTextColor
;
1264 StyleSettings::SetMenuBarRolloverTextColor( const Color
& rColor
)
1267 mxData
->maMenuBarRolloverTextColor
= rColor
;
1271 StyleSettings::GetMenuBarRolloverTextColor() const
1273 return mxData
->maMenuBarRolloverTextColor
;
1277 StyleSettings::SetMenuBarHighlightTextColor( const Color
& rColor
)
1280 mxData
->maMenuBarHighlightTextColor
= rColor
;
1284 StyleSettings::GetMenuBarHighlightTextColor() const
1286 return mxData
->maMenuBarHighlightTextColor
;
1290 StyleSettings::SetMenuHighlightColor( const Color
& rColor
)
1293 mxData
->maMenuHighlightColor
= rColor
;
1297 StyleSettings::GetMenuHighlightColor() const
1299 return mxData
->maMenuHighlightColor
;
1303 StyleSettings::SetMenuHighlightTextColor( const Color
& rColor
)
1306 mxData
->maMenuHighlightTextColor
= rColor
;
1310 StyleSettings::GetMenuHighlightTextColor() const
1312 return mxData
->maMenuHighlightTextColor
;
1316 StyleSettings::SetTabTextColor( const Color
& rColor
)
1319 mxData
->maTabTextColor
= rColor
;
1323 StyleSettings::GetTabTextColor() const
1325 return mxData
->maTabTextColor
;
1329 StyleSettings::SetTabRolloverTextColor( const Color
& rColor
)
1332 mxData
->maTabRolloverTextColor
= rColor
;
1336 StyleSettings::GetTabRolloverTextColor() const
1338 return mxData
->maTabRolloverTextColor
;
1342 StyleSettings::SetTabHighlightTextColor( const Color
& rColor
)
1345 mxData
->maTabHighlightTextColor
= rColor
;
1349 StyleSettings::GetTabHighlightTextColor() const
1351 return mxData
->maTabHighlightTextColor
;
1355 StyleSettings::SetLinkColor( const Color
& rColor
)
1358 mxData
->maLinkColor
= rColor
;
1362 StyleSettings::GetLinkColor() const
1364 return mxData
->maLinkColor
;
1368 StyleSettings::SetVisitedLinkColor( const Color
& rColor
)
1371 mxData
->maVisitedLinkColor
= rColor
;
1375 StyleSettings::GetVisitedLinkColor() const
1377 return mxData
->maVisitedLinkColor
;
1381 StyleSettings::GetHighlightLinkColor() const
1383 return mxData
->maHighlightLinkColor
;
1387 StyleSettings::SetMonoColor( const Color
& rColor
)
1390 mxData
->maMonoColor
= rColor
;
1394 StyleSettings::GetMonoColor() const
1396 return mxData
->maMonoColor
;
1400 StyleSettings::SetActiveTabColor( const Color
& rColor
)
1403 mxData
->maActiveTabColor
= rColor
;
1407 StyleSettings::GetActiveTabColor() const
1409 return mxData
->maActiveTabColor
;
1413 StyleSettings::SetInactiveTabColor( const Color
& rColor
)
1416 mxData
->maInactiveTabColor
= rColor
;
1420 StyleSettings::GetInactiveTabColor() const
1422 return mxData
->maInactiveTabColor
;
1426 StyleSettings::SetAlternatingRowColor( const Color
& rColor
)
1429 mxData
->maAlternatingRowColor
= rColor
;
1433 StyleSettings::GetAlternatingRowColor() const
1435 return mxData
->maAlternatingRowColor
;
1439 StyleSettings::SetUseSystemUIFonts( bool bUseSystemUIFonts
)
1442 mxData
->mbUseSystemUIFonts
= bUseSystemUIFonts
;
1446 StyleSettings::GetUseSystemUIFonts() const
1448 return mxData
->mbUseSystemUIFonts
;
1452 StyleSettings::SetUseFlatBorders( bool bUseFlatBorders
)
1455 mxData
->mnUseFlatBorders
= bUseFlatBorders
;
1459 StyleSettings::GetUseFlatBorders() const
1461 return (bool) mxData
->mnUseFlatBorders
;
1465 StyleSettings::SetUseFlatMenus( bool bUseFlatMenus
)
1468 mxData
->mnUseFlatMenus
= bUseFlatMenus
;
1472 StyleSettings::GetUseFlatMenus() const
1474 return (bool) mxData
->mnUseFlatMenus
;
1478 StyleSettings::SetUseImagesInMenus( TriState eUseImagesInMenus
)
1481 mxData
->meUseImagesInMenus
= eUseImagesInMenus
;
1485 StyleSettings::SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus
)
1488 mxData
->mbPreferredUseImagesInMenus
= bPreferredUseImagesInMenus
;
1492 StyleSettings::GetPreferredUseImagesInMenus() const
1494 return mxData
->mbPreferredUseImagesInMenus
;
1498 StyleSettings::SetSkipDisabledInMenus( bool bSkipDisabledInMenus
)
1501 mxData
->mbSkipDisabledInMenus
= bSkipDisabledInMenus
;
1505 StyleSettings::GetSkipDisabledInMenus() const
1507 return mxData
->mbSkipDisabledInMenus
;
1511 StyleSettings::SetHideDisabledMenuItems( bool bHideDisabledMenuItems
)
1514 mxData
->mbHideDisabledMenuItems
= bHideDisabledMenuItems
;
1518 StyleSettings::GetHideDisabledMenuItems() const
1520 return mxData
->mbHideDisabledMenuItems
;
1524 StyleSettings::SetAcceleratorsInContextMenus( bool bAcceleratorsInContextMenus
)
1527 mxData
->mbAcceleratorsInContextMenus
= bAcceleratorsInContextMenus
;
1531 StyleSettings::GetAcceleratorsInContextMenus() const
1533 return mxData
->mbAcceleratorsInContextMenus
;
1537 StyleSettings::SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider
)
1540 mxData
->mbPrimaryButtonWarpsSlider
= bPrimaryButtonWarpsSlider
;
1544 StyleSettings::GetPrimaryButtonWarpsSlider() const
1546 return mxData
->mbPrimaryButtonWarpsSlider
;
1550 StyleSettings::SetCairoFontOptions( const void *pOptions
)
1553 mxData
->mpFontOptions
= pOptions
;
1557 StyleSettings::GetCairoFontOptions() const
1559 return mxData
->mpFontOptions
;
1563 StyleSettings::SetAppFont( const vcl::Font
& rFont
)
1566 mxData
->maAppFont
= rFont
;
1570 StyleSettings::GetAppFont() const
1572 return mxData
->maAppFont
;
1576 StyleSettings::SetHelpFont( const vcl::Font
& rFont
)
1579 mxData
->maHelpFont
= rFont
;
1583 StyleSettings::GetHelpFont() const
1585 return mxData
->maHelpFont
;
1589 StyleSettings::SetTitleFont( const vcl::Font
& rFont
)
1592 mxData
->maTitleFont
= rFont
;
1596 StyleSettings::GetTitleFont() const
1598 return mxData
->maTitleFont
;
1602 StyleSettings::SetFloatTitleFont( const vcl::Font
& rFont
)
1605 mxData
->maFloatTitleFont
= rFont
;
1609 StyleSettings::GetFloatTitleFont() const
1611 return mxData
->maFloatTitleFont
;
1615 StyleSettings::SetMenuFont( const vcl::Font
& rFont
)
1618 mxData
->maMenuFont
= rFont
;
1622 StyleSettings::GetMenuFont() const
1624 return mxData
->maMenuFont
;
1628 StyleSettings::SetToolFont( const vcl::Font
& rFont
)
1631 mxData
->maToolFont
= rFont
;
1635 StyleSettings::GetToolFont() const
1637 return mxData
->maToolFont
;
1641 StyleSettings::SetGroupFont( const vcl::Font
& rFont
)
1644 mxData
->maGroupFont
= rFont
;
1648 StyleSettings::GetGroupFont() const
1650 return mxData
->maGroupFont
;
1654 StyleSettings::SetLabelFont( const vcl::Font
& rFont
)
1657 mxData
->maLabelFont
= rFont
;
1661 StyleSettings::GetLabelFont() const
1663 return mxData
->maLabelFont
;
1667 StyleSettings::SetInfoFont( const vcl::Font
& rFont
)
1670 mxData
->maInfoFont
= rFont
;
1674 StyleSettings::GetInfoFont() const
1676 return mxData
->maInfoFont
;
1680 StyleSettings::SetRadioCheckFont( const vcl::Font
& rFont
)
1683 mxData
->maRadioCheckFont
= rFont
;
1687 StyleSettings::GetRadioCheckFont() const
1689 return mxData
->maRadioCheckFont
;
1693 StyleSettings::SetPushButtonFont( const vcl::Font
& rFont
)
1696 mxData
->maPushButtonFont
= rFont
;
1700 StyleSettings::GetPushButtonFont() const
1702 return mxData
->maPushButtonFont
;
1706 StyleSettings::SetFieldFont( const vcl::Font
& rFont
)
1709 mxData
->maFieldFont
= rFont
;
1713 StyleSettings::GetFieldFont() const
1715 return mxData
->maFieldFont
;
1719 StyleSettings::SetIconFont( const vcl::Font
& rFont
)
1722 mxData
->maIconFont
= rFont
;
1726 StyleSettings::GetIconFont() const
1728 return mxData
->maIconFont
;
1732 StyleSettings::SetTabFont( const vcl::Font
& rFont
)
1735 mxData
->maTabFont
= rFont
;
1739 StyleSettings::GetTabFont() const
1741 return mxData
->maTabFont
;
1745 StyleSettings::GetBorderSize() const
1747 return mxData
->mnBorderSize
;
1751 StyleSettings::SetTitleHeight( long nSize
)
1754 mxData
->mnTitleHeight
= nSize
;
1758 StyleSettings::GetTitleHeight() const
1760 return mxData
->mnTitleHeight
;
1764 StyleSettings::SetFloatTitleHeight( long nSize
)
1767 mxData
->mnFloatTitleHeight
= nSize
;
1771 StyleSettings::GetFloatTitleHeight() const
1773 return mxData
->mnFloatTitleHeight
;
1777 StyleSettings::GetTearOffTitleHeight() const
1779 return mxData
->mnTearOffTitleHeight
;
1783 StyleSettings::SetScrollBarSize( long nSize
)
1786 mxData
->mnScrollBarSize
= nSize
;
1790 StyleSettings::GetScrollBarSize() const
1792 return mxData
->mnScrollBarSize
;
1796 StyleSettings::SetMinThumbSize( long nSize
)
1799 mxData
->mnMinThumbSize
= nSize
;
1803 StyleSettings::GetMinThumbSize() const
1805 return mxData
->mnMinThumbSize
;
1809 StyleSettings::SetSpinSize( long nSize
)
1812 mxData
->mnSpinSize
= nSize
;
1816 StyleSettings::GetSpinSize() const
1818 return mxData
->mnSpinSize
;
1822 StyleSettings::GetSplitSize() const
1824 return mxData
->mnSplitSize
;
1828 StyleSettings::SetCursorSize( long nSize
)
1831 mxData
->mnCursorSize
= nSize
;
1835 StyleSettings::GetCursorSize() const
1837 return mxData
->mnCursorSize
;
1841 StyleSettings::SetCursorBlinkTime( sal_uInt64 nBlinkTime
)
1844 mxData
->mnCursorBlinkTime
= nBlinkTime
;
1848 StyleSettings::GetCursorBlinkTime() const
1850 return (long) mxData
->mnCursorBlinkTime
;
1854 StyleSettings::SetScreenZoom( sal_uInt16 nPercent
)
1857 mxData
->mnScreenZoom
= nPercent
;
1861 StyleSettings::GetScreenZoom() const
1863 return mxData
->mnScreenZoom
;
1867 StyleSettings::SetScreenFontZoom( sal_uInt16 nPercent
)
1870 mxData
->mnScreenFontZoom
= nPercent
;
1874 StyleSettings::GetScreenFontZoom() const
1876 return mxData
->mnScreenFontZoom
;
1880 StyleSettings::SetDragFullOptions( DragFullOptions nOptions
)
1883 mxData
->mnDragFullOptions
= nOptions
;
1887 StyleSettings::GetDragFullOptions() const
1889 return mxData
->mnDragFullOptions
;
1893 StyleSettings::SetSelectionOptions( SelectionOptions nOptions
)
1896 mxData
->mnSelectionOptions
= nOptions
;
1900 StyleSettings::GetSelectionOptions() const
1902 return mxData
->mnSelectionOptions
;
1906 StyleSettings::SetDisplayOptions( DisplayOptions nOptions
)
1909 mxData
->mnDisplayOptions
= nOptions
;
1913 StyleSettings::GetDisplayOptions() const
1915 return mxData
->mnDisplayOptions
;
1919 StyleSettings::SetAntialiasingMinPixelHeight( long nMinPixel
)
1922 mxData
->mnAntialiasedMin
= nMinPixel
;
1926 StyleSettings::GetAntialiasingMinPixelHeight() const
1928 return mxData
->mnAntialiasedMin
;
1932 StyleSettings::SetOptions( StyleSettingsOptions nOptions
)
1935 mxData
->mnOptions
= nOptions
;
1939 StyleSettings::SetAutoMnemonic( bool bAutoMnemonic
)
1942 mxData
->mbAutoMnemonic
= bAutoMnemonic
;
1946 StyleSettings::GetAutoMnemonic() const
1948 return mxData
->mbAutoMnemonic
;
1952 StyleSettings::SetFontColor( const Color
& rColor
)
1955 mxData
->maFontColor
= rColor
;
1959 StyleSettings::GetFontColor() const
1961 return mxData
->maFontColor
;
1965 StyleSettings::SetToolbarIconSize( ToolbarIconSize nSize
)
1968 mxData
->mnToolbarIconSize
= nSize
;
1972 StyleSettings::GetToolbarIconSize() const
1974 return mxData
->mnToolbarIconSize
;
1978 StyleSettings::GetDialogStyle() const
1980 return mxData
->maDialogStyle
;
1984 StyleSettings::SetDialogStyle( const DialogStyle
& rStyle
)
1987 mxData
->maDialogStyle
= rStyle
;
1991 StyleSettings::GetFrameStyle() const
1993 return mxData
->maFrameStyle
;
1997 StyleSettings::SetFrameStyle( const FrameStyle
& rStyle
)
2000 mxData
->maFrameStyle
= rStyle
;
2004 StyleSettings::SetEdgeBlending(sal_uInt16 nCount
)
2007 mxData
->mnEdgeBlending
= nCount
;
2011 StyleSettings::GetEdgeBlending() const
2013 return mxData
->mnEdgeBlending
;
2017 StyleSettings::GetEdgeBlendingTopLeftColor() const
2019 return mxData
->maEdgeBlendingTopLeftColor
;
2023 StyleSettings::GetEdgeBlendingBottomRightColor() const
2025 return mxData
->maEdgeBlendingBottomRightColor
;
2029 StyleSettings::SetListBoxMaximumLineCount(sal_uInt16 nCount
)
2032 mxData
->mnListBoxMaximumLineCount
= nCount
;
2036 StyleSettings::GetListBoxMaximumLineCount() const
2038 return mxData
->mnListBoxMaximumLineCount
;
2042 StyleSettings::SetColorValueSetColumnCount(sal_uInt16 nCount
)
2045 mxData
->mnColorValueSetColumnCount
= nCount
;
2049 StyleSettings::GetColorValueSetColumnCount() const
2051 return mxData
->mnColorValueSetColumnCount
;
2055 StyleSettings::GetColorValueSetMaximumRowCount() const
2057 return mxData
->mnColorValueSetMaximumRowCount
;
2061 StyleSettings::GetListBoxPreviewDefaultLineWidth() const
2063 return mxData
->mnListBoxPreviewDefaultLineWidth
;
2067 StyleSettings::SetPreviewUsesCheckeredBackground(bool bNew
)
2070 mxData
->mbPreviewUsesCheckeredBackground
= bNew
;
2074 StyleSettings::GetPreviewUsesCheckeredBackground() const
2076 return mxData
->mbPreviewUsesCheckeredBackground
;
2080 StyleSettings::operator !=( const StyleSettings
& rSet
) const
2082 return !(*this == rSet
);
2085 const Size
& StyleSettings::GetListBoxPreviewDefaultPixelSize() const
2087 if(0 == mxData
->maListBoxPreviewDefaultPixelSize
.Width() || 0 == mxData
->maListBoxPreviewDefaultPixelSize
.Height())
2089 const_cast< StyleSettings
* >(this)->mxData
->maListBoxPreviewDefaultPixelSize
=
2090 Application::GetDefaultDevice()->LogicToPixel(mxData
->maListBoxPreviewDefaultLogicSize
, MAP_APPFONT
);
2093 return mxData
->maListBoxPreviewDefaultPixelSize
;
2096 void StyleSettings::Set3DColors( const Color
& rColor
)
2099 mxData
->maFaceColor
= rColor
;
2100 mxData
->maLightBorderColor
= rColor
;
2101 mxData
->maMenuBorderColor
= rColor
;
2102 mxData
->maDarkShadowColor
= Color( COL_BLACK
);
2103 if ( rColor
!= Color( COL_LIGHTGRAY
) )
2105 mxData
->maLightColor
= rColor
;
2106 mxData
->maShadowColor
= rColor
;
2107 mxData
->maDarkShadowColor
=rColor
;
2108 mxData
->maLightColor
.IncreaseLuminance( 64 );
2109 mxData
->maShadowColor
.DecreaseLuminance( 64 );
2110 mxData
->maDarkShadowColor
.DecreaseLuminance( 100 );
2111 sal_uLong nRed
= mxData
->maLightColor
.GetRed();
2112 sal_uLong nGreen
= mxData
->maLightColor
.GetGreen();
2113 sal_uLong nBlue
= mxData
->maLightColor
.GetBlue();
2114 nRed
+= (sal_uLong
)(mxData
->maShadowColor
.GetRed());
2115 nGreen
+= (sal_uLong
)(mxData
->maShadowColor
.GetGreen());
2116 nBlue
+= (sal_uLong
)(mxData
->maShadowColor
.GetBlue());
2117 mxData
->maCheckedColor
= Color( (sal_uInt8
)(nRed
/2), (sal_uInt8
)(nGreen
/2), (sal_uInt8
)(nBlue
/2) );
2121 mxData
->maCheckedColor
= Color( 0x99, 0x99, 0x99 );
2122 mxData
->maLightColor
= Color( COL_WHITE
);
2123 mxData
->maShadowColor
= Color( COL_GRAY
);
2127 void StyleSettings::SetCheckedColorSpecialCase( )
2130 // Light gray checked color special case
2131 if ( GetFaceColor() == COL_LIGHTGRAY
)
2132 mxData
->maCheckedColor
= Color( 0xCC, 0xCC, 0xCC );
2135 sal_uInt8 nRed
= (sal_uInt8
)(((sal_uInt16
)mxData
->maFaceColor
.GetRed() + (sal_uInt16
)mxData
->maLightColor
.GetRed())/2);
2136 sal_uInt8 nGreen
= (sal_uInt8
)(((sal_uInt16
)mxData
->maFaceColor
.GetGreen() + (sal_uInt16
)mxData
->maLightColor
.GetGreen())/2);
2137 sal_uInt8 nBlue
= (sal_uInt8
)(((sal_uInt16
)mxData
->maFaceColor
.GetBlue() + (sal_uInt16
)mxData
->maLightColor
.GetBlue())/2);
2138 mxData
->maCheckedColor
= Color( nRed
, nGreen
, nBlue
);
2142 bool StyleSettings::GetUseImagesInMenus() const
2144 // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
2145 switch (mxData
->meUseImagesInMenus
) {
2146 case TRISTATE_FALSE
:
2150 default: // TRISTATE_INDET:
2151 return GetPreferredUseImagesInMenus();
2155 static BitmapEx
readBitmapEx( const OUString
& rPath
)
2157 OUString
aPath( rPath
);
2158 rtl::Bootstrap::expandMacros( aPath
);
2162 if ( GraphicFilter::LoadGraphic( aPath
, OUString(), aGraphic
) != GRFILTER_OK
)
2164 return aGraphic
.GetBitmapEx();
2167 enum WhichPersona
{ PERSONA_HEADER
, PERSONA_FOOTER
};
2169 /** Update the setting of the Persona header / footer in ImplStyleData */
2170 static void setupPersonaHeaderFooter( WhichPersona eWhich
, OUString
& rHeaderFooter
, BitmapEx
& rHeaderFooterBitmap
, boost::optional
<Color
>& rMenuBarTextColor
)
2172 uno::Reference
< uno::XComponentContext
> xContext( comphelper::getProcessComponentContext() );
2173 if ( !xContext
.is() )
2176 // don't burn time loading images we don't need.
2177 if ( Application::IsHeadlessModeEnabled() )
2180 // read from the configuration
2181 OUString
aPersona( officecfg::Office::Common::Misc::Persona::get( xContext
) );
2182 OUString
aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get( xContext
) );
2184 // have the settings changed? marks if header /footer prepared before
2185 //should maybe extended to a flag that marks if header /footer /both are loaded
2186 OUString aOldValue
= eWhich
==PERSONA_HEADER
?OUString(aPersona
+ ";" + aPersonaSettings
+";h" ):OUString(aPersona
+ ";" + aPersonaSettings
+";f" );
2187 if ( rHeaderFooter
== aOldValue
)
2190 rHeaderFooter
= aOldValue
;
2191 rHeaderFooterBitmap
= BitmapEx();
2192 rMenuBarTextColor
= boost::none
;
2194 // now read the new values and setup bitmaps
2195 OUString aHeader
, aFooter
;
2196 if ( aPersona
== "own" || aPersona
== "default" )
2198 sal_Int32 nIndex
= 0;
2199 aHeader
= aPersonaSettings
.getToken( 0, ';', nIndex
);
2201 aFooter
= aPersonaSettings
.getToken( 0, ';', nIndex
);
2203 // change menu text color, advance nIndex to skip the '#'
2206 OUString aColor
= aPersonaSettings
.getToken( 0, ';', ++nIndex
);
2207 rMenuBarTextColor
= Color( aColor
.toUInt64( 16 ) );
2213 case PERSONA_HEADER
: aName
= aHeader
; break;
2214 case PERSONA_FOOTER
: aName
= aFooter
; break;
2217 if ( !aName
.isEmpty() )
2219 OUString
gallery("");
2220 // try the gallery first, then the program path:
2221 if ( aPersona
== "own" && !aPersonaSettings
.startsWith( "vnd.sun.star.expand" ) )
2223 gallery
= "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
"/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
2224 rtl::Bootstrap::expandMacros( gallery
);
2225 gallery
+= "/user/gallery/personas/";
2227 else if ( aPersona
== "default" )
2229 gallery
= "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER
;
2230 gallery
+= "/gallery/personas/";
2232 rHeaderFooterBitmap
= readBitmapEx( gallery
+ aName
);
2234 if ( rHeaderFooterBitmap
.IsEmpty() )
2235 rHeaderFooterBitmap
= readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
"/" + aName
);
2238 // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
2240 if( rHeaderFooterBitmap
.IsEmpty() )
2242 std::shared_ptr
<comphelper::ConfigurationChanges
> batch(comphelper::ConfigurationChanges::create());
2243 officecfg::Office::Common::Misc::Persona::set( "no", batch
);
2244 officecfg::Office::Common::Misc::PersonaSettings::set( "", batch
);
2249 const BitmapEx
StyleSettings::GetPersonaHeader() const
2251 setupPersonaHeaderFooter( PERSONA_HEADER
, mxData
->maPersonaHeaderFooter
, mxData
->maPersonaHeaderBitmap
, mxData
->maPersonaMenuBarTextColor
);
2252 return mxData
->maPersonaHeaderBitmap
;
2255 const BitmapEx
StyleSettings::GetPersonaFooter() const
2257 setupPersonaHeaderFooter( PERSONA_FOOTER
, mxData
->maPersonaHeaderFooter
, mxData
->maPersonaFooterBitmap
, mxData
->maPersonaMenuBarTextColor
);
2258 return mxData
->maPersonaFooterBitmap
;
2261 const boost::optional
<Color
>& StyleSettings::GetPersonaMenuBarTextColor() const
2264 return mxData
->maPersonaMenuBarTextColor
;
2267 void StyleSettings::SetStandardStyles()
2270 mxData
->SetStandardStyles();
2273 Color
StyleSettings::GetFaceGradientColor() const
2275 // compute a brighter face color that can be used in gradients
2276 // for a convex look (eg toolbars)
2279 GetFaceColor().RGBtoHSB( h
, s
, b
);
2282 return Color( Color::HSBtoRGB( h
, s
, b
) );
2285 Color
StyleSettings::GetSeparatorColor() const
2287 // compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
2289 GetShadowColor().RGBtoHSB( h
, s
, b
);
2292 return Color( Color::HSBtoRGB( h
, s
, b
) );
2295 void StyleSettings::CopyData()
2297 // copy if other references exist
2298 if ( ! mxData
.unique() ) {
2299 mxData
= std::make_shared
<ImplStyleData
>(*mxData
);
2303 bool StyleSettings::operator ==( const StyleSettings
& rSet
) const
2305 if ( mxData
== rSet
.mxData
)
2308 if (mxData
->mIconTheme
!= rSet
.mxData
->mIconTheme
) {
2312 if (*mxData
->mIconThemeSelector
!= *rSet
.mxData
->mIconThemeSelector
) {
2316 if ( (mxData
->mnOptions
== rSet
.mxData
->mnOptions
) &&
2317 (mxData
->mbAutoMnemonic
== rSet
.mxData
->mbAutoMnemonic
) &&
2318 (mxData
->mnDragFullOptions
== rSet
.mxData
->mnDragFullOptions
) &&
2319 (mxData
->mnSelectionOptions
== rSet
.mxData
->mnSelectionOptions
) &&
2320 (mxData
->mnDisplayOptions
== rSet
.mxData
->mnDisplayOptions
) &&
2321 (mxData
->mnCursorSize
== rSet
.mxData
->mnCursorSize
) &&
2322 (mxData
->mnCursorBlinkTime
== rSet
.mxData
->mnCursorBlinkTime
) &&
2323 (mxData
->mnBorderSize
== rSet
.mxData
->mnBorderSize
) &&
2324 (mxData
->mnTitleHeight
== rSet
.mxData
->mnTitleHeight
) &&
2325 (mxData
->mnFloatTitleHeight
== rSet
.mxData
->mnFloatTitleHeight
) &&
2326 (mxData
->mnTearOffTitleHeight
== rSet
.mxData
->mnTearOffTitleHeight
) &&
2327 (mxData
->mnScrollBarSize
== rSet
.mxData
->mnScrollBarSize
) &&
2328 (mxData
->mnMinThumbSize
== rSet
.mxData
->mnMinThumbSize
) &&
2329 (mxData
->mnSplitSize
== rSet
.mxData
->mnSplitSize
) &&
2330 (mxData
->mnSpinSize
== rSet
.mxData
->mnSpinSize
) &&
2331 (mxData
->mnAntialiasedMin
== rSet
.mxData
->mnAntialiasedMin
) &&
2332 (mxData
->mnScreenZoom
== rSet
.mxData
->mnScreenZoom
) &&
2333 (mxData
->mnScreenFontZoom
== rSet
.mxData
->mnScreenFontZoom
) &&
2334 (mxData
->mbHighContrast
== rSet
.mxData
->mbHighContrast
) &&
2335 (mxData
->mbUseSystemUIFonts
== rSet
.mxData
->mbUseSystemUIFonts
) &&
2336 (mxData
->mnUseFlatBorders
== rSet
.mxData
->mnUseFlatBorders
) &&
2337 (mxData
->mnUseFlatMenus
== rSet
.mxData
->mnUseFlatMenus
) &&
2338 (mxData
->maFaceColor
== rSet
.mxData
->maFaceColor
) &&
2339 (mxData
->maCheckedColor
== rSet
.mxData
->maCheckedColor
) &&
2340 (mxData
->maLightColor
== rSet
.mxData
->maLightColor
) &&
2341 (mxData
->maLightBorderColor
== rSet
.mxData
->maLightBorderColor
) &&
2342 (mxData
->maShadowColor
== rSet
.mxData
->maShadowColor
) &&
2343 (mxData
->maDarkShadowColor
== rSet
.mxData
->maDarkShadowColor
) &&
2344 (mxData
->maButtonTextColor
== rSet
.mxData
->maButtonTextColor
) &&
2345 (mxData
->maRadioCheckTextColor
== rSet
.mxData
->maRadioCheckTextColor
) &&
2346 (mxData
->maGroupTextColor
== rSet
.mxData
->maGroupTextColor
) &&
2347 (mxData
->maLabelTextColor
== rSet
.mxData
->maLabelTextColor
) &&
2348 (mxData
->maInfoTextColor
== rSet
.mxData
->maInfoTextColor
) &&
2349 (mxData
->maWindowColor
== rSet
.mxData
->maWindowColor
) &&
2350 (mxData
->maWindowTextColor
== rSet
.mxData
->maWindowTextColor
) &&
2351 (mxData
->maDialogColor
== rSet
.mxData
->maDialogColor
) &&
2352 (mxData
->maDialogTextColor
== rSet
.mxData
->maDialogTextColor
) &&
2353 (mxData
->maWorkspaceColor
== rSet
.mxData
->maWorkspaceColor
) &&
2354 (mxData
->maMonoColor
== rSet
.mxData
->maMonoColor
) &&
2355 (mxData
->maFieldColor
== rSet
.mxData
->maFieldColor
) &&
2356 (mxData
->maFieldTextColor
== rSet
.mxData
->maFieldTextColor
) &&
2357 (mxData
->maActiveColor
== rSet
.mxData
->maActiveColor
) &&
2358 (mxData
->maActiveTextColor
== rSet
.mxData
->maActiveTextColor
) &&
2359 (mxData
->maActiveBorderColor
== rSet
.mxData
->maActiveBorderColor
) &&
2360 (mxData
->maDeactiveColor
== rSet
.mxData
->maDeactiveColor
) &&
2361 (mxData
->maDeactiveTextColor
== rSet
.mxData
->maDeactiveTextColor
) &&
2362 (mxData
->maDeactiveBorderColor
== rSet
.mxData
->maDeactiveBorderColor
) &&
2363 (mxData
->maMenuColor
== rSet
.mxData
->maMenuColor
) &&
2364 (mxData
->maMenuBarColor
== rSet
.mxData
->maMenuBarColor
) &&
2365 (mxData
->maMenuBarRolloverColor
== rSet
.mxData
->maMenuBarRolloverColor
) &&
2366 (mxData
->maMenuBorderColor
== rSet
.mxData
->maMenuBorderColor
) &&
2367 (mxData
->maMenuTextColor
== rSet
.mxData
->maMenuTextColor
) &&
2368 (mxData
->maMenuBarTextColor
== rSet
.mxData
->maMenuBarTextColor
) &&
2369 (mxData
->maMenuBarRolloverTextColor
== rSet
.mxData
->maMenuBarRolloverTextColor
) &&
2370 (mxData
->maMenuHighlightColor
== rSet
.mxData
->maMenuHighlightColor
) &&
2371 (mxData
->maMenuHighlightTextColor
== rSet
.mxData
->maMenuHighlightTextColor
) &&
2372 (mxData
->maHighlightColor
== rSet
.mxData
->maHighlightColor
) &&
2373 (mxData
->maHighlightTextColor
== rSet
.mxData
->maHighlightTextColor
) &&
2374 (mxData
->maTabTextColor
== rSet
.mxData
->maTabTextColor
) &&
2375 (mxData
->maTabRolloverTextColor
== rSet
.mxData
->maTabRolloverTextColor
) &&
2376 (mxData
->maTabHighlightTextColor
== rSet
.mxData
->maTabHighlightTextColor
) &&
2377 (mxData
->maActiveTabColor
== rSet
.mxData
->maActiveTabColor
) &&
2378 (mxData
->maInactiveTabColor
== rSet
.mxData
->maInactiveTabColor
) &&
2379 (mxData
->maDisableColor
== rSet
.mxData
->maDisableColor
) &&
2380 (mxData
->maHelpColor
== rSet
.mxData
->maHelpColor
) &&
2381 (mxData
->maHelpTextColor
== rSet
.mxData
->maHelpTextColor
) &&
2382 (mxData
->maLinkColor
== rSet
.mxData
->maLinkColor
) &&
2383 (mxData
->maVisitedLinkColor
== rSet
.mxData
->maVisitedLinkColor
) &&
2384 (mxData
->maHighlightLinkColor
== rSet
.mxData
->maHighlightLinkColor
) &&
2385 (mxData
->maAppFont
== rSet
.mxData
->maAppFont
) &&
2386 (mxData
->maHelpFont
== rSet
.mxData
->maHelpFont
) &&
2387 (mxData
->maTitleFont
== rSet
.mxData
->maTitleFont
) &&
2388 (mxData
->maFloatTitleFont
== rSet
.mxData
->maFloatTitleFont
) &&
2389 (mxData
->maMenuFont
== rSet
.mxData
->maMenuFont
) &&
2390 (mxData
->maToolFont
== rSet
.mxData
->maToolFont
) &&
2391 (mxData
->maGroupFont
== rSet
.mxData
->maGroupFont
) &&
2392 (mxData
->maLabelFont
== rSet
.mxData
->maLabelFont
) &&
2393 (mxData
->maInfoFont
== rSet
.mxData
->maInfoFont
) &&
2394 (mxData
->maRadioCheckFont
== rSet
.mxData
->maRadioCheckFont
) &&
2395 (mxData
->maPushButtonFont
== rSet
.mxData
->maPushButtonFont
) &&
2396 (mxData
->maFieldFont
== rSet
.mxData
->maFieldFont
) &&
2397 (mxData
->maIconFont
== rSet
.mxData
->maIconFont
) &&
2398 (mxData
->maTabFont
== rSet
.mxData
->maTabFont
) &&
2399 (mxData
->meUseImagesInMenus
== rSet
.mxData
->meUseImagesInMenus
) &&
2400 (mxData
->mbPreferredUseImagesInMenus
== rSet
.mxData
->mbPreferredUseImagesInMenus
) &&
2401 (mxData
->mbSkipDisabledInMenus
== rSet
.mxData
->mbSkipDisabledInMenus
) &&
2402 (mxData
->mbHideDisabledMenuItems
== rSet
.mxData
->mbHideDisabledMenuItems
) &&
2403 (mxData
->mbAcceleratorsInContextMenus
== rSet
.mxData
->mbAcceleratorsInContextMenus
)&&
2404 (mxData
->mbPrimaryButtonWarpsSlider
== rSet
.mxData
->mbPrimaryButtonWarpsSlider
) &&
2405 (mxData
->maFontColor
== rSet
.mxData
->maFontColor
) &&
2406 (mxData
->mnEdgeBlending
== rSet
.mxData
->mnEdgeBlending
) &&
2407 (mxData
->maEdgeBlendingTopLeftColor
== rSet
.mxData
->maEdgeBlendingTopLeftColor
) &&
2408 (mxData
->maEdgeBlendingBottomRightColor
== rSet
.mxData
->maEdgeBlendingBottomRightColor
) &&
2409 (mxData
->mnListBoxMaximumLineCount
== rSet
.mxData
->mnListBoxMaximumLineCount
) &&
2410 (mxData
->mnColorValueSetColumnCount
== rSet
.mxData
->mnColorValueSetColumnCount
) &&
2411 (mxData
->mnColorValueSetMaximumRowCount
== rSet
.mxData
->mnColorValueSetMaximumRowCount
) &&
2412 (mxData
->maListBoxPreviewDefaultLogicSize
== rSet
.mxData
->maListBoxPreviewDefaultLogicSize
) &&
2413 (mxData
->maListBoxPreviewDefaultPixelSize
== rSet
.mxData
->maListBoxPreviewDefaultPixelSize
) &&
2414 (mxData
->mnListBoxPreviewDefaultLineWidth
== rSet
.mxData
->mnListBoxPreviewDefaultLineWidth
) &&
2415 (mxData
->mbPreviewUsesCheckeredBackground
== rSet
.mxData
->mbPreviewUsesCheckeredBackground
))
2421 ImplMiscData::ImplMiscData()
2423 mnEnableATT
= TRISTATE_INDET
;
2424 mnDisablePrinting
= TRISTATE_INDET
;
2425 static const char* pEnv
= getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
2426 mbEnableLocalizedDecimalSep
= (pEnv
!= NULL
);
2427 pEnv
= getenv("VCL_HIDE_WINDOWS"); // do not display any windows
2428 mbPseudoHeadless
= (pEnv
!= NULL
);
2431 ImplMiscData::ImplMiscData( const ImplMiscData
& rData
)
2433 mnEnableATT
= rData
.mnEnableATT
;
2434 mnDisablePrinting
= rData
.mnDisablePrinting
;
2435 mbEnableLocalizedDecimalSep
= rData
.mbEnableLocalizedDecimalSep
;
2436 mbPseudoHeadless
= rData
.mbPseudoHeadless
;
2439 MiscSettings::MiscSettings()
2440 : mxData(std::make_shared
<ImplMiscData
>())
2444 MiscSettings::~MiscSettings()
2448 void MiscSettings::CopyData()
2450 // copy if other references exist
2451 if ( ! mxData
.unique() ) {
2452 mxData
= std::make_shared
<ImplMiscData
>(*mxData
);
2456 bool MiscSettings::operator ==( const MiscSettings
& rSet
) const
2458 if ( mxData
== rSet
.mxData
)
2461 if ( (mxData
->mnEnableATT
== rSet
.mxData
->mnEnableATT
) &&
2462 (mxData
->mnDisablePrinting
== rSet
.mxData
->mnDisablePrinting
) &&
2463 (mxData
->mbEnableLocalizedDecimalSep
== rSet
.mxData
->mbEnableLocalizedDecimalSep
) )
2470 MiscSettings::operator !=( const MiscSettings
& rSet
) const
2472 return !(*this == rSet
);
2475 bool MiscSettings::GetDisablePrinting() const
2477 if( mxData
->mnDisablePrinting
== TRISTATE_INDET
)
2480 vcl::SettingsConfigItem::get()->
2481 getValue( OUString( "DesktopManagement" ),
2482 OUString( "DisablePrinting" ) );
2483 mxData
->mnDisablePrinting
= aEnable
.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE
: TRISTATE_FALSE
;
2486 return mxData
->mnDisablePrinting
!= TRISTATE_FALSE
;
2489 bool MiscSettings::GetEnableATToolSupport() const
2493 if( mxData
->mnEnableATT
== TRISTATE_INDET
)
2495 // Check in the Windows registry if an AT tool wants Accessibility support to
2499 if( ERROR_SUCCESS
== RegOpenKey(HKEY_CURRENT_USER
,
2500 "Software\\LibreOffice\\Accessibility\\AtToolSupport",
2504 sal_uInt8 Data
[6]; // possible values: "true", "false", "1", "0", DWORD
2505 DWORD cbData
= sizeof(Data
);
2507 if( ERROR_SUCCESS
== RegQueryValueEx(hkey
, "SupportAssistiveTechnology",
2508 NULL
, &dwType
, Data
, &cbData
) )
2513 mxData
->mnEnableATT
= ((0 == stricmp((const char *) Data
, "1")) || (0 == stricmp((const char *) Data
, "true"))) ? TRISTATE_TRUE
: TRISTATE_FALSE
;
2516 switch (((DWORD
*) Data
)[0]) {
2518 mxData
->mnEnableATT
= TRISTATE_FALSE
;
2521 mxData
->mnEnableATT
= TRISTATE_TRUE
;
2524 mxData
->mnEnableATT
= TRISTATE_INDET
;
2525 //TODO: or TRISTATE_TRUE?
2530 // Unsupported registry type
2540 if( mxData
->mnEnableATT
== TRISTATE_INDET
)
2542 static const char* pEnv
= getenv("SAL_ACCESSIBILITY_ENABLED" );
2543 if( !pEnv
|| !*pEnv
)
2546 vcl::SettingsConfigItem::get()->
2547 getValue( OUString( "Accessibility" ),
2548 OUString( "EnableATToolSupport" ) );
2549 mxData
->mnEnableATT
= aEnable
.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE
: TRISTATE_FALSE
;
2553 mxData
->mnEnableATT
= TRISTATE_TRUE
;
2557 return mxData
->mnEnableATT
!= TRISTATE_FALSE
;
2561 void MiscSettings::SetEnableATToolSupport( bool bEnable
)
2563 if ( (bEnable
? TRISTATE_TRUE
: TRISTATE_FALSE
) != mxData
->mnEnableATT
)
2565 if( bEnable
&& !ImplInitAccessBridge() )
2570 // If the accessibility key in the Windows registry exists, change it synchronously
2571 if( ERROR_SUCCESS
== RegOpenKey(HKEY_CURRENT_USER
,
2572 "Software\\LibreOffice\\Accessibility\\AtToolSupport",
2576 sal_uInt8 Data
[6]; // possible values: "true", "false", 1, 0
2577 DWORD cbData
= sizeof(Data
);
2579 if( ERROR_SUCCESS
== RegQueryValueEx(hkey
, "SupportAssistiveTechnology",
2580 NULL
, &dwType
, Data
, &cbData
) )
2585 RegSetValueEx(hkey
, "SupportAssistiveTechnology",
2587 bEnable
? (sal_uInt8
*) "true" : (sal_uInt8
*) "false",
2588 bEnable
? sizeof("true") : sizeof("false"));
2591 ((DWORD
*) Data
)[0] = bEnable
? 1 : 0;
2592 RegSetValueEx(hkey
, "SupportAssistiveTechnology",
2593 0, dwType
, Data
, sizeof(DWORD
));
2596 // Unsupported registry type
2604 vcl::SettingsConfigItem::get()->
2605 setValue( OUString( "Accessibility" ),
2606 OUString( "EnableATToolSupport" ),
2607 bEnable
? OUString("true") : OUString("false" ) );
2608 mxData
->mnEnableATT
= bEnable
? TRISTATE_TRUE
: TRISTATE_FALSE
;
2613 void MiscSettings::SetEnableLocalizedDecimalSep( bool bEnable
)
2616 mxData
->mbEnableLocalizedDecimalSep
= bEnable
;
2619 bool MiscSettings::GetEnableLocalizedDecimalSep() const
2621 return mxData
->mbEnableLocalizedDecimalSep
;
2624 bool MiscSettings::GetPseudoHeadless() const
2626 return mxData
->mbPseudoHeadless
;
2629 ImplHelpData::ImplHelpData()
2632 mnTipTimeout
= 3000;
2633 mnBalloonDelay
= 1500;
2636 ImplHelpData::ImplHelpData( const ImplHelpData
& rData
)
2638 mnTipDelay
= rData
.mnTipDelay
;
2639 mnTipTimeout
= rData
.mnTipTimeout
;
2640 mnBalloonDelay
= rData
.mnBalloonDelay
;
2643 HelpSettings::HelpSettings()
2644 : mxData(std::make_shared
<ImplHelpData
>())
2648 HelpSettings::~HelpSettings()
2652 void HelpSettings::CopyData()
2654 // copy if other references exist
2655 if ( ! mxData
.unique() ) {
2656 mxData
= std::make_shared
<ImplHelpData
>(*mxData
);
2660 bool HelpSettings::operator ==( const HelpSettings
& rSet
) const
2662 if ( mxData
== rSet
.mxData
)
2665 if ( (mxData
->mnTipDelay
== rSet
.mxData
->mnTipDelay
) &&
2666 (mxData
->mnTipTimeout
== rSet
.mxData
->mnTipTimeout
) &&
2667 (mxData
->mnBalloonDelay
== rSet
.mxData
->mnBalloonDelay
) )
2674 HelpSettings::GetTipDelay() const
2676 return mxData
->mnTipDelay
;
2680 HelpSettings::SetTipTimeout( sal_uLong nTipTimeout
)
2683 mxData
->mnTipTimeout
= nTipTimeout
;
2687 HelpSettings::GetTipTimeout() const
2689 return mxData
->mnTipTimeout
;
2693 HelpSettings::GetBalloonDelay() const
2695 return mxData
->mnBalloonDelay
;
2699 HelpSettings::operator !=( const HelpSettings
& rSet
) const
2701 return !(*this == rSet
);
2704 ImplAllSettingsData::ImplAllSettingsData()
2706 maLocale( LANGUAGE_SYSTEM
),
2707 maUILocale( LANGUAGE_SYSTEM
)
2709 mnWindowUpdate
= AllSettingsFlags::MOUSE
| AllSettingsFlags::STYLE
|
2710 AllSettingsFlags::MISC
| AllSettingsFlags::LOCALE
;
2711 mpLocaleDataWrapper
= NULL
;
2712 mpUILocaleDataWrapper
= NULL
;
2713 mpI18nHelper
= NULL
;
2714 mpUII18nHelper
= NULL
;
2715 maMiscSettings
.SetEnableLocalizedDecimalSep( maSysLocale
.GetOptions().IsDecimalSeparatorAsLocale() );
2718 ImplAllSettingsData::ImplAllSettingsData( const ImplAllSettingsData
& rData
) :
2719 maMouseSettings( rData
.maMouseSettings
),
2720 maStyleSettings( rData
.maStyleSettings
),
2721 maMiscSettings( rData
.maMiscSettings
),
2722 maHelpSettings( rData
.maHelpSettings
),
2723 maLocale( rData
.maLocale
),
2724 maUILocale( rData
.maUILocale
)
2726 mnWindowUpdate
= rData
.mnWindowUpdate
;
2727 // Pointer couldn't shared and objects haven't a copy ctor
2728 // So we create the cache objects new, if the GetFunction is
2730 mpLocaleDataWrapper
= NULL
;
2731 mpUILocaleDataWrapper
= NULL
;
2732 mpI18nHelper
= NULL
;
2733 mpUII18nHelper
= NULL
;
2736 ImplAllSettingsData::~ImplAllSettingsData()
2738 delete mpLocaleDataWrapper
;
2739 delete mpUILocaleDataWrapper
;
2740 delete mpI18nHelper
;
2741 delete mpUII18nHelper
;
2744 AllSettings::AllSettings()
2745 : mxData(std::make_shared
<ImplAllSettingsData
>())
2749 AllSettings::AllSettings( const AllSettings
& rSet
)
2751 mxData
= rSet
.mxData
;
2754 AllSettings::~AllSettings()
2758 void AllSettings::CopyData()
2760 // copy if other references exist
2761 if ( ! mxData
.unique() ) {
2762 mxData
= std::make_shared
<ImplAllSettingsData
>(*mxData
);
2767 AllSettingsFlags
AllSettings::Update( AllSettingsFlags nFlags
, const AllSettings
& rSet
)
2770 AllSettingsFlags nChangeFlags
= AllSettingsFlags::NONE
;
2772 if ( nFlags
& AllSettingsFlags::MOUSE
)
2774 if ( mxData
->maMouseSettings
!= rSet
.mxData
->maMouseSettings
)
2777 mxData
->maMouseSettings
= rSet
.mxData
->maMouseSettings
;
2778 nChangeFlags
|= AllSettingsFlags::MOUSE
;
2782 if ( nFlags
& AllSettingsFlags::STYLE
)
2784 if ( mxData
->maStyleSettings
!= rSet
.mxData
->maStyleSettings
)
2787 mxData
->maStyleSettings
= rSet
.mxData
->maStyleSettings
;
2788 nChangeFlags
|= AllSettingsFlags::STYLE
;
2792 if ( nFlags
& AllSettingsFlags::MISC
)
2794 if ( mxData
->maMiscSettings
!= rSet
.mxData
->maMiscSettings
)
2797 mxData
->maMiscSettings
= rSet
.mxData
->maMiscSettings
;
2798 nChangeFlags
|= AllSettingsFlags::MISC
;
2802 if ( nFlags
& AllSettingsFlags::LOCALE
)
2804 if ( mxData
->maLocale
!= rSet
.mxData
->maLocale
)
2806 SetLanguageTag( rSet
.mxData
->maLocale
);
2807 nChangeFlags
|= AllSettingsFlags::LOCALE
;
2811 return nChangeFlags
;
2814 AllSettingsFlags
AllSettings::GetChangeFlags( const AllSettings
& rSet
) const
2817 AllSettingsFlags nChangeFlags
= AllSettingsFlags::NONE
;
2819 if ( mxData
->maStyleSettings
!= rSet
.mxData
->maStyleSettings
)
2820 nChangeFlags
|= AllSettingsFlags::STYLE
;
2822 if ( mxData
->maMiscSettings
!= rSet
.mxData
->maMiscSettings
)
2823 nChangeFlags
|= AllSettingsFlags::MISC
;
2825 if ( mxData
->maLocale
!= rSet
.mxData
->maLocale
)
2826 nChangeFlags
|= AllSettingsFlags::LOCALE
;
2828 return nChangeFlags
;
2831 bool AllSettings::operator ==( const AllSettings
& rSet
) const
2833 if ( mxData
== rSet
.mxData
)
2836 if ( (mxData
->maMouseSettings
== rSet
.mxData
->maMouseSettings
) &&
2837 (mxData
->maStyleSettings
== rSet
.mxData
->maStyleSettings
) &&
2838 (mxData
->maMiscSettings
== rSet
.mxData
->maMiscSettings
) &&
2839 (mxData
->maHelpSettings
== rSet
.mxData
->maHelpSettings
) &&
2840 (mxData
->maLocale
== rSet
.mxData
->maLocale
) &&
2841 (mxData
->mnWindowUpdate
== rSet
.mxData
->mnWindowUpdate
) )
2849 void AllSettings::SetLanguageTag( const LanguageTag
& rLanguageTag
)
2851 if (mxData
->maLocale
!= rLanguageTag
)
2855 mxData
->maLocale
= rLanguageTag
;
2857 if ( mxData
->mpLocaleDataWrapper
)
2859 delete mxData
->mpLocaleDataWrapper
;
2860 mxData
->mpLocaleDataWrapper
= NULL
;
2862 if ( mxData
->mpI18nHelper
)
2864 delete mxData
->mpI18nHelper
;
2865 mxData
->mpI18nHelper
= NULL
;
2872 bool GetConfigLayoutRTL(bool bMath
)
2874 static const char* pEnv
= getenv("SAL_RTL_ENABLED" );
2875 static int nUIMirroring
= -1; // -1: undef, 0: auto, 1: on 2: off
2877 // environment always overrides
2883 if( nUIMirroring
== -1 )
2885 nUIMirroring
= 0; // ask configuration only once
2886 utl::OConfigurationNode aNode
= utl::OConfigurationTreeRoot::tryCreateWithComponentContext(
2887 comphelper::getProcessComponentContext(),
2888 OUString("org.openoffice.Office.Common/I18N/CTL") ); // note: case sensitive !
2889 if ( aNode
.isValid() )
2892 ::com::sun::star::uno::Any aValue
= aNode
.getNodeValue( OUString("UIMirroring") );
2893 if( aValue
>>= bTmp
)
2895 // found true or false; if it was nil, nothing is changed
2896 nUIMirroring
= bTmp
? 1 : 2;
2901 if( nUIMirroring
== 0 ) // no config found (eg, setup) or default (nil) was set: check language
2903 LanguageType aLang
= LANGUAGE_DONTKNOW
;
2904 ImplSVData
* pSVData
= ImplGetSVData();
2905 if ( pSVData
->maAppData
.mpSettings
)
2906 aLang
= pSVData
->maAppData
.mpSettings
->GetUILanguageTag().getLanguageType();
2908 bRTL
= MsLangId::isRightToLeftMath( aLang
);
2910 bRTL
= MsLangId::isRightToLeft( aLang
);
2913 bRTL
= (nUIMirroring
== 1);
2919 bool AllSettings::GetLayoutRTL()
2921 return GetConfigLayoutRTL(false);
2924 bool AllSettings::GetMathLayoutRTL()
2926 return GetConfigLayoutRTL(true);
2929 const LanguageTag
& AllSettings::GetLanguageTag() const
2931 // SYSTEM locale means: use settings from SvtSysLocale that is resolved
2932 if ( mxData
->maLocale
.isSystemLocale() )
2933 mxData
->maLocale
= mxData
->maSysLocale
.GetLanguageTag();
2935 return mxData
->maLocale
;
2938 const LanguageTag
& AllSettings::GetUILanguageTag() const
2940 // the UILocale is never changed
2941 if ( mxData
->maUILocale
.isSystemLocale() )
2942 mxData
->maUILocale
= mxData
->maSysLocale
.GetUILanguageTag();
2944 return mxData
->maUILocale
;
2947 const LocaleDataWrapper
& AllSettings::GetLocaleDataWrapper() const
2949 if ( !mxData
->mpLocaleDataWrapper
)
2950 const_cast<AllSettings
*>(this)->mxData
->mpLocaleDataWrapper
= new LocaleDataWrapper(
2951 comphelper::getProcessComponentContext(), GetLanguageTag() );
2952 return *mxData
->mpLocaleDataWrapper
;
2955 const LocaleDataWrapper
& AllSettings::GetUILocaleDataWrapper() const
2957 if ( !mxData
->mpUILocaleDataWrapper
)
2958 const_cast<AllSettings
*>(this)->mxData
->mpUILocaleDataWrapper
= new LocaleDataWrapper(
2959 comphelper::getProcessComponentContext(), GetUILanguageTag() );
2960 return *mxData
->mpUILocaleDataWrapper
;
2963 const vcl::I18nHelper
& AllSettings::GetLocaleI18nHelper() const
2965 if ( !mxData
->mpI18nHelper
) {
2966 const_cast<AllSettings
*>(this)->mxData
->mpI18nHelper
= new vcl::I18nHelper(
2967 comphelper::getProcessComponentContext(), GetLanguageTag() );
2969 return *mxData
->mpI18nHelper
;
2972 const vcl::I18nHelper
& AllSettings::GetUILocaleI18nHelper() const
2974 if ( !mxData
->mpUII18nHelper
) {
2975 const_cast<AllSettings
*>(this)->mxData
->mpUII18nHelper
= new vcl::I18nHelper(
2976 comphelper::getProcessComponentContext(), GetUILanguageTag() );
2978 return *mxData
->mpUII18nHelper
;
2981 void AllSettings::LocaleSettingsChanged( sal_uInt32 nHint
)
2983 AllSettings
aAllSettings( Application::GetSettings() );
2984 if ( nHint
& SYSLOCALEOPTIONS_HINT_DECSEP
)
2986 MiscSettings aMiscSettings
= aAllSettings
.GetMiscSettings();
2987 bool bIsDecSepAsLocale
= aAllSettings
.mxData
->maSysLocale
.GetOptions().IsDecimalSeparatorAsLocale();
2988 if ( aMiscSettings
.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale
)
2990 aMiscSettings
.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale
);
2991 aAllSettings
.SetMiscSettings( aMiscSettings
);
2995 if ( (nHint
& SYSLOCALEOPTIONS_HINT_LOCALE
) )
2996 aAllSettings
.SetLanguageTag( aAllSettings
.mxData
->maSysLocale
.GetOptions().GetLanguageTag() );
2998 Application::SetSettings( aAllSettings
);
3001 const StyleSettings
&
3002 AllSettings::GetStyleSettings() const
3004 return mxData
->maStyleSettings
;
3007 StyleSettingsOptions
3008 StyleSettings::GetOptions() const
3010 return mxData
->mnOptions
;
3013 std::vector
<vcl::IconThemeInfo
>
3014 StyleSettings::GetInstalledIconThemes() const
3016 return mxData
->mIconThemeScanner
->GetFoundIconThemes();
3020 StyleSettings::GetAutomaticallyChosenIconTheme() const
3022 OUString desktopEnvironment
= Application::GetDesktopEnvironment();
3023 OUString themeName
= mxData
->mIconThemeSelector
->SelectIconThemeForDesktopEnvironment(
3024 mxData
->mIconThemeScanner
->GetFoundIconThemes(),
3031 StyleSettings::SetIconTheme(const OUString
& theme
)
3034 mxData
->mIconTheme
= theme
;
3038 StyleSettings::DetermineIconTheme() const
3040 OUString
sTheme(mxData
->mIconTheme
);
3041 if (sTheme
.isEmpty())
3043 // read from the configuration, or fallback to what the desktop wants
3044 uno::Reference
<uno::XComponentContext
> xContext(comphelper::getProcessComponentContext());
3047 sTheme
= officecfg::Office::Common::Misc::SymbolStyle::get(xContext
);
3049 if (sTheme
.isEmpty() || sTheme
== "auto")
3050 sTheme
= GetAutomaticallyChosenIconTheme();
3054 OUString r
= mxData
->mIconThemeSelector
->SelectIconTheme(
3055 mxData
->mIconThemeScanner
->GetFoundIconThemes(),
3061 StyleSettings::SetHighContrastMode(bool bHighContrast
)
3063 if (mxData
->mbHighContrast
== bHighContrast
) {
3068 mxData
->mbHighContrast
= bHighContrast
;
3069 mxData
->mIconThemeSelector
->SetUseHighContrastTheme(bHighContrast
);
3073 StyleSettings::GetHighContrastMode() const
3075 return mxData
->mbHighContrast
;
3079 StyleSettings::SetPreferredIconTheme(const OUString
& theme
)
3081 mxData
->mIconThemeSelector
->SetPreferredIconTheme(theme
);
3085 AllSettings::SetMouseSettings( const MouseSettings
& rSet
)
3088 mxData
->maMouseSettings
= rSet
;
3091 const MouseSettings
&
3092 AllSettings::GetMouseSettings() const
3094 return mxData
->maMouseSettings
;
3098 AllSettings::SetStyleSettings( const StyleSettings
& rSet
)
3101 mxData
->maStyleSettings
= rSet
;
3105 AllSettings::SetMiscSettings( const MiscSettings
& rSet
)
3108 mxData
->maMiscSettings
= rSet
;
3112 AllSettings::GetMiscSettings() const
3114 return mxData
->maMiscSettings
;
3118 AllSettings::SetHelpSettings( const HelpSettings
& rSet
)
3121 mxData
->maHelpSettings
= rSet
;
3125 AllSettings::GetHelpSettings() const
3127 return mxData
->maHelpSettings
;
3131 AllSettings::GetWindowUpdate() const
3133 return mxData
->mnWindowUpdate
;
3137 AllSettings::operator !=( const AllSettings
& rSet
) const
3139 return !(*this == rSet
);
3143 AllSettings::GetSysLocale()
3145 return mxData
->maSysLocale
;
3148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */