LibreOffice Module vcl (master) 1
app/settings.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <config_folders.h>
21
22#include <officecfg/Office/Common.hxx>
23
24#ifdef _WIN32
25#include <win/svsys.h>
26#endif
27
29#include <rtl/bootstrap.hxx>
30
33
34#include <comphelper/lok.hxx>
35
36#include <vcl/graphicfilter.hxx>
37#include <IconThemeScanner.hxx>
38#include <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 <configsettings.hxx>
45#include <vcl/outdev.hxx>
46
47#include <unotools/fontcfg.hxx>
53
54using namespace ::com::sun::star;
55
56#include <svdata.hxx>
57
59{
61 sal_uInt64 mnDoubleClkTime = 500;
62 sal_Int32 mnDoubleClkWidth = 2;
63 sal_Int32 mnDoubleClkHeight = 2;
64 sal_Int32 mnStartDragWidth = 2 ;
65 sal_Int32 mnStartDragHeight = 2;
66 sal_Int32 mnButtonRepeat = 90;
67 sal_Int32 mnMenuDelay = 150;
71};
72
74{
76 ImplStyleData( const ImplStyleData& rData );
77
78 void SetStandardStyles();
79
161 sal_Int32 mnTitleHeight;
164 sal_Int32 mnSpinSize;
165 sal_Int32 mnCursorSize;
185 sal_Int32 mnMinThumbSize;
186 std::shared_ptr<vcl::IconThemeScanner>
188 std::shared_ptr<vcl::IconThemeSelector>
190
191 OUString mIconTheme;
196 //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise
197 //primary means scroll by single page. Secondary button takes the alternative behaviour
200
201 sal_uInt16 mnEdgeBlending;
209
211
214 std::optional<Color> maPersonaMenuBarTextColor;
215};
216
218{
219 ImplMiscData();
223};
224
226{
227 sal_Int32 mnTipTimeout = 3000;
228};
229
231{
235
242 std::unique_ptr<LocaleDataWrapper> mpLocaleDataWrapper;
243 std::unique_ptr<LocaleDataWrapper> mpUILocaleDataWrapper;
244 std::unique_ptr<LocaleDataWrapper> mpNeutralLocaleDataWrapper;
245 std::unique_ptr<vcl::I18nHelper> mpI18nHelper;
246 std::unique_ptr<vcl::I18nHelper> mpUII18nHelper;
248};
249
250void
252{
253 CopyData();
254 mxData->mnOptions = nOptions;
255}
256
259{
260 return mxData->mnOptions;
261}
262
263void
264MouseSettings::SetDoubleClickTime( sal_uInt64 nDoubleClkTime )
265{
266 CopyData();
267 mxData->mnDoubleClkTime = nDoubleClkTime;
268}
269
270sal_uInt64
272{
273 return mxData->mnDoubleClkTime;
274}
275
276void
277MouseSettings::SetDoubleClickWidth( sal_Int32 nDoubleClkWidth )
278{
279 CopyData();
280 mxData->mnDoubleClkWidth = nDoubleClkWidth;
281}
282
283sal_Int32
285{
286 return mxData->mnDoubleClkWidth;
287}
288
289void
290MouseSettings::SetDoubleClickHeight( sal_Int32 nDoubleClkHeight )
291{
292 CopyData();
293 mxData->mnDoubleClkHeight = nDoubleClkHeight;
294}
295
296sal_Int32
298{
299 return mxData->mnDoubleClkHeight;
300}
301
302void
303MouseSettings::SetStartDragWidth( sal_Int32 nDragWidth )
304{
305 CopyData();
306 mxData->mnStartDragWidth = nDragWidth;
307}
308
309sal_Int32
311{
312 return mxData->mnStartDragWidth;
313}
314
315void
316MouseSettings::SetStartDragHeight( sal_Int32 nDragHeight )
317{
318 CopyData();
319 mxData->mnStartDragHeight = nDragHeight;
320}
321
322sal_Int32
324{
325 return mxData->mnStartDragHeight;
326}
327
328sal_uInt16
330{
331 return MOUSE_LEFT;
332}
333
334sal_uInt16
336{
337 return MOUSE_RIGHT;
338}
339
340sal_uInt16
342{
343 return 1;
344}
345
346sal_Int32
348{
349 return 100;
350}
351
352sal_Int32
354{
355 return 370;
356}
357
358void
360{
361 CopyData();
362 mxData->mnButtonRepeat = nRepeat;
363}
364
365sal_Int32
367{
368 return mxData->mnButtonRepeat;
369}
370
371sal_Int32
373{
374 return 250;
375}
376
377void
379{
380 CopyData();
381 mxData->mnMenuDelay = nDelay;
382}
383
384sal_Int32
386{
387 return mxData->mnMenuDelay;
388}
389
390void
392{
393 CopyData();
394 mxData->mnFollow = nFollow;
395}
396
399{
400 return mxData->mnFollow;
401}
402
403void
405{
406 CopyData();
407 mxData->mnMiddleButtonAction = nAction;
408}
409
412{
413 return mxData->mnMiddleButtonAction;
414}
415
416void
418{
419 CopyData();
420 mxData->mnWheelBehavior = nBehavior;
421}
422
425{
426 return mxData->mnWheelBehavior;
427}
428
429bool
431{
432 return !(*this == rSet);
433}
434
436 : mxData(std::make_shared<ImplMouseData>())
437{
438}
439
441{
442 // copy if other references exist
443 if (mxData.use_count() > 1)
444 {
445 mxData = std::make_shared<ImplMouseData>(*mxData);
446 }
447}
448
450{
451 if ( mxData == rSet.mxData )
452 return true;
453
454 return
455 (mxData->mnOptions == rSet.mxData->mnOptions) &&
456 (mxData->mnDoubleClkTime == rSet.mxData->mnDoubleClkTime) &&
457 (mxData->mnDoubleClkWidth == rSet.mxData->mnDoubleClkWidth) &&
458 (mxData->mnDoubleClkHeight == rSet.mxData->mnDoubleClkHeight) &&
459 (mxData->mnStartDragWidth == rSet.mxData->mnStartDragWidth) &&
460 (mxData->mnStartDragHeight == rSet.mxData->mnStartDragHeight) &&
461 (mxData->mnMiddleButtonAction == rSet.mxData->mnMiddleButtonAction) &&
462 (mxData->mnButtonRepeat == rSet.mxData->mnButtonRepeat) &&
463 (mxData->mnMenuDelay == rSet.mxData->mnMenuDelay) &&
464 (mxData->mnFollow == rSet.mxData->mnFollow) &&
465 (mxData->mnWheelBehavior == rSet.mxData->mnWheelBehavior );
466}
467
469 mnScrollBarSize(16),
470 mnSpinSize(16),
471 mnCursorSize(2),
472 mnAntialiasedMin(0),
473 mnCursorBlinkTime(STYLE_CURSOR_NOBLINKTIME),
474 mnDragFullOptions(DragFullOptions::All),
475 mnSelectionOptions(SelectionOptions::NONE),
476 mnDisplayOptions(DisplayOptions::NONE),
477 mnToolbarIconSize(ToolbarIconSize::Unknown),
478 mnOptions(StyleSettingsOptions::NONE),
479 mbAutoMnemonic(true),
480 meUseImagesInMenus(TRISTATE_INDET),
481 mnMinThumbSize(16),
482 mIconThemeSelector(std::make_shared<vcl::IconThemeSelector>()),
483 meContextMenuShortcuts(TRISTATE_INDET),
484 mnEdgeBlending(35),
485 maEdgeBlendingTopLeftColor(Color(0xC0, 0xC0, 0xC0)),
486 maEdgeBlendingBottomRightColor(Color(0x40, 0x40, 0x40)),
487 mnListBoxMaximumLineCount(25),
488 // For some reason this isn't actually the column count that gets used, at least on iOS, but
489 // instead what SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() in
490 // svtools/source/config/accessibilityoptions.cxx returns.
491 mnColorValueSetColumnCount(12),
492#ifdef IOS
493 maListBoxPreviewDefaultLogicSize(Size(30, 30)),
494#else
495 maListBoxPreviewDefaultLogicSize(Size(15, 7)),
496#endif
497 maListBoxPreviewDefaultPixelSize(Size(0, 0)), // on-demand calculated in GetListBoxPreviewDefaultPixelSize(),
498 mbPreviewUsesCheckeredBackground(true)
499{
501}
502
504 maActiveBorderColor( rData.maActiveBorderColor ),
505 maActiveColor( rData.maActiveColor ),
506 maActiveTextColor( rData.maActiveTextColor ),
507 maAlternatingRowColor( rData.maAlternatingRowColor ),
508 maDefaultButtonTextColor( rData.maDefaultButtonTextColor ),
509 maButtonTextColor( rData.maButtonTextColor ),
510 maDefaultActionButtonTextColor( rData.maDefaultActionButtonTextColor ),
511 maActionButtonTextColor( rData.maActionButtonTextColor ),
512 maFlatButtonTextColor( rData.maFlatButtonTextColor ),
513 maDefaultButtonRolloverTextColor( rData.maDefaultButtonRolloverTextColor ),
514 maButtonRolloverTextColor( rData.maButtonRolloverTextColor ),
515 maDefaultActionButtonRolloverTextColor( rData.maDefaultActionButtonRolloverTextColor ),
516 maActionButtonRolloverTextColor( rData.maActionButtonRolloverTextColor ),
517 maFlatButtonRolloverTextColor( rData.maFlatButtonRolloverTextColor ),
518 maDefaultButtonPressedRolloverTextColor( rData.maDefaultButtonPressedRolloverTextColor ),
519 maButtonPressedRolloverTextColor( rData.maButtonPressedRolloverTextColor ),
520 maDefaultActionButtonPressedRolloverTextColor( rData.maDefaultActionButtonPressedRolloverTextColor ),
521 maActionButtonPressedRolloverTextColor( rData.maActionButtonPressedRolloverTextColor ),
522 maFlatButtonPressedRolloverTextColor( rData.maFlatButtonPressedRolloverTextColor ),
523 maCheckedColor( rData.maCheckedColor ),
524 maDarkShadowColor( rData.maDarkShadowColor ),
525 maDeactiveBorderColor( rData.maDeactiveBorderColor ),
526 maDeactiveColor( rData.maDeactiveColor ),
527 maDeactiveTextColor( rData.maDeactiveTextColor ),
528 maDialogColor( rData.maDialogColor ),
529 maDialogTextColor( rData.maDialogTextColor ),
530 maDisableColor( rData.maDisableColor ),
531 maFaceColor( rData.maFaceColor ),
532 maFieldColor( rData.maFieldColor ),
533 maFieldTextColor( rData.maFieldTextColor ),
534 maFieldRolloverTextColor( rData.maFieldRolloverTextColor ),
535 maGroupTextColor( rData.maGroupTextColor ),
536 maHelpColor( rData.maHelpColor ),
537 maHelpTextColor( rData.maHelpTextColor ),
538 maHighlightColor( rData.maHighlightColor ),
539 maHighlightTextColor( rData.maHighlightTextColor ),
540 maLabelTextColor( rData.maLabelTextColor ),
541 maLightBorderColor( rData.maLightBorderColor ),
542 maLightColor( rData.maLightColor ),
543 maLinkColor( rData.maLinkColor ),
544 maMenuBarColor( rData.maMenuBarColor ),
545 maMenuBarRolloverColor( rData.maMenuBarRolloverColor ),
546 maMenuBorderColor( rData.maMenuBorderColor ),
547 maMenuColor( rData.maMenuColor ),
548 maMenuHighlightColor( rData.maMenuHighlightColor ),
549 maMenuHighlightTextColor( rData.maMenuHighlightTextColor ),
550 maMenuTextColor( rData.maMenuTextColor ),
551 maListBoxWindowBackgroundColor( rData.maListBoxWindowBackgroundColor ),
552 maListBoxWindowTextColor( rData.maListBoxWindowTextColor ),
553 maListBoxWindowHighlightColor( rData.maListBoxWindowHighlightColor ),
554 maListBoxWindowHighlightTextColor( rData.maListBoxWindowHighlightTextColor ),
555 maMenuBarTextColor( rData.maMenuBarTextColor ),
556 maMenuBarRolloverTextColor( rData.maMenuBarRolloverTextColor ),
557 maMenuBarHighlightTextColor( rData.maMenuBarHighlightTextColor ),
558 maMonoColor( rData.maMonoColor ),
559 maRadioCheckTextColor( rData.maRadioCheckTextColor ),
561 maWarningColor( rData.maWarningColor ),
562 maVisitedLinkColor( rData.maVisitedLinkColor ),
563 maToolTextColor( rData.maToolTextColor ),
564 maWindowColor( rData.maWindowColor ),
565 maWindowTextColor( rData.maWindowTextColor ),
566 maWorkspaceColor( rData.maWorkspaceColor ),
567 maActiveTabColor( rData.maActiveTabColor ),
568 maInactiveTabColor( rData.maInactiveTabColor ),
569 maTabTextColor( rData.maTabTextColor ),
570 maTabRolloverTextColor( rData.maTabRolloverTextColor ),
571 maTabHighlightTextColor( rData.maTabHighlightTextColor ),
572 maAppFont( rData.maAppFont ),
573 maHelpFont( rData.maAppFont ),
574 maTitleFont( rData.maTitleFont ),
575 maFloatTitleFont( rData.maFloatTitleFont ),
576 maMenuFont( rData.maMenuFont ),
577 maToolFont( rData.maToolFont ),
578 maLabelFont( rData.maLabelFont ),
579 maRadioCheckFont( rData.maRadioCheckFont ),
580 maPushButtonFont( rData.maPushButtonFont ),
581 maFieldFont( rData.maFieldFont ),
582 maIconFont( rData.maIconFont ),
583 maTabFont( rData.maTabFont ),
584 maGroupFont( rData.maGroupFont ),
585 mnTitleHeight(rData.mnTitleHeight),
586 mnFloatTitleHeight(rData.mnFloatTitleHeight),
587 mnScrollBarSize(rData.mnScrollBarSize),
588 mnSpinSize(rData.mnSpinSize),
589 mnCursorSize(rData.mnCursorSize),
590 mnAntialiasedMin(rData.mnAntialiasedMin),
591 mnCursorBlinkTime(rData.mnCursorBlinkTime),
592 mnDragFullOptions(rData.mnDragFullOptions),
593 mnSelectionOptions(rData.mnSelectionOptions),
594 mnDisplayOptions(rData.mnDisplayOptions),
595 mnToolbarIconSize(rData.mnToolbarIconSize),
596 mnUseFlatMenus(rData.mnUseFlatMenus),
597 mnOptions(rData.mnOptions),
598 mbHighContrast(rData.mbHighContrast),
599 mbUseSystemUIFonts(rData.mbUseSystemUIFonts),
600 mbUseFontAAFromSystem(rData.mbUseFontAAFromSystem),
601 mbAutoMnemonic(rData.mbAutoMnemonic),
602 meUseImagesInMenus(rData.meUseImagesInMenus),
603 mnUseFlatBorders(rData.mnUseFlatBorders),
604 mbPreferredUseImagesInMenus(rData.mbPreferredUseImagesInMenus),
605 mnMinThumbSize(rData.mnMinThumbSize),
606 mIconThemeSelector(std::make_shared<vcl::IconThemeSelector>(*rData.mIconThemeSelector)),
607 mIconTheme(rData.mIconTheme),
608 mbSkipDisabledInMenus(rData.mbSkipDisabledInMenus),
609 mbHideDisabledMenuItems(rData.mbHideDisabledMenuItems),
610 mbPreferredContextMenuShortcuts(rData.mbPreferredContextMenuShortcuts),
611 meContextMenuShortcuts(rData.meContextMenuShortcuts),
612 mbPrimaryButtonWarpsSlider(rData.mbPrimaryButtonWarpsSlider),
613 maDialogStyle( rData.maDialogStyle ),
614 mnEdgeBlending(rData.mnEdgeBlending),
615 maEdgeBlendingTopLeftColor(rData.maEdgeBlendingTopLeftColor),
616 maEdgeBlendingBottomRightColor(rData.maEdgeBlendingBottomRightColor),
617 mnListBoxMaximumLineCount(rData.mnListBoxMaximumLineCount),
618 mnColorValueSetColumnCount(rData.mnColorValueSetColumnCount),
619 maListBoxPreviewDefaultLogicSize(rData.maListBoxPreviewDefaultLogicSize),
620 maListBoxPreviewDefaultPixelSize(rData.maListBoxPreviewDefaultPixelSize),
621 mbPreviewUsesCheckeredBackground(rData.mbPreviewUsesCheckeredBackground),
622 maPersonaHeaderFooter( rData.maPersonaHeaderFooter ),
623 maPersonaHeaderBitmap( rData.maPersonaHeaderBitmap ),
624 maPersonaFooterBitmap( rData.maPersonaFooterBitmap ),
625 maPersonaMenuBarTextColor( rData.maPersonaMenuBarTextColor )
626{
627 if (rData.mIconThemeScanner)
628 mIconThemeScanner = std::make_shared<vcl::IconThemeScanner>(*rData.mIconThemeScanner);
629}
630
632{
633 vcl::Font aStdFont( FAMILY_SWISS, Size( 0, 8 ) );
634 aStdFont.SetCharSet( osl_getThreadTextEncoding() );
635 aStdFont.SetWeight( WEIGHT_NORMAL );
637 aStdFont.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en")));
638 else
639 aStdFont.SetFamilyName("Liberation Sans");
640 maAppFont = aStdFont;
641 maHelpFont = aStdFont;
642 maMenuFont = aStdFont;
643 maToolFont = aStdFont;
644 maGroupFont = aStdFont;
645 maLabelFont = aStdFont;
646 maRadioCheckFont = aStdFont;
647 maPushButtonFont = aStdFont;
648 maFieldFont = aStdFont;
649 maIconFont = aStdFont;
650 maTabFont = aStdFont;
651 aStdFont.SetWeight( WEIGHT_BOLD );
652 maFloatTitleFont = aStdFont;
653 maTitleFont = aStdFont;
654
656 maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
661
663
679
687 maWorkspaceColor = Color( 0xDF, 0xDF, 0xDE );
712 // make active like highlight, except with a small contrast
722 maHelpColor = Color( 0xFF, 0xFF, 0xE0 );
725 maVisitedLinkColor = Color( 0x00, 0x00, 0xCC );
727 maAlternatingRowColor = Color( 0xEE, 0xEE, 0xEE );
728
729 mnTitleHeight = 18;
731 mbHighContrast = false;
732 mbUseSystemUIFonts = true;
734 mnUseFlatBorders = false;
735 mnUseFlatMenus = false;
737 mbSkipDisabledInMenus = false;
741}
742
744 : mxData(std::make_shared<ImplStyleData>())
745{
746}
747
748void
750{
751 CopyData();
752 mxData->maFaceColor = rColor;
753}
754
755const Color&
757{
758 return mxData->maFaceColor;
759}
760
761void
763{
764 CopyData();
765 mxData->maCheckedColor = rColor;
766}
767
768const Color&
770{
771 return mxData->maCheckedColor;
772}
773
774void
776{
777 CopyData();
778 mxData->maLightColor = rColor;
779}
780
781const Color&
783{
784 return mxData->maLightColor;
785}
786
787void
789{
790 CopyData();
791 mxData->maLightBorderColor = rColor;
792}
793
794const Color&
796{
797 return mxData->maLightBorderColor;
798}
799
800void
802{
803 CopyData();
804 mxData->maWarningColor = rColor;
805}
806
807const Color&
809{
810 return mxData->maWarningColor;
811}
812
813void
815{
816 CopyData();
817 mxData->maShadowColor = rColor;
818}
819
820const Color&
822{
823 return mxData->maShadowColor;
824}
825
826void
828{
829 CopyData();
830 mxData->maDarkShadowColor = rColor;
831}
832
833const Color&
835{
836 return mxData->maDarkShadowColor;
837}
838
839void
841{
842 CopyData();
843 mxData->maDefaultButtonTextColor = rColor;
844}
845
846const Color&
848{
849 return mxData->maDefaultButtonTextColor;
850}
851
852void
854{
855 CopyData();
856 mxData->maButtonTextColor = rColor;
857}
858
859const Color&
861{
862 return mxData->maButtonTextColor;
863}
864
865void
867{
868 CopyData();
869 mxData->maDefaultActionButtonTextColor = rColor;
870}
871
872const Color&
874{
875 return mxData->maDefaultActionButtonTextColor;
876}
877
878void
880{
881 CopyData();
882 mxData->maActionButtonTextColor = rColor;
883}
884
885const Color&
887{
888 return mxData->maActionButtonTextColor;
889}
890
891void
893{
894 CopyData();
895 mxData->maFlatButtonTextColor = rColor;
896}
897
898const Color&
900{
901 return mxData->maFlatButtonTextColor;
902}
903
904void
906{
907 CopyData();
908 mxData->maDefaultButtonRolloverTextColor = rColor;
909}
910
911const Color&
913{
914 return mxData->maDefaultButtonRolloverTextColor;
915}
916
917void
919{
920 CopyData();
921 mxData->maButtonRolloverTextColor = rColor;
922}
923
924const Color&
926{
927 return mxData->maButtonRolloverTextColor;
928}
929
930void
932{
933 CopyData();
934 mxData->maDefaultActionButtonRolloverTextColor = rColor;
935}
936
937const Color&
939{
940 return mxData->maDefaultActionButtonRolloverTextColor;
941}
942
943void
945{
946 CopyData();
947 mxData->maActionButtonRolloverTextColor = rColor;
948}
949
950const Color&
952{
953 return mxData->maActionButtonRolloverTextColor;
954}
955
956void
958{
959 CopyData();
960 mxData->maFlatButtonRolloverTextColor = rColor;
961}
962
963const Color&
965{
966 return mxData->maFlatButtonRolloverTextColor;
967}
968
969void
971{
972 CopyData();
973 mxData->maDefaultButtonPressedRolloverTextColor = rColor;
974}
975
976const Color&
978{
979 return mxData->maDefaultButtonPressedRolloverTextColor;
980}
981
982void
984{
985 CopyData();
986 mxData->maButtonPressedRolloverTextColor = rColor;
987}
988
989const Color&
991{
992 return mxData->maButtonPressedRolloverTextColor;
993}
994
995void
997{
998 CopyData();
999 mxData->maDefaultActionButtonPressedRolloverTextColor = rColor;
1000}
1001
1002const Color&
1004{
1005 return mxData->maDefaultActionButtonPressedRolloverTextColor;
1006}
1007
1008void
1010{
1011 CopyData();
1012 mxData->maActionButtonPressedRolloverTextColor = rColor;
1013}
1014
1015const Color&
1017{
1018 return mxData->maActionButtonPressedRolloverTextColor;
1019}
1020
1021void
1023{
1024 CopyData();
1025 mxData->maFlatButtonPressedRolloverTextColor = rColor;
1026}
1027
1028const Color&
1030{
1031 return mxData->maFlatButtonPressedRolloverTextColor;
1032}
1033
1034void
1036{
1037 CopyData();
1038 mxData->maRadioCheckTextColor = rColor;
1039}
1040
1041const Color&
1043{
1044 return mxData->maRadioCheckTextColor;
1045}
1046
1047void
1049{
1050 CopyData();
1051 mxData->maGroupTextColor = rColor;
1052}
1053
1054const Color&
1056{
1057 return mxData->maGroupTextColor;
1058}
1059
1060void
1062{
1063 CopyData();
1064 mxData->maLabelTextColor = rColor;
1065}
1066
1067const Color&
1069{
1070 return mxData->maLabelTextColor;
1071}
1072
1073void
1075{
1076 CopyData();
1077 mxData->maWindowColor = rColor;
1078}
1079
1080const Color&
1082{
1083 return mxData->maWindowColor;
1084}
1085
1086void
1088{
1089 CopyData();
1090 mxData->maWindowTextColor = rColor;
1091}
1092
1093const Color&
1095{
1096 return mxData->maWindowTextColor;
1097}
1098
1099void
1101{
1102 CopyData();
1103 mxData->maDialogColor = rColor;
1104}
1105
1106const Color&
1108{
1109 return mxData->maDialogColor;
1110}
1111
1112void
1114{
1115 CopyData();
1116 mxData->maDialogTextColor = rColor;
1117}
1118
1119const Color&
1121{
1122 return mxData->maDialogTextColor;
1123}
1124
1125void
1127{
1128 CopyData();
1129 mxData->maWorkspaceColor = rColor;
1130}
1131
1132const Color&
1134{
1135 return mxData->maWorkspaceColor;
1136}
1137
1138void
1140{
1141 CopyData();
1142 mxData->maFieldColor = rColor;
1143}
1144
1145const Color&
1147{
1148 return mxData->maFieldColor;
1149}
1150
1151void
1153{
1154 CopyData();
1155 mxData->maFieldTextColor = rColor;
1156}
1157
1158const Color&
1160{
1161 return mxData->maFieldTextColor;
1162}
1163
1164void
1166{
1167 CopyData();
1168 mxData->maFieldRolloverTextColor = rColor;
1169}
1170
1171const Color&
1173{
1174 return mxData->maFieldRolloverTextColor;
1175}
1176
1177void
1179{
1180 CopyData();
1181 mxData->maActiveColor = rColor;
1182}
1183
1184const Color&
1186{
1187 return mxData->maActiveColor;
1188}
1189
1190void
1192{
1193 CopyData();
1194 mxData->maActiveTextColor = rColor;
1195}
1196
1197const Color&
1199{
1200 return mxData->maActiveTextColor;
1201}
1202
1203void
1205{
1206 CopyData();
1207 mxData->maActiveBorderColor = rColor;
1208}
1209
1210const Color&
1212{
1213 return mxData->maActiveBorderColor;
1214}
1215
1216void
1218{
1219 CopyData();
1220 mxData->maDeactiveColor = rColor;
1221}
1222
1223const Color&
1225{
1226 return mxData->maDeactiveColor;
1227}
1228
1229void
1231{
1232 CopyData();
1233 mxData->maDeactiveTextColor = rColor;
1234}
1235
1236const Color&
1238{
1239 return mxData->maDeactiveTextColor;
1240}
1241
1242void
1244{
1245 CopyData();
1246 mxData->maDeactiveBorderColor = rColor;
1247}
1248
1249const Color&
1251{
1252 return mxData->maDeactiveBorderColor;
1253}
1254
1255void
1257{
1258 CopyData();
1259 mxData->maHighlightColor = rColor;
1260}
1261
1262const Color&
1264{
1265 return mxData->maHighlightColor;
1266}
1267
1268void
1270{
1271 CopyData();
1272 mxData->maHighlightTextColor = rColor;
1273}
1274
1275const Color&
1277{
1278 return mxData->maHighlightTextColor;
1279}
1280
1281void
1283{
1284 CopyData();
1285 mxData->maDisableColor = rColor;
1286}
1287
1288const Color&
1290{
1291 return mxData->maDisableColor;
1292}
1293
1294void
1296{
1297 CopyData();
1298 mxData->maHelpColor = rColor;
1299}
1300
1301const Color&
1303{
1304 return mxData->maHelpColor;
1305}
1306
1307void
1309{
1310 CopyData();
1311 mxData->maHelpTextColor = rColor;
1312}
1313
1314const Color&
1316{
1317 return mxData->maHelpTextColor;
1318}
1319
1320void
1322{
1323 CopyData();
1324 mxData->maMenuColor = rColor;
1325}
1326
1327const Color&
1329{
1330 return mxData->maMenuColor;
1331}
1332
1333void
1335{
1336 CopyData();
1337 mxData->maMenuBarColor = rColor;
1338}
1339
1340const Color&
1342{
1343 return mxData->maMenuBarColor;
1344}
1345
1346void
1348{
1349 CopyData();
1350 mxData->maMenuBarRolloverColor = rColor;
1351}
1352
1353const Color&
1355{
1356 return mxData->maMenuBarRolloverColor;
1357}
1358
1359void
1361{
1362 CopyData();
1363 mxData->maMenuBorderColor = rColor;
1364}
1365
1366const Color&
1368{
1369 return mxData->maMenuBorderColor;
1370}
1371
1372void
1374{
1375 CopyData();
1376 mxData->maMenuTextColor = rColor;
1377}
1378
1379const Color&
1381{
1382 return mxData->maMenuTextColor;
1383}
1384
1385void
1387{
1388 CopyData();
1389 mxData->maMenuBarTextColor = rColor;
1390}
1391
1392const Color&
1394{
1395 return mxData->maMenuBarTextColor;
1396}
1397
1398void
1400{
1401 CopyData();
1402 mxData->maMenuBarRolloverTextColor = rColor;
1403}
1404
1405const Color&
1407{
1408 return mxData->maMenuBarRolloverTextColor;
1409}
1410
1411void
1413{
1414 CopyData();
1415 mxData->maMenuBarHighlightTextColor = rColor;
1416}
1417
1418const Color&
1420{
1421 return mxData->maMenuBarHighlightTextColor;
1422}
1423
1424void
1426{
1427 CopyData();
1428 mxData->maMenuHighlightColor = rColor;
1429}
1430
1431const Color&
1433{
1434 return mxData->maMenuHighlightColor;
1435}
1436
1437void
1439{
1440 CopyData();
1441 mxData->maMenuHighlightTextColor = rColor;
1442}
1443
1444const Color&
1446{
1447 return mxData->maMenuHighlightTextColor;
1448}
1449
1450void
1452{
1453 CopyData();
1454 mxData->maListBoxWindowBackgroundColor = rColor;
1455}
1456
1457const Color&
1459{
1460 return mxData->maListBoxWindowBackgroundColor;
1461}
1462
1463void
1465{
1466 CopyData();
1467 mxData->maListBoxWindowTextColor = rColor;
1468}
1469
1470const Color&
1472{
1473 return mxData->maListBoxWindowTextColor;
1474}
1475
1476void
1478{
1479 CopyData();
1480 mxData->maListBoxWindowHighlightColor = rColor;
1481}
1482
1483const Color&
1485{
1486 return mxData->maListBoxWindowHighlightColor;
1487}
1488
1489void
1491{
1492 CopyData();
1493 mxData->maListBoxWindowHighlightTextColor = rColor;
1494}
1495
1496const Color&
1498{
1499 return mxData->maListBoxWindowHighlightTextColor;
1500}
1501
1502void
1504{
1505 CopyData();
1506 mxData->maTabTextColor = rColor;
1507}
1508
1509const Color&
1511{
1512 return mxData->maTabTextColor;
1513}
1514
1515void
1517{
1518 CopyData();
1519 mxData->maTabRolloverTextColor = rColor;
1520}
1521
1522const Color&
1524{
1525 return mxData->maTabRolloverTextColor;
1526}
1527
1528void
1530{
1531 CopyData();
1532 mxData->maTabHighlightTextColor = rColor;
1533}
1534
1535const Color&
1537{
1538 return mxData->maTabHighlightTextColor;
1539}
1540
1541void
1543{
1544 CopyData();
1545 mxData->maLinkColor = rColor;
1546}
1547
1548const Color&
1550{
1551 return mxData->maLinkColor;
1552}
1553
1554void
1556{
1557 CopyData();
1558 mxData->maVisitedLinkColor = rColor;
1559}
1560
1561const Color&
1563{
1564 return mxData->maVisitedLinkColor;
1565}
1566
1567void
1569{
1570 CopyData();
1571 mxData->maToolTextColor = rColor;
1572}
1573
1574const Color&
1576{
1577 return mxData->maToolTextColor;
1578}
1579
1580void
1582{
1583 CopyData();
1584 mxData->maMonoColor = rColor;
1585}
1586
1587const Color&
1589{
1590 return mxData->maMonoColor;
1591}
1592
1593void
1595{
1596 CopyData();
1597 mxData->maActiveTabColor = rColor;
1598}
1599
1600const Color&
1602{
1603 return mxData->maActiveTabColor;
1604}
1605
1606void
1608{
1609 CopyData();
1610 mxData->maInactiveTabColor = rColor;
1611}
1612
1613const Color&
1615{
1616 return mxData->maInactiveTabColor;
1617}
1618
1620{
1621 CopyData();
1622 mxData->maAlternatingRowColor = rColor;
1623}
1624
1625const Color&
1627{
1628 return mxData->maAlternatingRowColor;
1629}
1630
1631void
1632StyleSettings::SetUseSystemUIFonts( bool bUseSystemUIFonts )
1633{
1634 CopyData();
1635 mxData->mbUseSystemUIFonts = bUseSystemUIFonts;
1636}
1637
1638bool
1640{
1641 return mxData->mbUseSystemUIFonts;
1642}
1643
1644void StyleSettings::SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
1645{
1646 CopyData();
1647 mxData->mbUseFontAAFromSystem = bUseFontAAFromSystem;
1648}
1649
1651{
1652 return mxData->mbUseFontAAFromSystem;
1653}
1654
1655void
1657{
1658 CopyData();
1659 mxData->mnUseFlatBorders = bUseFlatBorders;
1660}
1661
1662bool
1664{
1665 return mxData->mnUseFlatBorders;
1666}
1667
1668void
1670{
1671 CopyData();
1672 mxData->mnUseFlatMenus = bUseFlatMenus;
1673}
1674
1675bool
1677{
1678 return mxData->mnUseFlatMenus;
1679}
1680
1681void
1683{
1684 CopyData();
1685 mxData->meUseImagesInMenus = eUseImagesInMenus;
1686}
1687
1688void
1689StyleSettings::SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus )
1690{
1691 CopyData();
1692 mxData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus;
1693}
1694
1695bool
1697{
1698 return mxData->mbPreferredUseImagesInMenus;
1699}
1700
1701void
1702StyleSettings::SetSkipDisabledInMenus( bool bSkipDisabledInMenus )
1703{
1704 CopyData();
1705 mxData->mbSkipDisabledInMenus = bSkipDisabledInMenus;
1706}
1707
1708bool
1710{
1711 return mxData->mbSkipDisabledInMenus;
1712}
1713
1714void
1715StyleSettings::SetHideDisabledMenuItems( bool bHideDisabledMenuItems )
1716{
1717 CopyData();
1718 mxData->mbHideDisabledMenuItems = bHideDisabledMenuItems;
1719}
1720
1721bool
1723{
1724 return mxData->mbHideDisabledMenuItems;
1725}
1726
1727void
1729{
1730 CopyData();
1731 mxData->meContextMenuShortcuts = eContextMenuShortcuts;
1732}
1733
1734bool
1736{
1737 switch (mxData->meContextMenuShortcuts)
1738 {
1739 case TRISTATE_FALSE:
1740 return false;
1741 case TRISTATE_TRUE:
1742 return true;
1743 default: // TRISTATE_INDET:
1745 }
1746}
1747
1748void
1750{
1751 CopyData();
1752 mxData->mbPreferredContextMenuShortcuts = bContextMenuShortcuts;
1753}
1754
1755bool
1757{
1758 return mxData->mbPreferredContextMenuShortcuts;
1759}
1760
1761void
1762StyleSettings::SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider )
1763{
1764 CopyData();
1765 mxData->mbPrimaryButtonWarpsSlider = bPrimaryButtonWarpsSlider;
1766}
1767
1768bool
1770{
1771 return mxData->mbPrimaryButtonWarpsSlider;
1772}
1773
1774void
1776{
1777 CopyData();
1778 mxData->maAppFont = rFont;
1779}
1780
1781const vcl::Font&
1783{
1784 return mxData->maAppFont;
1785}
1786
1787void
1789{
1790 CopyData();
1791 mxData->maHelpFont = rFont;
1792}
1793
1794const vcl::Font&
1796{
1797 return mxData->maHelpFont;
1798}
1799
1800void
1802{
1803 CopyData();
1804 mxData->maTitleFont = rFont;
1805}
1806
1807const vcl::Font&
1809{
1810 return mxData->maTitleFont;
1811}
1812
1813void
1815{
1816 CopyData();
1817 mxData->maFloatTitleFont = rFont;
1818}
1819
1820const vcl::Font&
1822{
1823 return mxData->maFloatTitleFont;
1824}
1825
1826void
1828{
1829 CopyData();
1830 mxData->maMenuFont = rFont;
1831}
1832
1833const vcl::Font&
1835{
1836 return mxData->maMenuFont;
1837}
1838
1839void
1841{
1842 CopyData();
1843 mxData->maToolFont = rFont;
1844}
1845
1846const vcl::Font&
1848{
1849 return mxData->maToolFont;
1850}
1851
1852void
1854{
1855 CopyData();
1856 mxData->maGroupFont = rFont;
1857}
1858
1859const vcl::Font&
1861{
1862 return mxData->maGroupFont;
1863}
1864
1865void
1867{
1868 CopyData();
1869 mxData->maLabelFont = rFont;
1870}
1871
1872const vcl::Font&
1874{
1875 return mxData->maLabelFont;
1876}
1877
1878void
1880{
1881 CopyData();
1882 mxData->maRadioCheckFont = rFont;
1883}
1884
1885const vcl::Font&
1887{
1888 return mxData->maRadioCheckFont;
1889}
1890
1891void
1893{
1894 CopyData();
1895 mxData->maPushButtonFont = rFont;
1896}
1897
1898const vcl::Font&
1900{
1901 return mxData->maPushButtonFont;
1902}
1903
1904void
1906{
1907 CopyData();
1908 mxData->maFieldFont = rFont;
1909}
1910
1911const vcl::Font&
1913{
1914 return mxData->maFieldFont;
1915}
1916
1917void
1919{
1920 CopyData();
1921 mxData->maIconFont = rFont;
1922}
1923
1924const vcl::Font&
1926{
1927 return mxData->maIconFont;
1928}
1929
1930void
1932{
1933 CopyData();
1934 mxData->maTabFont = rFont;
1935}
1936
1937const vcl::Font&
1939{
1940 return mxData->maTabFont;
1941}
1942
1943sal_Int32
1945{
1946 return 1;
1947}
1948
1949void
1951{
1952 CopyData();
1953 mxData->mnTitleHeight = nSize;
1954}
1955
1956sal_Int32
1958{
1959 return mxData->mnTitleHeight;
1960}
1961
1962void
1964{
1965 CopyData();
1966 mxData->mnFloatTitleHeight = nSize;
1967}
1968
1969sal_Int32
1971{
1972 return mxData->mnFloatTitleHeight;
1973}
1974
1975void
1977{
1978 CopyData();
1979 mxData->mnScrollBarSize = nSize;
1980}
1981
1982sal_Int32
1984{
1985 return mxData->mnScrollBarSize;
1986}
1987
1988void
1990{
1991 CopyData();
1992 mxData->mnMinThumbSize = nSize;
1993}
1994
1995sal_Int32
1997{
1998 return mxData->mnMinThumbSize;
1999}
2000
2001void
2003{
2004 CopyData();
2005 mxData->mnSpinSize = nSize;
2006}
2007
2008sal_Int32
2010{
2011 return mxData->mnSpinSize;
2012}
2013
2014sal_Int32
2016{
2017 return 3;
2018}
2019
2020void
2022{
2023 CopyData();
2024 mxData->mnCursorSize = nSize;
2025}
2026
2027sal_Int32
2029{
2030 return mxData->mnCursorSize;
2031}
2032
2033void
2035{
2036 CopyData();
2037 mxData->mnCursorBlinkTime = nBlinkTime;
2038}
2039
2040sal_uInt64
2042{
2043 return mxData->mnCursorBlinkTime;
2044}
2045
2046void
2048{
2049 CopyData();
2050 mxData->mnDragFullOptions = nOptions;
2051}
2052
2055{
2056 return mxData->mnDragFullOptions;
2057}
2058
2059void
2061{
2062 CopyData();
2063 mxData->mnSelectionOptions = nOptions;
2064}
2065
2068{
2069 return mxData->mnSelectionOptions;
2070}
2071
2072void
2074{
2075 CopyData();
2076 mxData->mnDisplayOptions = nOptions;
2077}
2078
2081{
2082 return mxData->mnDisplayOptions;
2083}
2084
2085void
2087{
2088 CopyData();
2089 mxData->mnAntialiasedMin = nMinPixel;
2090}
2091
2092sal_Int32
2094{
2095 return mxData->mnAntialiasedMin;
2096}
2097
2098void
2100{
2101 CopyData();
2102 mxData->mnOptions = nOptions;
2103}
2104
2105void
2107{
2108 CopyData();
2109 mxData->mbAutoMnemonic = bAutoMnemonic;
2110}
2111
2112bool
2114{
2115 return mxData->mbAutoMnemonic;
2116}
2117
2118bool
2120{
2121 ImplSVData* pSVData = ImplGetSVData();
2123}
2124
2125void
2127{
2128 CopyData();
2129 mxData->mnToolbarIconSize = nSize;
2130}
2131
2134{
2135 return mxData->mnToolbarIconSize;
2136}
2137
2139{
2140 switch (GetToolbarIconSize())
2141 {
2143 return Size(24, 24);
2145 return Size(32, 32);
2147 default:
2148 return Size(16, 16);
2149 }
2150}
2151
2152const DialogStyle&
2154{
2155 return mxData->maDialogStyle;
2156}
2157
2158void
2160{
2161 CopyData();
2162 mxData->mnEdgeBlending = nCount;
2163}
2164
2165sal_uInt16
2167{
2168 return mxData->mnEdgeBlending;
2169}
2170
2171const Color&
2173{
2174 return mxData->maEdgeBlendingTopLeftColor;
2175}
2176
2177const Color&
2179{
2180 return mxData->maEdgeBlendingBottomRightColor;
2181}
2182
2183void
2185{
2186 CopyData();
2187 mxData->mnListBoxMaximumLineCount = nCount;
2188}
2189
2190sal_uInt16
2192{
2193 return mxData->mnListBoxMaximumLineCount;
2194}
2195
2196void
2198{
2199 CopyData();
2200 mxData->mnColorValueSetColumnCount = nCount;
2201}
2202
2203sal_uInt16
2205{
2206 return mxData->mnColorValueSetColumnCount;
2207}
2208
2209sal_uInt16
2211{
2212 return 1;
2213}
2214
2215void
2217{
2218 CopyData();
2219 mxData->mbPreviewUsesCheckeredBackground = bNew;
2220}
2221
2222bool
2224{
2225 return mxData->mbPreviewUsesCheckeredBackground;
2226}
2227
2228bool
2230{
2231 return !(*this == rSet);
2232}
2233
2235{
2236 mxData->maListBoxPreviewDefaultLogicSize = rSize;
2237}
2238
2240{
2241 if(0 == mxData->maListBoxPreviewDefaultPixelSize.Width() || 0 == mxData->maListBoxPreviewDefaultPixelSize.Height())
2242 {
2243 const_cast< StyleSettings* >(this)->mxData->maListBoxPreviewDefaultPixelSize =
2244 Application::GetDefaultDevice()->LogicToPixel(mxData->maListBoxPreviewDefaultLogicSize, MapMode(MapUnit::MapAppFont));
2245 }
2246
2247 return mxData->maListBoxPreviewDefaultPixelSize;
2248}
2249
2251{
2252 CopyData();
2253 mxData->maFaceColor = rColor;
2254 mxData->maLightBorderColor = rColor;
2255 mxData->maMenuBorderColor = rColor;
2256 mxData->maDarkShadowColor = COL_BLACK;
2257 if ( rColor != COL_LIGHTGRAY )
2258 {
2259 mxData->maLightColor = rColor;
2260 mxData->maShadowColor = rColor;
2261 mxData->maDarkShadowColor=rColor;
2262 mxData->maLightColor.IncreaseLuminance( 64 );
2263 mxData->maShadowColor.DecreaseLuminance( 64 );
2264 mxData->maDarkShadowColor.DecreaseLuminance( 100 );
2265 sal_uLong nRed = mxData->maLightColor.GetRed();
2266 sal_uLong nGreen = mxData->maLightColor.GetGreen();
2267 sal_uLong nBlue = mxData->maLightColor.GetBlue();
2268 nRed += static_cast<sal_uLong>(mxData->maShadowColor.GetRed());
2269 nGreen += static_cast<sal_uLong>(mxData->maShadowColor.GetGreen());
2270 nBlue += static_cast<sal_uLong>(mxData->maShadowColor.GetBlue());
2271 mxData->maCheckedColor = Color( static_cast<sal_uInt8>(nRed/2), static_cast<sal_uInt8>(nGreen/2), static_cast<sal_uInt8>(nBlue/2) );
2272 }
2273 else
2274 {
2275 mxData->maCheckedColor = Color( 0x99, 0x99, 0x99 );
2276 mxData->maLightColor = COL_WHITE;
2277 mxData->maShadowColor = COL_GRAY;
2278 }
2279}
2280
2282{
2283 CopyData();
2284 // Light gray checked color special case
2285 if ( GetFaceColor() == COL_LIGHTGRAY )
2286 mxData->maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
2287 else
2288 {
2289 sal_uInt8 nRed = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetRed()) + static_cast<sal_uInt16>(mxData->maLightColor.GetRed()))/2);
2290 sal_uInt8 nGreen = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetGreen()) + static_cast<sal_uInt16>(mxData->maLightColor.GetGreen()))/2);
2291 sal_uInt8 nBlue = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetBlue()) + static_cast<sal_uInt16>(mxData->maLightColor.GetBlue()))/2);
2292 mxData->maCheckedColor = Color( nRed, nGreen, nBlue );
2293 }
2294}
2295
2297{
2298 // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
2299 switch (mxData->meUseImagesInMenus) {
2300 case TRISTATE_FALSE:
2301 return false;
2302 case TRISTATE_TRUE:
2303 return true;
2304 default: // TRISTATE_INDET:
2306 }
2307}
2308
2309static BitmapEx readBitmapEx( const OUString& rPath )
2310{
2311 OUString aPath( rPath );
2312 rtl::Bootstrap::expandMacros( aPath );
2313
2314 // import the image
2315 Graphic aGraphic;
2316 if ( GraphicFilter::LoadGraphic( aPath, OUString(), aGraphic ) != ERRCODE_NONE )
2317 return BitmapEx();
2318 return aGraphic.GetBitmapEx();
2319}
2320
2321namespace {
2322
2323enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
2324
2325}
2326
2328static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, std::optional<Color>& rMenuBarTextColor )
2329{
2330 // don't burn time loading images we don't need.
2332 return;
2333
2334 // read from the configuration
2335 OUString aPersona( officecfg::Office::Common::Misc::Persona::get() );
2336 OUString aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get() );
2337
2338 // have the settings changed? marks if header /footer prepared before
2339 //should maybe extended to a flag that marks if header /footer /both are loaded
2340 OUString aOldValue= eWhich==PERSONA_HEADER?OUString(aPersona + ";" + aPersonaSettings+";h" ):OUString(aPersona + ";" + aPersonaSettings+";f" );
2341 if ( rHeaderFooter == aOldValue )
2342 return;
2343
2344 rHeaderFooter = aOldValue;
2345 rHeaderFooterBitmap = BitmapEx();
2346 rMenuBarTextColor.reset();
2347
2348 // now read the new values and setup bitmaps
2349 OUString aHeader, aFooter;
2350 if ( aPersona == "own" || aPersona == "default" )
2351 {
2352 sal_Int32 nIndex = 0;
2353
2354 // Skip the persona slug, name, and preview
2355 aHeader = aPersonaSettings.getToken( 3, ';', nIndex );
2356
2357 if ( nIndex > 0 )
2358 aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
2359
2360 // change menu text color, advance nIndex to skip the '#'
2361 if ( nIndex > 0 )
2362 {
2363 OUString aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
2364 rMenuBarTextColor = Color( ColorTransparency, aColor.toUInt32( 16 ) );
2365 }
2366 }
2367
2368 OUString aName;
2369 switch ( eWhich ) {
2370 case PERSONA_HEADER: aName = aHeader; break;
2371 case PERSONA_FOOTER: aName = aFooter; break;
2372 }
2373
2374 if ( !aName.isEmpty() )
2375 {
2376 OUString gallery("");
2377 // try the gallery first, then the program path:
2378 if ( aPersona == "own" && !aPersonaSettings.startsWith( "vnd.sun.star.expand" ) )
2379 {
2380 gallery = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
2381 rtl::Bootstrap::expandMacros( gallery );
2382 gallery += "/user/gallery/personas/";
2383 }
2384 else if ( aPersona == "default" )
2385 {
2386 gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/";
2387 }
2388 rHeaderFooterBitmap = readBitmapEx( gallery + aName );
2389
2390 if ( rHeaderFooterBitmap.IsEmpty() )
2391 rHeaderFooterBitmap = readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" + aName );
2392 }
2393
2394 // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
2395
2396 if( rHeaderFooterBitmap.IsEmpty() )
2397 {
2398 std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
2399 officecfg::Office::Common::Misc::Persona::set( "no", batch );
2400 officecfg::Office::Common::Misc::PersonaSettings::set( "", batch );
2401 batch->commit();
2402 }
2403}
2404
2406{
2407 setupPersonaHeaderFooter( PERSONA_HEADER, mxData->maPersonaHeaderFooter, mxData->maPersonaHeaderBitmap, mxData->maPersonaMenuBarTextColor );
2408 return mxData->maPersonaHeaderBitmap;
2409}
2410
2412{
2413 setupPersonaHeaderFooter( PERSONA_FOOTER, mxData->maPersonaHeaderFooter, mxData->maPersonaFooterBitmap, mxData->maPersonaMenuBarTextColor );
2414 return mxData->maPersonaFooterBitmap;
2415}
2416
2417const std::optional<Color>& StyleSettings::GetPersonaMenuBarTextColor() const
2418{
2420 return mxData->maPersonaMenuBarTextColor;
2421}
2422
2424{
2425 CopyData();
2426 mxData->SetStandardStyles();
2427}
2428
2430{
2431 // compute a brighter face color that can be used in gradients
2432 // for a convex look (eg toolbars)
2433
2434 sal_uInt16 h, s, b;
2435 GetFaceColor().RGBtoHSB( h, s, b );
2436 if( s > 1) s=1;
2437 if( b < 98) b=98;
2438 return Color::HSBtoRGB( h, s, b );
2439}
2440
2442{
2443 // compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
2444 sal_uInt16 h, s, b;
2445 GetShadowColor().RGBtoHSB( h, s, b );
2446 b += b/4;
2447 s -= s/4;
2448 return Color::HSBtoRGB( h, s, b );
2449}
2450
2452{
2453 // copy if other references exist
2454 if (mxData.use_count() > 1)
2455 {
2456 mxData = std::make_shared<ImplStyleData>(*mxData);
2457 }
2458}
2459
2461{
2462 if ( mxData == rSet.mxData )
2463 return true;
2464
2465 if (mxData->mIconTheme != rSet.mxData->mIconTheme) {
2466 return false;
2467 }
2468
2469 if (*mxData->mIconThemeSelector != *rSet.mxData->mIconThemeSelector) {
2470 return false;
2471 }
2472
2473 return (mxData->mnOptions == rSet.mxData->mnOptions) &&
2474 (mxData->mbAutoMnemonic == rSet.mxData->mbAutoMnemonic) &&
2475 (mxData->mnDragFullOptions == rSet.mxData->mnDragFullOptions) &&
2476 (mxData->mnSelectionOptions == rSet.mxData->mnSelectionOptions) &&
2477 (mxData->mnDisplayOptions == rSet.mxData->mnDisplayOptions) &&
2478 (mxData->mnCursorSize == rSet.mxData->mnCursorSize) &&
2479 (mxData->mnCursorBlinkTime == rSet.mxData->mnCursorBlinkTime) &&
2480 (mxData->mnTitleHeight == rSet.mxData->mnTitleHeight) &&
2481 (mxData->mnFloatTitleHeight == rSet.mxData->mnFloatTitleHeight) &&
2482 (mxData->mnScrollBarSize == rSet.mxData->mnScrollBarSize) &&
2483 (mxData->mnMinThumbSize == rSet.mxData->mnMinThumbSize) &&
2484 (mxData->mnSpinSize == rSet.mxData->mnSpinSize) &&
2485 (mxData->mnAntialiasedMin == rSet.mxData->mnAntialiasedMin) &&
2486 (mxData->mbHighContrast == rSet.mxData->mbHighContrast) &&
2487 (mxData->mbUseSystemUIFonts == rSet.mxData->mbUseSystemUIFonts) &&
2488 (mxData->mbUseFontAAFromSystem == rSet.mxData->mbUseFontAAFromSystem) &&
2489 (mxData->mnUseFlatBorders == rSet.mxData->mnUseFlatBorders) &&
2490 (mxData->mnUseFlatMenus == rSet.mxData->mnUseFlatMenus) &&
2491 (mxData->maFaceColor == rSet.mxData->maFaceColor) &&
2492 (mxData->maCheckedColor == rSet.mxData->maCheckedColor) &&
2493 (mxData->maLightColor == rSet.mxData->maLightColor) &&
2494 (mxData->maLightBorderColor == rSet.mxData->maLightBorderColor) &&
2495 (mxData->maShadowColor == rSet.mxData->maShadowColor) &&
2496 (mxData->maDarkShadowColor == rSet.mxData->maDarkShadowColor) &&
2497 (mxData->maWarningColor == rSet.mxData->maWarningColor) &&
2498 (mxData->maButtonTextColor == rSet.mxData->maButtonTextColor) &&
2499 (mxData->maDefaultActionButtonTextColor == rSet.mxData->maDefaultActionButtonTextColor) &&
2500 (mxData->maActionButtonTextColor == rSet.mxData->maActionButtonTextColor) &&
2501 (mxData->maButtonRolloverTextColor == rSet.mxData->maButtonRolloverTextColor) &&
2502 (mxData->maActionButtonRolloverTextColor == rSet.mxData->maActionButtonRolloverTextColor) &&
2503 (mxData->maRadioCheckTextColor == rSet.mxData->maRadioCheckTextColor) &&
2504 (mxData->maGroupTextColor == rSet.mxData->maGroupTextColor) &&
2505 (mxData->maLabelTextColor == rSet.mxData->maLabelTextColor) &&
2506 (mxData->maWindowColor == rSet.mxData->maWindowColor) &&
2507 (mxData->maWindowTextColor == rSet.mxData->maWindowTextColor) &&
2508 (mxData->maDialogColor == rSet.mxData->maDialogColor) &&
2509 (mxData->maDialogTextColor == rSet.mxData->maDialogTextColor) &&
2510 (mxData->maWorkspaceColor == rSet.mxData->maWorkspaceColor) &&
2511 (mxData->maMonoColor == rSet.mxData->maMonoColor) &&
2512 (mxData->maFieldColor == rSet.mxData->maFieldColor) &&
2513 (mxData->maFieldTextColor == rSet.mxData->maFieldTextColor) &&
2514 (mxData->maActiveColor == rSet.mxData->maActiveColor) &&
2515 (mxData->maActiveTextColor == rSet.mxData->maActiveTextColor) &&
2516 (mxData->maActiveBorderColor == rSet.mxData->maActiveBorderColor) &&
2517 (mxData->maDeactiveColor == rSet.mxData->maDeactiveColor) &&
2518 (mxData->maDeactiveTextColor == rSet.mxData->maDeactiveTextColor) &&
2519 (mxData->maDeactiveBorderColor == rSet.mxData->maDeactiveBorderColor) &&
2520 (mxData->maMenuColor == rSet.mxData->maMenuColor) &&
2521 (mxData->maMenuBarColor == rSet.mxData->maMenuBarColor) &&
2522 (mxData->maMenuBarRolloverColor == rSet.mxData->maMenuBarRolloverColor) &&
2523 (mxData->maMenuBorderColor == rSet.mxData->maMenuBorderColor) &&
2524 (mxData->maMenuTextColor == rSet.mxData->maMenuTextColor) &&
2525 (mxData->maListBoxWindowBackgroundColor == rSet.mxData->maListBoxWindowBackgroundColor) &&
2526 (mxData->maListBoxWindowTextColor == rSet.mxData->maListBoxWindowTextColor) &&
2527 (mxData->maListBoxWindowHighlightColor == rSet.mxData->maListBoxWindowHighlightColor) &&
2528 (mxData->maListBoxWindowHighlightTextColor == rSet.mxData->maListBoxWindowHighlightTextColor) &&
2529 (mxData->maMenuBarTextColor == rSet.mxData->maMenuBarTextColor) &&
2530 (mxData->maMenuBarRolloverTextColor == rSet.mxData->maMenuBarRolloverTextColor) &&
2531 (mxData->maMenuHighlightColor == rSet.mxData->maMenuHighlightColor) &&
2532 (mxData->maMenuHighlightTextColor == rSet.mxData->maMenuHighlightTextColor) &&
2533 (mxData->maHighlightColor == rSet.mxData->maHighlightColor) &&
2534 (mxData->maHighlightTextColor == rSet.mxData->maHighlightTextColor) &&
2535 (mxData->maTabTextColor == rSet.mxData->maTabTextColor) &&
2536 (mxData->maTabRolloverTextColor == rSet.mxData->maTabRolloverTextColor) &&
2537 (mxData->maTabHighlightTextColor == rSet.mxData->maTabHighlightTextColor) &&
2538 (mxData->maActiveTabColor == rSet.mxData->maActiveTabColor) &&
2539 (mxData->maInactiveTabColor == rSet.mxData->maInactiveTabColor) &&
2540 (mxData->maDisableColor == rSet.mxData->maDisableColor) &&
2541 (mxData->maHelpColor == rSet.mxData->maHelpColor) &&
2542 (mxData->maHelpTextColor == rSet.mxData->maHelpTextColor) &&
2543 (mxData->maLinkColor == rSet.mxData->maLinkColor) &&
2544 (mxData->maVisitedLinkColor == rSet.mxData->maVisitedLinkColor) &&
2545 (mxData->maToolTextColor == rSet.mxData->maToolTextColor) &&
2546 (mxData->maAppFont == rSet.mxData->maAppFont) &&
2547 (mxData->maHelpFont == rSet.mxData->maHelpFont) &&
2548 (mxData->maTitleFont == rSet.mxData->maTitleFont) &&
2549 (mxData->maFloatTitleFont == rSet.mxData->maFloatTitleFont) &&
2550 (mxData->maMenuFont == rSet.mxData->maMenuFont) &&
2551 (mxData->maToolFont == rSet.mxData->maToolFont) &&
2552 (mxData->maGroupFont == rSet.mxData->maGroupFont) &&
2553 (mxData->maLabelFont == rSet.mxData->maLabelFont) &&
2554 (mxData->maRadioCheckFont == rSet.mxData->maRadioCheckFont) &&
2555 (mxData->maPushButtonFont == rSet.mxData->maPushButtonFont) &&
2556 (mxData->maFieldFont == rSet.mxData->maFieldFont) &&
2557 (mxData->maIconFont == rSet.mxData->maIconFont) &&
2558 (mxData->maTabFont == rSet.mxData->maTabFont) &&
2559 (mxData->meUseImagesInMenus == rSet.mxData->meUseImagesInMenus) &&
2560 (mxData->mbPreferredUseImagesInMenus == rSet.mxData->mbPreferredUseImagesInMenus) &&
2561 (mxData->mbSkipDisabledInMenus == rSet.mxData->mbSkipDisabledInMenus) &&
2562 (mxData->mbHideDisabledMenuItems == rSet.mxData->mbHideDisabledMenuItems) &&
2563 (mxData->mbPreferredContextMenuShortcuts == rSet.mxData->mbPreferredContextMenuShortcuts)&&
2564 (mxData->meContextMenuShortcuts == rSet.mxData->meContextMenuShortcuts) &&
2565 (mxData->mbPrimaryButtonWarpsSlider == rSet.mxData->mbPrimaryButtonWarpsSlider) &&
2566 (mxData->mnEdgeBlending == rSet.mxData->mnEdgeBlending) &&
2567 (mxData->maEdgeBlendingTopLeftColor == rSet.mxData->maEdgeBlendingTopLeftColor) &&
2568 (mxData->maEdgeBlendingBottomRightColor == rSet.mxData->maEdgeBlendingBottomRightColor) &&
2569 (mxData->mnListBoxMaximumLineCount == rSet.mxData->mnListBoxMaximumLineCount) &&
2570 (mxData->mnColorValueSetColumnCount == rSet.mxData->mnColorValueSetColumnCount) &&
2571 (mxData->maListBoxPreviewDefaultLogicSize == rSet.mxData->maListBoxPreviewDefaultLogicSize) &&
2572 (mxData->maListBoxPreviewDefaultPixelSize == rSet.mxData->maListBoxPreviewDefaultPixelSize) &&
2573 (mxData->mbPreviewUsesCheckeredBackground == rSet.mxData->mbPreviewUsesCheckeredBackground);
2574}
2575
2577 mnEnableATT(TRISTATE_INDET),
2578 mnDisablePrinting(TRISTATE_INDET)
2579{
2580 static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
2581 mbEnableLocalizedDecimalSep = (pEnv != nullptr);
2582}
2583
2585 : mxData(std::make_shared<ImplMiscData>())
2586{
2587}
2588
2590{
2591 if ( mxData == rSet.mxData )
2592 return true;
2593
2594 return (mxData->mnEnableATT == rSet.mxData->mnEnableATT ) &&
2595 (mxData->mnDisablePrinting == rSet.mxData->mnDisablePrinting ) &&
2596 (mxData->mbEnableLocalizedDecimalSep == rSet.mxData->mbEnableLocalizedDecimalSep );
2597}
2598
2599bool
2601{
2602 return !(*this == rSet);
2603}
2604
2606{
2607 if( mxData->mnDisablePrinting == TRISTATE_INDET )
2608 {
2609 OUString aEnable =
2611 getValue( "DesktopManagement",
2612 "DisablePrinting" );
2613 mxData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2614 }
2615
2616 return mxData->mnDisablePrinting != TRISTATE_FALSE;
2617}
2618
2620{
2621
2622#ifdef _WIN32
2623 if( mxData->mnEnableATT == TRISTATE_INDET )
2624 {
2625 // Check in the Windows registry if an AT tool wants Accessibility support to
2626 // be activated ..
2627 HKEY hkey;
2628
2629 if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2630 L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2631 &hkey) )
2632 {
2633 DWORD dwType;
2634 wchar_t Data[6]; // possible values: "true", "false", "1", "0", DWORD
2635 DWORD cbData = sizeof(Data);
2636
2637 if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2638 nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2639 {
2640 switch (dwType)
2641 {
2642 case REG_SZ:
2643 mxData->mnEnableATT = ((0 == wcsicmp(Data, L"1")) || (0 == wcsicmp(Data, L"true"))) ? TRISTATE_TRUE : TRISTATE_FALSE;
2644 break;
2645 case REG_DWORD:
2646 switch (reinterpret_cast<DWORD *>(Data)[0]) {
2647 case 0:
2648 mxData->mnEnableATT = TRISTATE_FALSE;
2649 break;
2650 case 1:
2651 mxData->mnEnableATT = TRISTATE_TRUE;
2652 break;
2653 default:
2654 mxData->mnEnableATT = TRISTATE_INDET;
2655 //TODO: or TRISTATE_TRUE?
2656 break;
2657 }
2658 break;
2659 default:
2660 // Unsupported registry type
2661 break;
2662 }
2663 }
2664
2665 RegCloseKey(hkey);
2666 }
2667 }
2668#endif
2669
2670 if( mxData->mnEnableATT == TRISTATE_INDET )
2671 {
2672 static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
2673 if( !pEnv || !*pEnv )
2674 {
2675 OUString aEnable =
2677 getValue( "Accessibility",
2678 "EnableATToolSupport" );
2679 mxData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2680 }
2681 else
2682 {
2683 mxData->mnEnableATT = TRISTATE_TRUE;
2684 }
2685 }
2686
2687 return mxData->mnEnableATT != TRISTATE_FALSE;
2688}
2689
2690#ifdef _WIN32
2691void MiscSettings::SetEnableATToolSupport( bool bEnable )
2692{
2693 if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mxData->mnEnableATT )
2694 {
2695 if( bEnable && !ImplInitAccessBridge() )
2696 return;
2697
2698 HKEY hkey;
2699
2700 // If the accessibility key in the Windows registry exists, change it synchronously
2701 if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2702 L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2703 &hkey) )
2704 {
2705 DWORD dwType;
2706 wchar_t Data[6]; // possible values: "true", "false", 1, 0
2707 DWORD cbData = sizeof(Data);
2708
2709 if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2710 nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2711 {
2712 switch (dwType)
2713 {
2714 case REG_SZ:
2715 RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2716 0, dwType,
2717 reinterpret_cast<const BYTE*>(bEnable ? L"true" : L"false"),
2718 bEnable ? sizeof(L"true") : sizeof(L"false"));
2719 break;
2720 case REG_DWORD:
2721 reinterpret_cast<DWORD *>(Data)[0] = bEnable ? 1 : 0;
2722 RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2723 0, dwType, reinterpret_cast<const BYTE*>(Data), sizeof(DWORD));
2724 break;
2725 default:
2726 // Unsupported registry type
2727 break;
2728 }
2729 }
2730
2731 RegCloseKey(hkey);
2732 }
2733
2735 setValue( "Accessibility",
2736 "EnableATToolSupport",
2737 bEnable ? OUString("true") : OUString("false" ) );
2738 mxData->mnEnableATT = bEnable ? TRISTATE_TRUE : TRISTATE_FALSE;
2739 }
2740}
2741#endif
2742
2744{
2745 // copy if other references exist
2746 if (mxData.use_count() > 1)
2747 {
2748 mxData = std::make_shared<ImplMiscData>(*mxData);
2749 }
2750 mxData->mbEnableLocalizedDecimalSep = bEnable;
2751}
2752
2754{
2755 return mxData->mbEnableLocalizedDecimalSep;
2756}
2757
2759 : mxData(std::make_shared<ImplHelpData>())
2760{
2761}
2762
2764{
2765 if ( mxData == rSet.mxData )
2766 return true;
2767
2768 return (mxData->mnTipTimeout == rSet.mxData->mnTipTimeout );
2769}
2770
2771sal_Int32
2773{
2774 return 500;
2775}
2776
2777void
2778HelpSettings::SetTipTimeout( sal_Int32 nTipTimeout )
2779{
2780 // copy if other references exist
2781 if (mxData.use_count() > 1)
2782 {
2783 mxData = std::make_shared<ImplHelpData>(*mxData);
2784 }
2785 mxData->mnTipTimeout = nTipTimeout;
2786}
2787
2788sal_Int32
2790{
2791 return mxData->mnTipTimeout;
2792}
2793
2794sal_Int32
2796{
2797 return 1500;
2798}
2799
2800bool
2802{
2803 return !(*this == rSet);
2804}
2805
2807 :
2808 maLocale( LANGUAGE_SYSTEM ),
2809 maUILocale( LANGUAGE_SYSTEM )
2810{
2813}
2814
2816 maMouseSettings( rData.maMouseSettings ),
2817 maStyleSettings( rData.maStyleSettings ),
2818 maMiscSettings( rData.maMiscSettings ),
2819 maHelpSettings( rData.maHelpSettings ),
2820 maLocale( rData.maLocale ),
2821 maUILocale( rData.maUILocale )
2822{
2823 // Create the cache objects new when their getter is called.
2824}
2825
2827{
2828 mpLocaleDataWrapper.reset();
2829 mpUILocaleDataWrapper.reset();
2831 mpI18nHelper.reset();
2832 mpUII18nHelper.reset();
2833}
2834
2836 : mxData(std::make_shared<ImplAllSettingsData>())
2837{
2838}
2839
2841{
2842 // copy if other references exist
2843 if (mxData.use_count() > 1)
2844 {
2845 mxData = std::make_shared<ImplAllSettingsData>(*mxData);
2846 }
2847
2848}
2849
2851{
2852
2854
2855 if ( nFlags & AllSettingsFlags::MOUSE )
2856 {
2857 if ( mxData->maMouseSettings != rSet.mxData->maMouseSettings )
2858 {
2859 CopyData();
2860 mxData->maMouseSettings = rSet.mxData->maMouseSettings;
2861 nChangeFlags |= AllSettingsFlags::MOUSE;
2862 }
2863 }
2864
2865 if ( nFlags & AllSettingsFlags::STYLE )
2866 {
2867 if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2868 {
2869 CopyData();
2870 mxData->maStyleSettings = rSet.mxData->maStyleSettings;
2871 nChangeFlags |= AllSettingsFlags::STYLE;
2872 }
2873 }
2874
2875 if ( nFlags & AllSettingsFlags::MISC )
2876 {
2877 if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2878 {
2879 CopyData();
2880 mxData->maMiscSettings = rSet.mxData->maMiscSettings;
2881 nChangeFlags |= AllSettingsFlags::MISC;
2882 }
2883 }
2884
2885 if ( nFlags & AllSettingsFlags::LOCALE )
2886 {
2887 if ( mxData->maLocale != rSet.mxData->maLocale )
2888 {
2889 SetLanguageTag( rSet.mxData->maLocale );
2890 nChangeFlags |= AllSettingsFlags::LOCALE;
2891 }
2892 }
2893
2894 return nChangeFlags;
2895}
2896
2898{
2899
2901
2902 if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2903 nChangeFlags |= AllSettingsFlags::STYLE;
2904
2905 if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2906 nChangeFlags |= AllSettingsFlags::MISC;
2907
2908 if ( mxData->maLocale != rSet.mxData->maLocale )
2909 nChangeFlags |= AllSettingsFlags::LOCALE;
2910
2911 return nChangeFlags;
2912}
2913
2914bool AllSettings::operator ==( const AllSettings& rSet ) const
2915{
2916 if ( mxData == rSet.mxData )
2917 return true;
2918
2919 if ( (mxData->maMouseSettings == rSet.mxData->maMouseSettings) &&
2920 (mxData->maStyleSettings == rSet.mxData->maStyleSettings) &&
2921 (mxData->maMiscSettings == rSet.mxData->maMiscSettings) &&
2922 (mxData->maHelpSettings == rSet.mxData->maHelpSettings) &&
2923 (mxData->maLocale == rSet.mxData->maLocale) )
2924 {
2925 return true;
2926 }
2927
2928 return false;
2929}
2930
2931void AllSettings::SetLanguageTag(const OUString& rLanguage, bool bCanonicalize)
2932{
2933 SetLanguageTag(LanguageTag(rLanguage, bCanonicalize));
2934}
2935
2936void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag )
2937{
2938 if (mxData->maLocale == rLanguageTag)
2939 return;
2940
2941 CopyData();
2942
2943 mxData->maLocale = rLanguageTag;
2944
2945 if ( mxData->mpLocaleDataWrapper )
2946 {
2947 mxData->mpLocaleDataWrapper.reset();
2948 }
2949 if ( mxData->mpI18nHelper )
2950 {
2951 mxData->mpI18nHelper.reset();
2952 }
2953}
2954
2955namespace
2956{
2957 bool GetConfigLayoutRTL(bool bMath)
2958 {
2959 static const char* pEnv = getenv("SAL_RTL_ENABLED" );
2960 static int nUIMirroring = -1; // -1: undef, 0: auto, 1: on 2: off
2961
2962 // environment always overrides
2963 if( pEnv )
2964 return true;
2965
2966 bool bRTL = false;
2967
2968 if( nUIMirroring == -1 )
2969 {
2970 nUIMirroring = 0; // ask configuration only once
2973 "org.openoffice.Office.Common/I18N/CTL" ); // note: case sensitive !
2974 if ( aNode.isValid() )
2975 {
2976 bool bTmp = bool();
2977 css::uno::Any aValue = aNode.getNodeValue( "UIMirroring" );
2978 if( aValue >>= bTmp )
2979 {
2980 // found true or false; if it was nil, nothing is changed
2981 nUIMirroring = bTmp ? 1 : 2;
2982 }
2983 }
2984 }
2985
2986 if( nUIMirroring == 0 ) // no config found (eg, setup) or default (nil) was set: check language
2987 {
2989 if (bMath)
2990 bRTL = MsLangId::isRightToLeftMath( aLang );
2991 else
2992 bRTL = MsLangId::isRightToLeft( aLang );
2993 }
2994 else
2995 bRTL = (nUIMirroring == 1);
2996
2997 return bRTL;
2998 }
2999}
3000
3002{
3004 return false;
3005 return GetConfigLayoutRTL(false);
3006}
3007
3009{
3011 return false;
3012 return GetConfigLayoutRTL(true);
3013}
3014
3016{
3018 {
3019 static LanguageTag aRet("en-US");
3020 return aRet;
3021 }
3022
3025
3026 // SYSTEM locale means: use settings from SvtSysLocale that is resolved
3027 if ( mxData->maLocale.isSystemLocale() )
3028 mxData->maLocale = mxData->maSysLocale.GetLanguageTag();
3029
3030 return mxData->maLocale;
3031}
3032
3034{
3036 {
3037 static LanguageTag aRet("en-US");
3038 return aRet;
3039 }
3040
3043
3044 // the UILocale is never changed
3045 if ( mxData->maUILocale.isSystemLocale() )
3046 mxData->maUILocale = mxData->maSysLocale.GetUILanguageTag();
3047
3048 return mxData->maUILocale;
3049}
3050
3052{
3053 if ( !mxData->mpLocaleDataWrapper )
3054 const_cast<AllSettings*>(this)->mxData->mpLocaleDataWrapper.reset( new LocaleDataWrapper(
3056 return *mxData->mpLocaleDataWrapper;
3057}
3058
3060{
3061 if ( !mxData->mpUILocaleDataWrapper )
3062 const_cast<AllSettings*>(this)->mxData->mpUILocaleDataWrapper.reset( new LocaleDataWrapper(
3064 return *mxData->mpUILocaleDataWrapper;
3065}
3066
3068{
3069 if ( !mxData->mpNeutralLocaleDataWrapper )
3070 const_cast<AllSettings*>(this)->mxData->mpNeutralLocaleDataWrapper.reset( new LocaleDataWrapper(
3072 return *mxData->mpNeutralLocaleDataWrapper;
3073}
3074
3076{
3077 if ( !mxData->mpI18nHelper ) {
3078 const_cast<AllSettings*>(this)->mxData->mpI18nHelper.reset( new vcl::I18nHelper(
3080 }
3081 return *mxData->mpI18nHelper;
3082}
3083
3085{
3086 if ( !mxData->mpUII18nHelper ) {
3087 const_cast<AllSettings*>(this)->mxData->mpUII18nHelper.reset( new vcl::I18nHelper(
3089 }
3090 return *mxData->mpUII18nHelper;
3091}
3092
3094{
3095 AllSettings aAllSettings( Application::GetSettings() );
3096 if ( nHint & ConfigurationHints::DecSep )
3097 {
3098 MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
3099 bool bIsDecSepAsLocale = aAllSettings.mxData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale();
3100 if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale )
3101 {
3102 aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale );
3103 aAllSettings.SetMiscSettings( aMiscSettings );
3104 }
3105 }
3106
3107 if ( nHint & ConfigurationHints::Locale )
3108 aAllSettings.SetLanguageTag( aAllSettings.mxData->maSysLocale.GetOptions().GetLanguageTag() );
3109
3110 Application::SetSettings( aAllSettings );
3111}
3112
3113const StyleSettings&
3115{
3116 return mxData->maStyleSettings;
3117}
3118
3121{
3122 return mxData->mnOptions;
3123}
3124
3125std::vector<vcl::IconThemeInfo> const &
3127{
3128 if (!mxData->mIconThemeScanner) {
3130 }
3131 return mxData->mIconThemeScanner->GetFoundIconThemes();
3132}
3133
3134/*static*/ OUString
3136{
3137 OUString desktopEnvironment = Application::GetDesktopEnvironment();
3138 if (!mxData->mIconThemeScanner) {
3140 }
3141 OUString themeName = mxData->mIconThemeSelector->SelectIconThemeForDesktopEnvironment(
3142 mxData->mIconThemeScanner->GetFoundIconThemes(),
3143 desktopEnvironment
3144 );
3145 return themeName;
3146}
3147
3148void
3149StyleSettings::SetIconTheme(const OUString& theme)
3150{
3151 CopyData();
3152 mxData->mIconTheme = theme;
3153}
3154
3155OUString
3157{
3158 OUString sTheme(mxData->mIconTheme);
3159 if (sTheme.isEmpty())
3160 {
3162 sTheme = "colibre";
3163 else
3164 {
3165 // read from the configuration, or fallback to what the desktop wants
3166 sTheme = officecfg::Office::Common::Misc::SymbolStyle::get();
3167
3168 if (sTheme.isEmpty() || sTheme == "auto")
3170 }
3171 }
3172
3173 if (!mxData->mIconThemeScanner) {
3175 }
3176 OUString r = mxData->mIconThemeSelector->SelectIconTheme(
3177 mxData->mIconThemeScanner->GetFoundIconThemes(),
3178 sTheme);
3179 return r;
3180}
3181
3182void
3184{
3185 if (mxData->mbHighContrast == bHighContrast) {
3186 return;
3187 }
3188
3189 CopyData();
3190 mxData->mbHighContrast = bHighContrast;
3191 mxData->mIconThemeSelector->SetUseHighContrastTheme(bHighContrast);
3192}
3193
3194bool
3196{
3197 return mxData->mbHighContrast;
3198}
3199
3200void
3201StyleSettings::SetPreferredIconTheme(const OUString& theme, bool bDarkIconTheme)
3202{
3203 const bool bChanged = mxData->mIconThemeSelector->SetPreferredIconTheme(theme, bDarkIconTheme);
3204 if (bChanged)
3205 {
3206 // clear this so it is recalculated if it was selected as the automatic theme
3207 mxData->mIconTheme.clear();
3208 }
3209}
3210
3211void
3213{
3214 CopyData();
3215 mxData->maMouseSettings = rSet;
3216}
3217
3218const MouseSettings&
3220{
3221 return mxData->maMouseSettings;
3222}
3223
3224void
3226{
3227 CopyData();
3228 mxData->maStyleSettings = rSet;
3229}
3230
3231void
3233{
3234 CopyData();
3235 mxData->maMiscSettings = rSet;
3236}
3237
3238const MiscSettings&
3240{
3241 return mxData->maMiscSettings;
3242}
3243
3244void
3246{
3247 CopyData();
3248 mxData->maHelpSettings = rSet;
3249}
3250
3251const HelpSettings&
3253{
3254 return mxData->maHelpSettings;
3255}
3256
3257bool
3259{
3260 return !(*this == rSet);
3261}
3262
3265{
3266 return mxData->maSysLocale;
3267}
3268
3269
3271 bool bCheckedColorSpecialCase )
3272{
3273 Set3DColors( aBackColor );
3274 SetFaceColor( aBackColor );
3275 SetDialogColor( aBackColor );
3276 SetWorkspaceColor( aBackColor );
3277
3278 if (bCheckedColorSpecialCase)
3280}
3281
3283 const vcl::Font& aLabelFont )
3284{
3285 SetAppFont( aAppFont );
3286 SetPushButtonFont( aAppFont );
3287 SetToolFont( aAppFont );
3288 SetHelpFont( aAppFont );
3289
3290 SetMenuFont( aLabelFont );
3291 SetTabFont( aLabelFont );
3292 SetLabelFont( aLabelFont );
3293 SetRadioCheckFont( aLabelFont );
3294 SetFieldFont( aLabelFont );
3295 SetGroupFont( aLabelFont );
3296 SetIconFont( aLabelFont );
3297}
3298
3299/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static void setupPersonaHeaderFooter(WhichPersona eWhich, OUString &rHeaderFooter, BitmapEx &rHeaderFooterBitmap, std::optional< Color > &rMenuBarTextColor)
Update the setting of the Persona header / footer in ImplStyleData.
static BitmapEx readBitmapEx(const OUString &rPath)
void SetLanguageTag(const OUString &rLanguage, bool bCanonicalize)
const LanguageTag & GetLanguageTag() const
AllSettingsFlags Update(AllSettingsFlags nFlags, const AllSettings &rSettings)
SAL_DLLPRIVATE SvtSysLocale & GetSysLocale()
static SAL_DLLPRIVATE void LocaleSettingsChanged(ConfigurationHints nHint)
const MouseSettings & GetMouseSettings() const
void SetMiscSettings(const MiscSettings &rSet)
SAL_DLLPRIVATE AllSettingsFlags GetChangeFlags(const AllSettings &rSettings) const
const vcl::I18nHelper & GetUILocaleI18nHelper() const
static bool GetMathLayoutRTL()
bool operator==(const AllSettings &rSet) const
const LocaleDataWrapper & GetNeutralLocaleDataWrapper() const
bool operator!=(const AllSettings &rSet) const
const vcl::I18nHelper & GetLocaleI18nHelper() const
const MiscSettings & GetMiscSettings() const
std::shared_ptr< ImplAllSettingsData > mxData
Definition: settings.hxx:688
void SetHelpSettings(const HelpSettings &rSet)
const LanguageTag & GetUILanguageTag() const
const HelpSettings & GetHelpSettings() const
void SetMouseSettings(const MouseSettings &rSet)
const StyleSettings & GetStyleSettings() const
const LocaleDataWrapper & GetUILocaleDataWrapper() const
void SetStyleSettings(const StyleSettings &rSet)
static bool GetLayoutRTL()
const LocaleDataWrapper & GetLocaleDataWrapper() const
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
Definition: svapp.cxx:1166
static const AllSettings & GetSettings()
Gets the application's settings.
Definition: svapp.cxx:761
static const OUString & GetDesktopEnvironment()
Get the desktop environment the process is currently running in.
Definition: svapp.cxx:1727
static void SetSettings(const AllSettings &rSettings)
Sets the application's settings and notifies all windows of the change.
Definition: svapp.cxx:667
static bool IsHeadlessModeEnabled()
Determines if headless mode is enabled.
Definition: svapp.cxx:1671
bool IsEmpty() const
Definition: BitmapEx.cxx:177
void RGBtoHSB(sal_uInt16 &nHue, sal_uInt16 &nSaturation, sal_uInt16 &nBrightness) const
void IncreaseLuminance(sal_uInt8 cLumInc)
static Color HSBtoRGB(sal_uInt16 nHue, sal_uInt16 nSaturation, sal_uInt16 nBrightness)
static ErrCode LoadGraphic(const OUString &rPath, const OUString &rFilter, Graphic &rGraphic, GraphicFilter *pFilter=nullptr, sal_uInt16 *pDeterminedFormat=nullptr)
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
Definition: graph.cxx:330
bool operator==(const HelpSettings &rSet) const
void SetTipTimeout(sal_Int32 nTipTimeout)
bool operator!=(const HelpSettings &rSet) const
std::shared_ptr< ImplHelpData > mxData
Definition: settings.hxx:656
static sal_Int32 GetBalloonDelay()
sal_Int32 GetTipTimeout() const
static sal_Int32 GetTipDelay()
LanguageType getLanguageType(bool bResolveSystem=true) const
bool GetDisablePrinting() const
bool GetEnableLocalizedDecimalSep() const
std::shared_ptr< ImplMiscData > mxData
Definition: settings.hxx:636
bool operator==(const MiscSettings &rSet) const
bool operator!=(const MiscSettings &rSet) const
bool GetEnableATToolSupport() const
void SetEnableLocalizedDecimalSep(bool bEnable)
sal_Int32 GetMenuDelay() const
MouseMiddleButtonAction GetMiddleButtonAction() const
void SetDoubleClickWidth(sal_Int32 nDoubleClkWidth)
sal_Int32 GetButtonRepeat() const
sal_uInt64 GetDoubleClickTime() const
static sal_Int32 GetScrollRepeat()
std::shared_ptr< ImplMouseData > mxData
Definition: settings.hxx:86
void SetWheelBehavior(MouseWheelBehaviour nBehavior)
void SetFollow(MouseFollowFlags nFollow)
static sal_Int32 GetButtonStartRepeat()
MouseWheelBehaviour GetWheelBehavior() const
static sal_uInt16 GetStartDragCode()
bool operator!=(const MouseSettings &rSet) const
sal_Int32 GetDoubleClickWidth() const
sal_Int32 GetDoubleClickHeight() const
sal_Int32 GetStartDragWidth() const
void SetMiddleButtonAction(MouseMiddleButtonAction nAction)
void SetStartDragHeight(sal_Int32 nDragHeight)
static sal_Int32 GetActionDelay()
void SetButtonRepeat(sal_Int32 nRepeat)
MouseFollowFlags GetFollow() const
bool operator==(const MouseSettings &rSet) const
sal_Int32 GetStartDragHeight() const
void SetOptions(MouseSettingsOptions nOptions)
void SetDoubleClickHeight(sal_Int32 nDoubleClkHeight)
void SetStartDragWidth(sal_Int32 nDragWidth)
static sal_uInt16 GetContextMenuClicks()
static sal_uInt16 GetContextMenuCode()
void SetMenuDelay(sal_Int32 nDelay)
MouseSettingsOptions GetOptions() const
void SetDoubleClickTime(sal_uInt64 nDoubleClkTime)
static bool isRightToLeftMath(LanguageType nLang)
static bool isRightToLeft(LanguageType nLang)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:892
const Color & GetGroupTextColor() const
void SetFieldTextColor(const Color &rColor)
void SetLabelFont(const vcl::Font &rFont)
Size GetToolbarIconSizePixel() const
bool GetUseFontAAFromSystem() const
const Color & GetListBoxWindowHighlightColor() const
SelectionOptions GetSelectionOptions() const
const std::optional< Color > & GetPersonaMenuBarTextColor() const
void SetLightBorderColor(const Color &rColor)
OUString DetermineIconTheme() const
Determine which icon theme should be used.
const Color & GetMenuBarRolloverColor() const
void SetRadioCheckFont(const vcl::Font &rFont)
void SetStandardStyles()
void SetLinkColor(const Color &rColor)
const Color & GetMonoColor() const
void SetFieldRolloverTextColor(const Color &rColor)
void SetActionButtonTextColor(const Color &rColor)
void SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
const Color & GetDeactiveTextColor() const
void SetPreferredIconTheme(const OUString &, bool bDarkIconTheme=false)
Set a preferred icon theme.
void SetGroupTextColor(const Color &rColor)
void SetFloatTitleFont(const vcl::Font &rFont)
void SetPreviewUsesCheckeredBackground(bool bNew)
void SetFlatButtonPressedRolloverTextColor(const Color &rColor)
BitmapEx const & GetPersonaHeader() const
void SetUseFlatBorders(bool bUseFlatBorders)
const vcl::Font & GetHelpFont() const
sal_Int32 GetScrollBarSize() const
const Color & GetListBoxWindowTextColor() const
void SetActiveTextColor(const Color &rColor)
const Color & GetDarkShadowColor() const
void SetCursorSize(sal_Int32 nSize)
sal_Int32 GetTitleHeight() const
void SetFaceColor(const Color &rColor)
const Color & GetWindowColor() const
const Color & GetDialogTextColor() const
void SetHelpFont(const vcl::Font &rFont)
void SetHelpTextColor(const Color &rColor)
const Color & GetActionButtonPressedRolloverTextColor() const
void SetToolFont(const vcl::Font &rFont)
void SetShadowColor(const Color &rColor)
std::shared_ptr< ImplStyleData > mxData
Definition: settings.hxx:213
const Color & GetFlatButtonPressedRolloverTextColor() const
const Color & GetMenuHighlightTextColor() const
void SetListBoxPreviewDefaultLogicSize(Size const &rSize)
void SetActiveBorderColor(const Color &rColor)
bool GetPreviewUsesCheckeredBackground() const
void SetPushButtonFont(const vcl::Font &rFont)
const Color & GetFieldTextColor() const
DisplayOptions GetDisplayOptions() const
void Set3DColors(const Color &rColor)
void SetTabTextColor(const Color &rColor)
bool GetContextMenuShortcuts() const
bool operator==(const StyleSettings &rSet) const
bool GetHighContrastMode() const
void SetTitleHeight(sal_Int32 nSize)
const Color & GetShadowColor() const
void SetDisableColor(const Color &rColor)
void SetActiveTabColor(const Color &rColor)
void SetHighlightTextColor(const Color &rColor)
sal_Int32 GetAntialiasingMinPixelHeight() const
const Color & GetAlternatingRowColor() const
const Color & GetMenuColor() const
void SetContextMenuShortcuts(TriState eContextMenuShortcuts)
const Color & GetMenuHighlightColor() const
bool GetPrimaryButtonWarpsSlider() const
const Color & GetFieldColor() const
void SetUseImagesInMenus(TriState eUseImagesInMenus)
StyleSettingsOptions GetOptions() const
void SetFloatTitleHeight(sal_Int32 nSize)
void SetIconTheme(const OUString &)
Set the icon theme to use.
void SetAlternatingRowColor(const Color &rColor)
void SetUseSystemUIFonts(bool bUseSystemUIFonts)
const Color & GetFlatButtonTextColor() const
void SetActionButtonRolloverTextColor(const Color &rColor)
void SetTabRolloverTextColor(const Color &rColor)
void SetListBoxWindowBackgroundColor(const Color &rColor)
void SetListBoxWindowHighlightColor(const Color &rColor)
void SetCursorBlinkTime(sal_uInt64 nBlinkTime)
const Color & GetLabelTextColor() const
void SetEdgeBlending(sal_uInt16 nCount)
BitmapEx const & GetPersonaFooter() const
const Color & GetMenuBarTextColor() const
void SetDefaultButtonPressedRolloverTextColor(const Color &rColor)
const Color & GetDeactiveColor() const
const vcl::Font & GetMenuFont() const
void SetMenuBarHighlightTextColor(const Color &rColor)
void SetToolbarIconSize(ToolbarIconSize nSize)
void SetDefaultActionButtonTextColor(const Color &rColor)
const Color & GetRadioCheckTextColor() const
void SetActiveColor(const Color &rColor)
sal_uInt16 GetListBoxMaximumLineCount() const
void SetHelpColor(const Color &rColor)
void SetPreferredContextMenuShortcuts(bool bContextMenuShortcuts)
void SetListBoxWindowHighlightTextColor(const Color &rColor)
const Color & GetMenuBarRolloverTextColor() const
void SetInactiveTabColor(const Color &rColor)
const Color & GetTabRolloverTextColor() const
std::vector< vcl::IconThemeInfo > const & GetInstalledIconThemes() const
Obtain the list of icon themes which were found in the config folder.
void SetWarningColor(const Color &rColor)
const Color & GetTabTextColor() const
const vcl::Font & GetRadioCheckFont() const
void SetDialogColor(const Color &rColor)
void SetMenuTextColor(const Color &rColor)
void SetDefaultButtonRolloverTextColor(const Color &rColor)
sal_uInt64 GetCursorBlinkTime() const
const vcl::Font & GetTabFont() const
const vcl::Font & GetFieldFont() const
const vcl::Font & GetFloatTitleFont() const
const DialogStyle & GetDialogStyle() const
void SetTabFont(const vcl::Font &rFont)
const Color & GetWorkspaceColor() const
Color GetSeparatorColor() const
void SetFlatButtonRolloverTextColor(const Color &rColor)
const Color & GetCheckedColor() const
const vcl::Font & GetLabelFont() const
void SetDefaultActionButtonRolloverTextColor(const Color &rColor)
void SetGroupFont(const vcl::Font &rFont)
const Color & GetListBoxWindowHighlightTextColor() const
const Color & GetWindowTextColor() const
const Color & GetActionButtonRolloverTextColor() const
void SetCheckedColor(const Color &rColor)
void SetMenuColor(const Color &rColor)
const vcl::Font & GetGroupFont() const
void SetCheckedColorSpecialCase()
void SetAutoMnemonic(bool bAutoMnemonic)
void SetHighlightColor(const Color &rColor)
const Color & GetHelpTextColor() const
const vcl::Font & GetPushButtonFont() const
static sal_Int32 GetSplitSize()
void SetMonoColor(const Color &rColor)
void SetButtonPressedRolloverTextColor(const Color &rColor)
void SetHighContrastMode(bool bHighContrast)
const Color & GetLightBorderColor() const
bool GetUseFlatMenus() const
static sal_uInt16 GetListBoxPreviewDefaultLineWidth()
void SetAppFont(const vcl::Font &rFont)
void SetSkipDisabledInMenus(bool bSkipDisabledInMenus)
void SetListBoxWindowTextColor(const Color &rColor)
const Color & GetHelpColor() const
const Color & GetActiveColor() const
const Color & GetLightColor() const
static sal_Int32 GetBorderSize()
void SetMenuBarColor(const Color &rColor)
bool GetUseFlatBorders() const
const Color & GetDefaultButtonTextColor() const
const vcl::Font & GetToolFont() const
bool GetSkipDisabledInMenus() const
void SetMenuBarRolloverTextColor(const Color &rColor)
void SetMenuHighlightTextColor(const Color &rColor)
const Color & GetLinkColor() const
Color GetFaceGradientColor() const
void SetTitleFont(const vcl::Font &rFont)
void SetAntialiasingMinPixelHeight(sal_Int32 nMinPixel)
const Color & GetMenuBarColor() const
sal_Int32 GetFloatTitleHeight() const
DragFullOptions GetDragFullOptions() const
void SetRadioCheckTextColor(const Color &rColor)
const Color & GetDialogColor() const
void SetLabelTextColor(const Color &rColor)
void SetFieldFont(const vcl::Font &rFont)
const Color & GetVisitedLinkColor() const
const Color & GetDefaultActionButtonRolloverTextColor() const
const Color & GetDefaultButtonPressedRolloverTextColor() const
void SetScrollBarSize(sal_Int32 nSize)
void SetDefaultButtonTextColor(const Color &rColor)
void SetDragFullOptions(DragFullOptions nOptions)
void SetIconFont(const vcl::Font &rFont)
const vcl::Font & GetIconFont() const
void SetButtonRolloverTextColor(const Color &rColor)
const Color & GetEdgeBlendingTopLeftColor() const
void SetListBoxMaximumLineCount(sal_uInt16 nCount)
void SetButtonTextColor(const Color &rColor)
sal_Int32 GetMinThumbSize() const
void SetWindowColor(const Color &rColor)
bool GetUseImagesInMenus() const
static bool GetDockingFloatsSupported()
const Color & GetDefaultActionButtonPressedRolloverTextColor() const
OUString GetAutomaticallyChosenIconTheme() const
Obtain the name of the icon theme which will be chosen automatically for the desktop environment.
const Color & GetActiveTabColor() const
const Color & GetHighlightColor() const
void SetWindowTextColor(const Color &rColor)
void SetTabHighlightTextColor(const Color &rColor)
void BatchSetFonts(const vcl::Font &aAppFont, const vcl::Font &aLabelFont)
void SetVisitedLinkColor(const Color &rColor)
void SetSelectionOptions(SelectionOptions nOptions)
void SetPreferredUseImagesInMenus(bool bPreferredUseImagesInMenus)
const Color & GetDefaultActionButtonTextColor() const
const Color & GetInactiveTabColor() const
void SetMinThumbSize(sal_Int32 nSize)
const Color & GetActionButtonTextColor() const
const Color & GetFlatButtonRolloverTextColor() const
void SetMenuBarTextColor(const Color &rColor)
sal_Int32 GetCursorSize() const
void SetSpinSize(sal_Int32 nSize)
void SetMenuBarRolloverColor(const Color &rColor)
void SetDeactiveTextColor(const Color &rColor)
const Color & GetFaceColor() const
const vcl::Font & GetAppFont() const
const Color & GetToolTextColor() const
void SetDarkShadowColor(const Color &rColor)
bool GetAutoMnemonic() const
const vcl::Font & GetTitleFont() const
void SetFieldColor(const Color &rColor)
void SetMenuFont(const vcl::Font &rFont)
const Color & GetMenuBarHighlightTextColor() const
void SetDefaultActionButtonPressedRolloverTextColor(const Color &rColor)
const Color & GetMenuTextColor() const
void SetMenuBorderColor(const Color &rColor)
const Color & GetHighlightTextColor() const
void SetPrimaryButtonWarpsSlider(bool bPrimaryButtonWarpsSlider)
void SetToolTextColor(const Color &rColor)
void SetDisplayOptions(DisplayOptions nOptions)
sal_uInt16 GetEdgeBlending() const
void SetMenuHighlightColor(const Color &rColor)
void SetLightColor(const Color &rColor)
void SetWorkspaceColor(const Color &rColor)
bool GetPreferredContextMenuShortcuts() const
const Color & GetDisableColor() const
bool GetPreferredUseImagesInMenus() const
void SetDeactiveBorderColor(const Color &rColor)
const Color & GetWarningColor() const
bool GetUseSystemUIFonts() const
const Color & GetButtonTextColor() const
void SetUseFlatMenus(bool bUseFlatMenus)
const Color & GetDefaultButtonRolloverTextColor() const
void SetDeactiveColor(const Color &rColor)
const Color & GetActiveTextColor() const
const Color & GetListBoxWindowBackgroundColor() const
void SetActionButtonPressedRolloverTextColor(const Color &rColor)
const Size & GetListBoxPreviewDefaultPixelSize() const
void SetHideDisabledMenuItems(bool bHideDisabledMenuItems)
sal_uInt16 GetColorValueSetColumnCount() const
void SetOptions(StyleSettingsOptions nOptions)
void SetColorValueSetColumnCount(sal_uInt16 nCount)
sal_Int32 GetSpinSize() const
const Color & GetButtonRolloverTextColor() const
const Color & GetButtonPressedRolloverTextColor() const
const Color & GetDeactiveBorderColor() const
ToolbarIconSize GetToolbarIconSize() const
bool operator!=(const StyleSettings &rSet) const
bool GetHideDisabledMenuItems() const
const Color & GetTabHighlightTextColor() const
const Color & GetActiveBorderColor() const
void SetDialogTextColor(const Color &rColor)
void SetFlatButtonTextColor(const Color &rColor)
void BatchSetBackgrounds(const Color &aBackColor, bool bCheckedColorSpecialCase=true)
const Color & GetFieldRolloverTextColor() const
const Color & GetEdgeBlendingBottomRightColor() const
const Color & GetMenuBorderColor() const
bool IsDecimalSeparatorAsLocale() const
const LanguageTag & GetRealUILanguageTag() const
SvtSysLocaleOptions & GetOptions() const
static std::shared_ptr< ConfigurationChanges > create()
static bool IsFuzzing()
static DefaultFontConfiguration & get()
css::uno::Any getNodeValue(const OUString &_rPath) const noexcept
static OConfigurationTreeRoot tryCreateWithComponentContext(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const OUString &_rPath, sal_Int32 _nDepth=-1, CREATION_MODE _eMode=CM_UPDATABLE)
void SetWeight(FontWeight)
Definition: font/font.cxx:236
void SetCharSet(rtl_TextEncoding)
Definition: font/font.cxx:161
void SetFamilyName(const OUString &rFamilyName)
Definition: font/font.cxx:137
static OUString GetStandardIconThemePath()
This method will return the standard path where icon themes are located.
static std::shared_ptr< IconThemeScanner > Create(std::u16string_view path)
Factory method to create the object.
static SettingsConfigItem * get()
constexpr ::Color COL_GRAY(0x80, 0x80, 0x80)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_YELLOW(0xFF, 0xFF, 0x00)
ColorTransparency
constexpr ::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
constexpr ::Color COL_BLUE(0x00, 0x00, 0x80)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
#define SAL_CONFIGFILE(name)
int nCount
#define ERRCODE_NONE
#define MOUSE_LEFT
Definition: event.hxx:102
#define MOUSE_RIGHT
Definition: event.hxx:104
FAMILY_SWISS
WEIGHT_BOLD
WEIGHT_NORMAL
TriState
TRISTATE_FALSE
TRISTATE_INDET
TRISTATE_TRUE
sal_Int32 nIndex
OUString aName
#define LANGUAGE_SYSTEM
NONE
const LanguageTag & getLanguageTag()
Reference< XComponentContext > getProcessComponentContext()
Unknown
css::beans::Optional< css::uno::Any > getValue(std::u16string_view id)
std::shared_ptr< T > make_shared(Args &&... args)
sal_Int32 h
ConfigurationHints
RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey, rtl_uString *keyName, RegValueType valueType, RegValue pData, sal_uInt32 valueSize)
SelectionOptions
Definition: settings.hxx:179
MouseSettingsOptions
Definition: settings.hxx:53
AllSettingsFlags
Definition: settings.hxx:671
StyleSettingsOptions
Definition: settings.hxx:153
MouseMiddleButtonAction
Definition: settings.hxx:73
#define STYLE_CURSOR_NOBLINKTIME
Definition: settings.hxx:206
ToolbarIconSize
Definition: settings.hxx:199
DragFullOptions
Definition: settings.hxx:164
MouseWheelBehaviour
Definition: settings.hxx:78
DisplayOptions
Definition: settings.hxx:189
MouseFollowFlags
Definition: settings.hxx:64
static SfxItemSet & rSet
sal_uIntPtr sal_uLong
HelpSettings maHelpSettings
StyleSettings maStyleSettings
LanguageTag maUILocale
std::unique_ptr< vcl::I18nHelper > mpUII18nHelper
std::unique_ptr< vcl::I18nHelper > mpI18nHelper
std::unique_ptr< LocaleDataWrapper > mpNeutralLocaleDataWrapper
std::unique_ptr< LocaleDataWrapper > mpLocaleDataWrapper
MiscSettings maMiscSettings
MouseSettings maMouseSettings
SvtSysLocale maSysLocale
std::unique_ptr< LocaleDataWrapper > mpUILocaleDataWrapper
sal_Int32 mnTipTimeout
TriState mnDisablePrinting
TriState mnEnableATT
bool mbEnableLocalizedDecimalSep
sal_uInt64 mnDoubleClkTime
sal_Int32 mnMenuDelay
sal_Int32 mnButtonRepeat
sal_Int32 mnStartDragWidth
MouseWheelBehaviour mnWheelBehavior
sal_Int32 mnDoubleClkHeight
MouseMiddleButtonAction mnMiddleButtonAction
sal_Int32 mnStartDragHeight
MouseFollowFlags mnFollow
sal_Int32 mnDoubleClkWidth
MouseSettingsOptions mnOptions
ImplSVNWFData maNWFData
Definition: svdata.hxx:407
bool mbCanDetermineWindowPosition
Definition: svdata.hxx:348
Color maHighlightColor
vcl::Font maRadioCheckFont
vcl::Font maGroupFont
Color maRadioCheckTextColor
sal_uInt16 mnColorValueSetColumnCount
Color maVisitedLinkColor
Color maTabHighlightTextColor
StyleSettingsOptions mnOptions
SelectionOptions mnSelectionOptions
ToolbarIconSize mnToolbarIconSize
Color maListBoxWindowHighlightTextColor
Color maActionButtonPressedRolloverTextColor
BitmapEx maPersonaFooterBitmap
Cache the footer bitmap.
TriState meContextMenuShortcuts
vcl::Font maTitleFont
bool mbPreferredUseImagesInMenus
Color maMenuBarTextColor
Color maDarkShadowColor
Color maDefaultButtonRolloverTextColor
Color maMenuBarHighlightTextColor
std::shared_ptr< vcl::IconThemeScanner > mIconThemeScanner
Size maListBoxPreviewDefaultLogicSize
TriState meUseImagesInMenus
Color maWindowTextColor
Size maListBoxPreviewDefaultPixelSize
Color maTabRolloverTextColor
Color maDefaultActionButtonTextColor
Color maHighlightTextColor
Color maActiveBorderColor
sal_Int32 mnTitleHeight
Color maActiveTabColor
void SetStandardStyles()
Color maAlternatingRowColor
Color maDefaultActionButtonPressedRolloverTextColor
vcl::Font maFieldFont
Color maEdgeBlendingBottomRightColor
Color maMenuBarRolloverTextColor
Color maButtonPressedRolloverTextColor
Color maLightBorderColor
Color maFieldRolloverTextColor
Color maDefaultButtonPressedRolloverTextColor
Color maDefaultButtonTextColor
vcl::Font maLabelFont
vcl::Font maIconFont
Color maListBoxWindowTextColor
sal_Int32 mnScrollBarSize
Color maDeactiveBorderColor
Color maFieldTextColor
vcl::Font maTabFont
bool mbPrimaryButtonWarpsSlider
Color maFlatButtonRolloverTextColor
Color maListBoxWindowHighlightColor
Color maDialogTextColor
Color maButtonRolloverTextColor
bool mbPreferredContextMenuShortcuts
Color maFlatButtonTextColor
DisplayOptions mnDisplayOptions
Color maActionButtonTextColor
std::shared_ptr< vcl::IconThemeSelector > mIconThemeSelector
Color maActiveTextColor
BitmapEx maPersonaHeaderBitmap
Cache the header bitmap.
sal_uInt64 mnCursorBlinkTime
OUString mIconTheme
sal_Int32 mnCursorSize
vcl::Font maFloatTitleFont
sal_Int32 mnMinThumbSize
vcl::Font maAppFont
Color maButtonTextColor
Color maMenuBorderColor
sal_uInt16 mnListBoxMaximumLineCount
vcl::Font maPushButtonFont
Color maActionButtonRolloverTextColor
Color maFlatButtonPressedRolloverTextColor
Color maCheckedColor
bool mbPreviewUsesCheckeredBackground
vcl::Font maToolFont
Color maMenuBarRolloverColor
Color maMenuHighlightTextColor
Color maEdgeBlendingTopLeftColor
DragFullOptions mnDragFullOptions
bool mbUseFontAAFromSystem
Disabling AA doesn't actually disable AA of fonts, instead it is taken from system settings.
Color maInactiveTabColor
Color maMenuHighlightColor
sal_Int32 mnAntialiasedMin
bool mbSkipDisabledInMenus
OUString maPersonaHeaderFooter
Cache the settings to detect changes.
Color maWorkspaceColor
DialogStyle maDialogStyle
Color maLabelTextColor
Color maDefaultActionButtonRolloverTextColor
vcl::Font maMenuFont
std::optional< Color > maPersonaMenuBarTextColor
Cache the menubar color.
Color maGroupTextColor
sal_uInt16 mnEdgeBlending
sal_Int32 mnSpinSize
sal_Int32 mnFloatTitleHeight
bool mbHideDisabledMenuItems
Color maListBoxWindowBackgroundColor
Color maDeactiveTextColor
vcl::Font maHelpFont
ImplSVData * ImplGetSVData()
Definition: svdata.cxx:76
const ::Color maShadowColor
unsigned char sal_uInt8
unsigned char BYTE