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 <salframe.hxx>
57#include <svdata.hxx>
58
60{
62 sal_uInt64 mnDoubleClkTime = 500;
63 sal_Int32 mnDoubleClkWidth = 2;
64 sal_Int32 mnDoubleClkHeight = 2;
65 sal_Int32 mnStartDragWidth = 2 ;
66 sal_Int32 mnStartDragHeight = 2;
67 sal_Int32 mnButtonRepeat = 90;
68 sal_Int32 mnMenuDelay = 150;
72};
73
75{
77 ImplStyleData( const ImplStyleData& rData );
78
79 void SetStandardStyles();
80
163 sal_Int32 mnTitleHeight;
166 sal_Int32 mnSpinSize;
167 sal_Int32 mnCursorSize;
187 sal_Int32 mnMinThumbSize;
188 std::shared_ptr<vcl::IconThemeScanner>
190 std::shared_ptr<vcl::IconThemeSelector>
192
193 OUString mIconTheme;
198 //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise
199 //primary means scroll by single page. Secondary button takes the alternative behaviour
202
203 sal_uInt16 mnEdgeBlending;
211
213
216 std::optional<Color> maPersonaMenuBarTextColor;
217};
218
220{
221 ImplMiscData();
225};
226
228{
229 sal_Int32 mnTipTimeout = 3000;
230};
231
233{
237
244 std::unique_ptr<LocaleDataWrapper> mpLocaleDataWrapper;
245 std::unique_ptr<LocaleDataWrapper> mpUILocaleDataWrapper;
246 std::unique_ptr<LocaleDataWrapper> mpNeutralLocaleDataWrapper;
247 std::unique_ptr<vcl::I18nHelper> mpI18nHelper;
248 std::unique_ptr<vcl::I18nHelper> mpUII18nHelper;
250};
251
252void
254{
255 CopyData();
256 mxData->mnOptions = nOptions;
257}
258
261{
262 return mxData->mnOptions;
263}
264
265void
266MouseSettings::SetDoubleClickTime( sal_uInt64 nDoubleClkTime )
267{
268 CopyData();
269 mxData->mnDoubleClkTime = nDoubleClkTime;
270}
271
272sal_uInt64
274{
275 return mxData->mnDoubleClkTime;
276}
277
278void
279MouseSettings::SetDoubleClickWidth( sal_Int32 nDoubleClkWidth )
280{
281 CopyData();
282 mxData->mnDoubleClkWidth = nDoubleClkWidth;
283}
284
285sal_Int32
287{
288 return mxData->mnDoubleClkWidth;
289}
290
291void
292MouseSettings::SetDoubleClickHeight( sal_Int32 nDoubleClkHeight )
293{
294 CopyData();
295 mxData->mnDoubleClkHeight = nDoubleClkHeight;
296}
297
298sal_Int32
300{
301 return mxData->mnDoubleClkHeight;
302}
303
304void
305MouseSettings::SetStartDragWidth( sal_Int32 nDragWidth )
306{
307 CopyData();
308 mxData->mnStartDragWidth = nDragWidth;
309}
310
311sal_Int32
313{
314 return mxData->mnStartDragWidth;
315}
316
317void
318MouseSettings::SetStartDragHeight( sal_Int32 nDragHeight )
319{
320 CopyData();
321 mxData->mnStartDragHeight = nDragHeight;
322}
323
324sal_Int32
326{
327 return mxData->mnStartDragHeight;
328}
329
330sal_uInt16
332{
333 return MOUSE_LEFT;
334}
335
336sal_uInt16
338{
339 return MOUSE_RIGHT;
340}
341
342sal_uInt16
344{
345 return 1;
346}
347
348sal_Int32
350{
351 return 100;
352}
353
354sal_Int32
356{
357 return 370;
358}
359
360void
362{
363 CopyData();
364 mxData->mnButtonRepeat = nRepeat;
365}
366
367sal_Int32
369{
370 return mxData->mnButtonRepeat;
371}
372
373sal_Int32
375{
376 return 250;
377}
378
379void
381{
382 CopyData();
383 mxData->mnMenuDelay = nDelay;
384}
385
386sal_Int32
388{
389 return mxData->mnMenuDelay;
390}
391
392void
394{
395 CopyData();
396 mxData->mnFollow = nFollow;
397}
398
401{
402 return mxData->mnFollow;
403}
404
405void
407{
408 CopyData();
409 mxData->mnMiddleButtonAction = nAction;
410}
411
414{
415 return mxData->mnMiddleButtonAction;
416}
417
418void
420{
421 CopyData();
422 mxData->mnWheelBehavior = nBehavior;
423}
424
427{
428 return mxData->mnWheelBehavior;
429}
430
431bool
433{
434 return !(*this == rSet);
435}
436
438 : mxData(std::make_shared<ImplMouseData>())
439{
440}
441
443{
444 // copy if other references exist
445 if (mxData.use_count() > 1)
446 {
447 mxData = std::make_shared<ImplMouseData>(*mxData);
448 }
449}
450
452{
453 if ( mxData == rSet.mxData )
454 return true;
455
456 return
457 (mxData->mnOptions == rSet.mxData->mnOptions) &&
458 (mxData->mnDoubleClkTime == rSet.mxData->mnDoubleClkTime) &&
459 (mxData->mnDoubleClkWidth == rSet.mxData->mnDoubleClkWidth) &&
460 (mxData->mnDoubleClkHeight == rSet.mxData->mnDoubleClkHeight) &&
461 (mxData->mnStartDragWidth == rSet.mxData->mnStartDragWidth) &&
462 (mxData->mnStartDragHeight == rSet.mxData->mnStartDragHeight) &&
463 (mxData->mnMiddleButtonAction == rSet.mxData->mnMiddleButtonAction) &&
464 (mxData->mnButtonRepeat == rSet.mxData->mnButtonRepeat) &&
465 (mxData->mnMenuDelay == rSet.mxData->mnMenuDelay) &&
466 (mxData->mnFollow == rSet.mxData->mnFollow) &&
467 (mxData->mnWheelBehavior == rSet.mxData->mnWheelBehavior );
468}
469
471 mnScrollBarSize(16),
472 mnSpinSize(16),
473 mnCursorSize(2),
474 mnAntialiasedMin(0),
475 mnCursorBlinkTime(STYLE_CURSOR_NOBLINKTIME),
476 mnDragFullOptions(DragFullOptions::All),
477 mnSelectionOptions(SelectionOptions::NONE),
478 mnDisplayOptions(DisplayOptions::NONE),
479 mnToolbarIconSize(ToolbarIconSize::Unknown),
480 mnOptions(StyleSettingsOptions::NONE),
481 mbAutoMnemonic(true),
482 meUseImagesInMenus(TRISTATE_INDET),
483 mnMinThumbSize(16),
484 mIconThemeSelector(std::make_shared<vcl::IconThemeSelector>()),
485 meContextMenuShortcuts(TRISTATE_INDET),
486 mnEdgeBlending(35),
487 maEdgeBlendingTopLeftColor(Color(0xC0, 0xC0, 0xC0)),
488 maEdgeBlendingBottomRightColor(Color(0x40, 0x40, 0x40)),
489 mnListBoxMaximumLineCount(25),
490 // For some reason this isn't actually the column count that gets used, at least on iOS, but
491 // instead what SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() in
492 // svtools/source/config/accessibilityoptions.cxx returns.
493 mnColorValueSetColumnCount(12),
494#ifdef IOS
495 maListBoxPreviewDefaultLogicSize(Size(30, 30)),
496#else
497 maListBoxPreviewDefaultLogicSize(Size(15, 7)),
498#endif
499 maListBoxPreviewDefaultPixelSize(Size(0, 0)), // on-demand calculated in GetListBoxPreviewDefaultPixelSize(),
500 mbPreviewUsesCheckeredBackground(true)
501{
503}
504
506 maActiveBorderColor( rData.maActiveBorderColor ),
507 maActiveColor( rData.maActiveColor ),
508 maActiveTextColor( rData.maActiveTextColor ),
509 maAlternatingRowColor( rData.maAlternatingRowColor ),
510 maDefaultButtonTextColor( rData.maDefaultButtonTextColor ),
511 maButtonTextColor( rData.maButtonTextColor ),
512 maDefaultActionButtonTextColor( rData.maDefaultActionButtonTextColor ),
513 maActionButtonTextColor( rData.maActionButtonTextColor ),
514 maFlatButtonTextColor( rData.maFlatButtonTextColor ),
515 maDefaultButtonRolloverTextColor( rData.maDefaultButtonRolloverTextColor ),
516 maButtonRolloverTextColor( rData.maButtonRolloverTextColor ),
517 maDefaultActionButtonRolloverTextColor( rData.maDefaultActionButtonRolloverTextColor ),
518 maActionButtonRolloverTextColor( rData.maActionButtonRolloverTextColor ),
519 maFlatButtonRolloverTextColor( rData.maFlatButtonRolloverTextColor ),
520 maDefaultButtonPressedRolloverTextColor( rData.maDefaultButtonPressedRolloverTextColor ),
521 maButtonPressedRolloverTextColor( rData.maButtonPressedRolloverTextColor ),
522 maDefaultActionButtonPressedRolloverTextColor( rData.maDefaultActionButtonPressedRolloverTextColor ),
523 maActionButtonPressedRolloverTextColor( rData.maActionButtonPressedRolloverTextColor ),
524 maFlatButtonPressedRolloverTextColor( rData.maFlatButtonPressedRolloverTextColor ),
525 maCheckedColor( rData.maCheckedColor ),
526 maDarkShadowColor( rData.maDarkShadowColor ),
527 maDeactiveBorderColor( rData.maDeactiveBorderColor ),
528 maDeactiveColor( rData.maDeactiveColor ),
529 maDeactiveTextColor( rData.maDeactiveTextColor ),
530 maDialogColor( rData.maDialogColor ),
531 maDialogTextColor( rData.maDialogTextColor ),
532 maDisableColor( rData.maDisableColor ),
533 maFaceColor( rData.maFaceColor ),
534 maFieldColor( rData.maFieldColor ),
535 maFieldTextColor( rData.maFieldTextColor ),
536 maFieldRolloverTextColor( rData.maFieldRolloverTextColor ),
537 maGroupTextColor( rData.maGroupTextColor ),
538 maHelpColor( rData.maHelpColor ),
539 maHelpTextColor( rData.maHelpTextColor ),
540 maAccentColor( rData.maAccentColor ),
541 maHighlightColor( rData.maHighlightColor ),
542 maHighlightTextColor( rData.maHighlightTextColor ),
543 maLabelTextColor( rData.maLabelTextColor ),
544 maLightBorderColor( rData.maLightBorderColor ),
545 maLightColor( rData.maLightColor ),
546 maLinkColor( rData.maLinkColor ),
547 maMenuBarColor( rData.maMenuBarColor ),
548 maMenuBarRolloverColor( rData.maMenuBarRolloverColor ),
549 maMenuBorderColor( rData.maMenuBorderColor ),
550 maMenuColor( rData.maMenuColor ),
551 maMenuHighlightColor( rData.maMenuHighlightColor ),
552 maMenuHighlightTextColor( rData.maMenuHighlightTextColor ),
553 maMenuTextColor( rData.maMenuTextColor ),
554 maListBoxWindowBackgroundColor( rData.maListBoxWindowBackgroundColor ),
555 maListBoxWindowTextColor( rData.maListBoxWindowTextColor ),
556 maListBoxWindowHighlightColor( rData.maListBoxWindowHighlightColor ),
557 maListBoxWindowHighlightTextColor( rData.maListBoxWindowHighlightTextColor ),
558 maMenuBarTextColor( rData.maMenuBarTextColor ),
559 maMenuBarRolloverTextColor( rData.maMenuBarRolloverTextColor ),
560 maMenuBarHighlightTextColor( rData.maMenuBarHighlightTextColor ),
561 maMonoColor( rData.maMonoColor ),
562 maRadioCheckTextColor( rData.maRadioCheckTextColor ),
564 maWarningColor( rData.maWarningColor ),
565 maVisitedLinkColor( rData.maVisitedLinkColor ),
566 maToolTextColor( rData.maToolTextColor ),
567 maWindowColor( rData.maWindowColor ),
568 maWindowTextColor( rData.maWindowTextColor ),
569 maWorkspaceColor( rData.maWorkspaceColor ),
570 maActiveTabColor( rData.maActiveTabColor ),
571 maInactiveTabColor( rData.maInactiveTabColor ),
572 maTabTextColor( rData.maTabTextColor ),
573 maTabRolloverTextColor( rData.maTabRolloverTextColor ),
574 maTabHighlightTextColor( rData.maTabHighlightTextColor ),
575 maAppFont( rData.maAppFont ),
576 maHelpFont( rData.maAppFont ),
577 maTitleFont( rData.maTitleFont ),
578 maFloatTitleFont( rData.maFloatTitleFont ),
579 maMenuFont( rData.maMenuFont ),
580 maToolFont( rData.maToolFont ),
581 maLabelFont( rData.maLabelFont ),
582 maRadioCheckFont( rData.maRadioCheckFont ),
583 maPushButtonFont( rData.maPushButtonFont ),
584 maFieldFont( rData.maFieldFont ),
585 maIconFont( rData.maIconFont ),
586 maTabFont( rData.maTabFont ),
587 maGroupFont( rData.maGroupFont ),
588 mnTitleHeight(rData.mnTitleHeight),
589 mnFloatTitleHeight(rData.mnFloatTitleHeight),
590 mnScrollBarSize(rData.mnScrollBarSize),
591 mnSpinSize(rData.mnSpinSize),
592 mnCursorSize(rData.mnCursorSize),
593 mnAntialiasedMin(rData.mnAntialiasedMin),
594 mnCursorBlinkTime(rData.mnCursorBlinkTime),
595 mnDragFullOptions(rData.mnDragFullOptions),
596 mnSelectionOptions(rData.mnSelectionOptions),
597 mnDisplayOptions(rData.mnDisplayOptions),
598 mnToolbarIconSize(rData.mnToolbarIconSize),
599 mnUseFlatMenus(rData.mnUseFlatMenus),
600 mnOptions(rData.mnOptions),
601 mbHighContrast(rData.mbHighContrast),
602 mbUseSystemUIFonts(rData.mbUseSystemUIFonts),
603 mbUseFontAAFromSystem(rData.mbUseFontAAFromSystem),
604 mbAutoMnemonic(rData.mbAutoMnemonic),
605 meUseImagesInMenus(rData.meUseImagesInMenus),
606 mnUseFlatBorders(rData.mnUseFlatBorders),
607 mbPreferredUseImagesInMenus(rData.mbPreferredUseImagesInMenus),
608 mnMinThumbSize(rData.mnMinThumbSize),
609 mIconThemeSelector(std::make_shared<vcl::IconThemeSelector>(*rData.mIconThemeSelector)),
610 mIconTheme(rData.mIconTheme),
611 mbSkipDisabledInMenus(rData.mbSkipDisabledInMenus),
612 mbHideDisabledMenuItems(rData.mbHideDisabledMenuItems),
613 mbPreferredContextMenuShortcuts(rData.mbPreferredContextMenuShortcuts),
614 meContextMenuShortcuts(rData.meContextMenuShortcuts),
615 mbPrimaryButtonWarpsSlider(rData.mbPrimaryButtonWarpsSlider),
616 maDialogStyle( rData.maDialogStyle ),
617 mnEdgeBlending(rData.mnEdgeBlending),
618 maEdgeBlendingTopLeftColor(rData.maEdgeBlendingTopLeftColor),
619 maEdgeBlendingBottomRightColor(rData.maEdgeBlendingBottomRightColor),
620 mnListBoxMaximumLineCount(rData.mnListBoxMaximumLineCount),
621 mnColorValueSetColumnCount(rData.mnColorValueSetColumnCount),
622 maListBoxPreviewDefaultLogicSize(rData.maListBoxPreviewDefaultLogicSize),
623 maListBoxPreviewDefaultPixelSize(rData.maListBoxPreviewDefaultPixelSize),
624 mbPreviewUsesCheckeredBackground(rData.mbPreviewUsesCheckeredBackground),
625 maPersonaHeaderFooter( rData.maPersonaHeaderFooter ),
626 maPersonaHeaderBitmap( rData.maPersonaHeaderBitmap ),
627 maPersonaFooterBitmap( rData.maPersonaFooterBitmap ),
628 maPersonaMenuBarTextColor( rData.maPersonaMenuBarTextColor )
629{
630 if (rData.mIconThemeScanner)
631 mIconThemeScanner = std::make_shared<vcl::IconThemeScanner>(*rData.mIconThemeScanner);
632}
633
635{
636 vcl::Font aStdFont( FAMILY_SWISS, Size( 0, 8 ) );
637 aStdFont.SetCharSet( osl_getThreadTextEncoding() );
638 aStdFont.SetWeight( WEIGHT_NORMAL );
640 aStdFont.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en")));
641 else
642 aStdFont.SetFamilyName("Liberation Sans");
643 maAppFont = aStdFont;
644 maHelpFont = aStdFont;
645 maMenuFont = aStdFont;
646 maToolFont = aStdFont;
647 maGroupFont = aStdFont;
648 maLabelFont = aStdFont;
649 maRadioCheckFont = aStdFont;
650 maPushButtonFont = aStdFont;
651 maFieldFont = aStdFont;
652 maIconFont = aStdFont;
653 maTabFont = aStdFont;
654 aStdFont.SetWeight( WEIGHT_BOLD );
655 maFloatTitleFont = aStdFont;
656 maTitleFont = aStdFont;
657
659 maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
664
666
682
690 maWorkspaceColor = Color( 0xDF, 0xDF, 0xDE );
716 // make active like highlight, except with a small contrast
726 maHelpColor = Color( 0xFF, 0xFF, 0xE0 );
729 maVisitedLinkColor = Color( 0x00, 0x00, 0xCC );
731 maAlternatingRowColor = Color( 0xEE, 0xEE, 0xEE );
732
733 mnTitleHeight = 18;
735 mbHighContrast = false;
736 mbUseSystemUIFonts = true;
738 mnUseFlatBorders = false;
739 mnUseFlatMenus = false;
741 mbSkipDisabledInMenus = false;
745}
746
748 : mxData(std::make_shared<ImplStyleData>())
749{
750}
751
752void
754{
755 CopyData();
756 mxData->maFaceColor = rColor;
757}
758
759const Color&
761{
762 return mxData->maFaceColor;
763}
764
765void
767{
768 CopyData();
769 mxData->maCheckedColor = rColor;
770}
771
772const Color&
774{
775 return mxData->maCheckedColor;
776}
777
778void
780{
781 CopyData();
782 mxData->maLightColor = rColor;
783}
784
785const Color&
787{
788 return mxData->maLightColor;
789}
790
791void
793{
794 CopyData();
795 mxData->maLightBorderColor = rColor;
796}
797
798const Color&
800{
801 return mxData->maLightBorderColor;
802}
803
804void
806{
807 CopyData();
808 mxData->maWarningColor = rColor;
809}
810
811const Color&
813{
814 return mxData->maWarningColor;
815}
816
817void
819{
820 CopyData();
821 mxData->maShadowColor = rColor;
822}
823
824const Color&
826{
827 return mxData->maShadowColor;
828}
829
830void
832{
833 CopyData();
834 mxData->maDarkShadowColor = rColor;
835}
836
837const Color&
839{
840 return mxData->maDarkShadowColor;
841}
842
843void
845{
846 CopyData();
847 mxData->maDefaultButtonTextColor = rColor;
848}
849
850const Color&
852{
853 return mxData->maDefaultButtonTextColor;
854}
855
856void
858{
859 CopyData();
860 mxData->maButtonTextColor = rColor;
861}
862
863const Color&
865{
866 return mxData->maButtonTextColor;
867}
868
869void
871{
872 CopyData();
873 mxData->maDefaultActionButtonTextColor = rColor;
874}
875
876const Color&
878{
879 return mxData->maDefaultActionButtonTextColor;
880}
881
882void
884{
885 CopyData();
886 mxData->maActionButtonTextColor = rColor;
887}
888
889const Color&
891{
892 return mxData->maActionButtonTextColor;
893}
894
895void
897{
898 CopyData();
899 mxData->maFlatButtonTextColor = rColor;
900}
901
902const Color&
904{
905 return mxData->maFlatButtonTextColor;
906}
907
908void
910{
911 CopyData();
912 mxData->maDefaultButtonRolloverTextColor = rColor;
913}
914
915const Color&
917{
918 return mxData->maDefaultButtonRolloverTextColor;
919}
920
921void
923{
924 CopyData();
925 mxData->maButtonRolloverTextColor = rColor;
926}
927
928const Color&
930{
931 return mxData->maButtonRolloverTextColor;
932}
933
934void
936{
937 CopyData();
938 mxData->maDefaultActionButtonRolloverTextColor = rColor;
939}
940
941const Color&
943{
944 return mxData->maDefaultActionButtonRolloverTextColor;
945}
946
947void
949{
950 CopyData();
951 mxData->maActionButtonRolloverTextColor = rColor;
952}
953
954const Color&
956{
957 return mxData->maActionButtonRolloverTextColor;
958}
959
960void
962{
963 CopyData();
964 mxData->maFlatButtonRolloverTextColor = rColor;
965}
966
967const Color&
969{
970 return mxData->maFlatButtonRolloverTextColor;
971}
972
973void
975{
976 CopyData();
977 mxData->maDefaultButtonPressedRolloverTextColor = rColor;
978}
979
980const Color&
982{
983 return mxData->maDefaultButtonPressedRolloverTextColor;
984}
985
986void
988{
989 CopyData();
990 mxData->maButtonPressedRolloverTextColor = rColor;
991}
992
993const Color&
995{
996 return mxData->maButtonPressedRolloverTextColor;
997}
998
999void
1001{
1002 CopyData();
1003 mxData->maDefaultActionButtonPressedRolloverTextColor = rColor;
1004}
1005
1006const Color&
1008{
1009 return mxData->maDefaultActionButtonPressedRolloverTextColor;
1010}
1011
1012void
1014{
1015 CopyData();
1016 mxData->maActionButtonPressedRolloverTextColor = rColor;
1017}
1018
1019const Color&
1021{
1022 return mxData->maActionButtonPressedRolloverTextColor;
1023}
1024
1025void
1027{
1028 CopyData();
1029 mxData->maFlatButtonPressedRolloverTextColor = rColor;
1030}
1031
1032const Color&
1034{
1035 return mxData->maFlatButtonPressedRolloverTextColor;
1036}
1037
1038void
1040{
1041 CopyData();
1042 mxData->maRadioCheckTextColor = rColor;
1043}
1044
1045const Color&
1047{
1048 return mxData->maRadioCheckTextColor;
1049}
1050
1051void
1053{
1054 CopyData();
1055 mxData->maGroupTextColor = rColor;
1056}
1057
1058const Color&
1060{
1061 return mxData->maGroupTextColor;
1062}
1063
1064void
1066{
1067 CopyData();
1068 mxData->maLabelTextColor = rColor;
1069}
1070
1071const Color&
1073{
1074 return mxData->maLabelTextColor;
1075}
1076
1077void
1079{
1080 CopyData();
1081 mxData->maWindowColor = rColor;
1082}
1083
1084const Color&
1086{
1087 return mxData->maWindowColor;
1088}
1089
1090void
1092{
1093 CopyData();
1094 mxData->maWindowTextColor = rColor;
1095}
1096
1097const Color&
1099{
1100 return mxData->maWindowTextColor;
1101}
1102
1103void
1105{
1106 CopyData();
1107 mxData->maDialogColor = rColor;
1108}
1109
1110const Color&
1112{
1113 return mxData->maDialogColor;
1114}
1115
1116void
1118{
1119 CopyData();
1120 mxData->maDialogTextColor = rColor;
1121}
1122
1123const Color&
1125{
1126 return mxData->maDialogTextColor;
1127}
1128
1129void
1131{
1132 CopyData();
1133 mxData->maWorkspaceColor = rColor;
1134}
1135
1136const Color&
1138{
1139 return mxData->maWorkspaceColor;
1140}
1141
1142void
1144{
1145 CopyData();
1146 mxData->maFieldColor = rColor;
1147}
1148
1149const Color&
1151{
1152 return mxData->maFieldColor;
1153}
1154
1155void
1157{
1158 CopyData();
1159 mxData->maFieldTextColor = rColor;
1160}
1161
1162const Color&
1164{
1165 return mxData->maFieldTextColor;
1166}
1167
1168void
1170{
1171 CopyData();
1172 mxData->maFieldRolloverTextColor = rColor;
1173}
1174
1175const Color&
1177{
1178 return mxData->maFieldRolloverTextColor;
1179}
1180
1181void
1183{
1184 CopyData();
1185 mxData->maActiveColor = rColor;
1186}
1187
1188const Color&
1190{
1191 return mxData->maActiveColor;
1192}
1193
1194void
1196{
1197 CopyData();
1198 mxData->maActiveTextColor = rColor;
1199}
1200
1201const Color&
1203{
1204 return mxData->maActiveTextColor;
1205}
1206
1207void
1209{
1210 CopyData();
1211 mxData->maActiveBorderColor = rColor;
1212}
1213
1214const Color&
1216{
1217 return mxData->maActiveBorderColor;
1218}
1219
1220void
1222{
1223 CopyData();
1224 mxData->maDeactiveColor = rColor;
1225}
1226
1227const Color&
1229{
1230 return mxData->maDeactiveColor;
1231}
1232
1233void
1235{
1236 CopyData();
1237 mxData->maDeactiveTextColor = rColor;
1238}
1239
1240const Color&
1242{
1243 return mxData->maDeactiveTextColor;
1244}
1245
1246void
1248{
1249 CopyData();
1250 mxData->maDeactiveBorderColor = rColor;
1251}
1252
1253const Color&
1255{
1256 return mxData->maDeactiveBorderColor;
1257}
1258
1259void
1261{
1262 CopyData();
1263 mxData->maAccentColor = rColor;
1264}
1265
1266const Color&
1268{
1269 return mxData->maAccentColor;
1270}
1271
1272void
1274{
1275 CopyData();
1276 mxData->maHighlightColor = rColor;
1277}
1278
1279const Color&
1281{
1282 return mxData->maHighlightColor;
1283}
1284
1285void
1287{
1288 CopyData();
1289 mxData->maHighlightTextColor = rColor;
1290}
1291
1292const Color&
1294{
1295 return mxData->maHighlightTextColor;
1296}
1297
1298void
1300{
1301 CopyData();
1302 mxData->maDisableColor = rColor;
1303}
1304
1305const Color&
1307{
1308 return mxData->maDisableColor;
1309}
1310
1311void
1313{
1314 CopyData();
1315 mxData->maHelpColor = rColor;
1316}
1317
1318const Color&
1320{
1321 return mxData->maHelpColor;
1322}
1323
1324void
1326{
1327 CopyData();
1328 mxData->maHelpTextColor = rColor;
1329}
1330
1331const Color&
1333{
1334 return mxData->maHelpTextColor;
1335}
1336
1337void
1339{
1340 CopyData();
1341 mxData->maMenuColor = rColor;
1342}
1343
1344const Color&
1346{
1347 return mxData->maMenuColor;
1348}
1349
1350void
1352{
1353 CopyData();
1354 mxData->maMenuBarColor = rColor;
1355}
1356
1357const Color&
1359{
1360 return mxData->maMenuBarColor;
1361}
1362
1363void
1365{
1366 CopyData();
1367 mxData->maMenuBarRolloverColor = rColor;
1368}
1369
1370const Color&
1372{
1373 return mxData->maMenuBarRolloverColor;
1374}
1375
1376void
1378{
1379 CopyData();
1380 mxData->maMenuBorderColor = rColor;
1381}
1382
1383const Color&
1385{
1386 return mxData->maMenuBorderColor;
1387}
1388
1389void
1391{
1392 CopyData();
1393 mxData->maMenuTextColor = rColor;
1394}
1395
1396const Color&
1398{
1399 return mxData->maMenuTextColor;
1400}
1401
1402void
1404{
1405 CopyData();
1406 mxData->maMenuBarTextColor = rColor;
1407}
1408
1409const Color&
1411{
1412 return mxData->maMenuBarTextColor;
1413}
1414
1415void
1417{
1418 CopyData();
1419 mxData->maMenuBarRolloverTextColor = rColor;
1420}
1421
1422const Color&
1424{
1425 return mxData->maMenuBarRolloverTextColor;
1426}
1427
1428void
1430{
1431 CopyData();
1432 mxData->maMenuBarHighlightTextColor = rColor;
1433}
1434
1435const Color&
1437{
1438 return mxData->maMenuBarHighlightTextColor;
1439}
1440
1441void
1443{
1444 CopyData();
1445 mxData->maMenuHighlightColor = rColor;
1446}
1447
1448const Color&
1450{
1451 return mxData->maMenuHighlightColor;
1452}
1453
1454void
1456{
1457 CopyData();
1458 mxData->maMenuHighlightTextColor = rColor;
1459}
1460
1461const Color&
1463{
1464 return mxData->maMenuHighlightTextColor;
1465}
1466
1467void
1469{
1470 CopyData();
1471 mxData->maListBoxWindowBackgroundColor = rColor;
1472}
1473
1474const Color&
1476{
1477 return mxData->maListBoxWindowBackgroundColor;
1478}
1479
1480void
1482{
1483 CopyData();
1484 mxData->maListBoxWindowTextColor = rColor;
1485}
1486
1487const Color&
1489{
1490 return mxData->maListBoxWindowTextColor;
1491}
1492
1493void
1495{
1496 CopyData();
1497 mxData->maListBoxWindowHighlightColor = rColor;
1498}
1499
1500const Color&
1502{
1503 return mxData->maListBoxWindowHighlightColor;
1504}
1505
1506void
1508{
1509 CopyData();
1510 mxData->maListBoxWindowHighlightTextColor = rColor;
1511}
1512
1513const Color&
1515{
1516 return mxData->maListBoxWindowHighlightTextColor;
1517}
1518
1519void
1521{
1522 CopyData();
1523 mxData->maTabTextColor = rColor;
1524}
1525
1526const Color&
1528{
1529 return mxData->maTabTextColor;
1530}
1531
1532void
1534{
1535 CopyData();
1536 mxData->maTabRolloverTextColor = rColor;
1537}
1538
1539const Color&
1541{
1542 return mxData->maTabRolloverTextColor;
1543}
1544
1545void
1547{
1548 CopyData();
1549 mxData->maTabHighlightTextColor = rColor;
1550}
1551
1552const Color&
1554{
1555 return mxData->maTabHighlightTextColor;
1556}
1557
1558void
1560{
1561 CopyData();
1562 mxData->maLinkColor = rColor;
1563}
1564
1565const Color&
1567{
1568 return mxData->maLinkColor;
1569}
1570
1571void
1573{
1574 CopyData();
1575 mxData->maVisitedLinkColor = rColor;
1576}
1577
1578const Color&
1580{
1581 return mxData->maVisitedLinkColor;
1582}
1583
1584void
1586{
1587 CopyData();
1588 mxData->maToolTextColor = rColor;
1589}
1590
1591const Color&
1593{
1594 return mxData->maToolTextColor;
1595}
1596
1597void
1599{
1600 CopyData();
1601 mxData->maMonoColor = rColor;
1602}
1603
1604const Color&
1606{
1607 return mxData->maMonoColor;
1608}
1609
1610void
1612{
1613 CopyData();
1614 mxData->maActiveTabColor = rColor;
1615}
1616
1617const Color&
1619{
1620 return mxData->maActiveTabColor;
1621}
1622
1623void
1625{
1626 CopyData();
1627 mxData->maInactiveTabColor = rColor;
1628}
1629
1630const Color&
1632{
1633 return mxData->maInactiveTabColor;
1634}
1635
1637{
1638 CopyData();
1639 mxData->maAlternatingRowColor = rColor;
1640}
1641
1642const Color&
1644{
1645 return mxData->maAlternatingRowColor;
1646}
1647
1648void
1649StyleSettings::SetUseSystemUIFonts( bool bUseSystemUIFonts )
1650{
1651 CopyData();
1652 mxData->mbUseSystemUIFonts = bUseSystemUIFonts;
1653}
1654
1655bool
1657{
1658 return mxData->mbUseSystemUIFonts;
1659}
1660
1661void StyleSettings::SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
1662{
1663 CopyData();
1664 mxData->mbUseFontAAFromSystem = bUseFontAAFromSystem;
1665}
1666
1668{
1669 return mxData->mbUseFontAAFromSystem;
1670}
1671
1672void
1674{
1675 CopyData();
1676 mxData->mnUseFlatBorders = bUseFlatBorders;
1677}
1678
1679bool
1681{
1682 return mxData->mnUseFlatBorders;
1683}
1684
1685void
1687{
1688 CopyData();
1689 mxData->mnUseFlatMenus = bUseFlatMenus;
1690}
1691
1692bool
1694{
1695 return mxData->mnUseFlatMenus;
1696}
1697
1698void
1700{
1701 CopyData();
1702 mxData->meUseImagesInMenus = eUseImagesInMenus;
1703}
1704
1705void
1706StyleSettings::SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus )
1707{
1708 CopyData();
1709 mxData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus;
1710}
1711
1712bool
1714{
1715 return mxData->mbPreferredUseImagesInMenus;
1716}
1717
1718void
1719StyleSettings::SetSkipDisabledInMenus( bool bSkipDisabledInMenus )
1720{
1721 CopyData();
1722 mxData->mbSkipDisabledInMenus = bSkipDisabledInMenus;
1723}
1724
1725bool
1727{
1728 return mxData->mbSkipDisabledInMenus;
1729}
1730
1731void
1732StyleSettings::SetHideDisabledMenuItems( bool bHideDisabledMenuItems )
1733{
1734 CopyData();
1735 mxData->mbHideDisabledMenuItems = bHideDisabledMenuItems;
1736}
1737
1738bool
1740{
1741 return mxData->mbHideDisabledMenuItems;
1742}
1743
1744void
1746{
1747 CopyData();
1748 mxData->meContextMenuShortcuts = eContextMenuShortcuts;
1749}
1750
1751bool
1753{
1754 switch (mxData->meContextMenuShortcuts)
1755 {
1756 case TRISTATE_FALSE:
1757 return false;
1758 case TRISTATE_TRUE:
1759 return true;
1760 default: // TRISTATE_INDET:
1762 }
1763}
1764
1765void
1767{
1768 CopyData();
1769 mxData->mbPreferredContextMenuShortcuts = bContextMenuShortcuts;
1770}
1771
1772bool
1774{
1775 return mxData->mbPreferredContextMenuShortcuts;
1776}
1777
1778void
1779StyleSettings::SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider )
1780{
1781 CopyData();
1782 mxData->mbPrimaryButtonWarpsSlider = bPrimaryButtonWarpsSlider;
1783}
1784
1785bool
1787{
1788 return mxData->mbPrimaryButtonWarpsSlider;
1789}
1790
1791void
1793{
1794 CopyData();
1795 mxData->maAppFont = rFont;
1796}
1797
1798const vcl::Font&
1800{
1801 return mxData->maAppFont;
1802}
1803
1804void
1806{
1807 CopyData();
1808 mxData->maHelpFont = rFont;
1809}
1810
1811const vcl::Font&
1813{
1814 return mxData->maHelpFont;
1815}
1816
1817void
1819{
1820 CopyData();
1821 mxData->maTitleFont = rFont;
1822}
1823
1824const vcl::Font&
1826{
1827 return mxData->maTitleFont;
1828}
1829
1830void
1832{
1833 CopyData();
1834 mxData->maFloatTitleFont = rFont;
1835}
1836
1837const vcl::Font&
1839{
1840 return mxData->maFloatTitleFont;
1841}
1842
1843void
1845{
1846 CopyData();
1847 mxData->maMenuFont = rFont;
1848}
1849
1850const vcl::Font&
1852{
1853 return mxData->maMenuFont;
1854}
1855
1856void
1858{
1859 CopyData();
1860 mxData->maToolFont = rFont;
1861}
1862
1863const vcl::Font&
1865{
1866 return mxData->maToolFont;
1867}
1868
1869void
1871{
1872 CopyData();
1873 mxData->maGroupFont = rFont;
1874}
1875
1876const vcl::Font&
1878{
1879 return mxData->maGroupFont;
1880}
1881
1882void
1884{
1885 CopyData();
1886 mxData->maLabelFont = rFont;
1887}
1888
1889const vcl::Font&
1891{
1892 return mxData->maLabelFont;
1893}
1894
1895void
1897{
1898 CopyData();
1899 mxData->maRadioCheckFont = rFont;
1900}
1901
1902const vcl::Font&
1904{
1905 return mxData->maRadioCheckFont;
1906}
1907
1908void
1910{
1911 CopyData();
1912 mxData->maPushButtonFont = rFont;
1913}
1914
1915const vcl::Font&
1917{
1918 return mxData->maPushButtonFont;
1919}
1920
1921void
1923{
1924 CopyData();
1925 mxData->maFieldFont = rFont;
1926}
1927
1928const vcl::Font&
1930{
1931 return mxData->maFieldFont;
1932}
1933
1934void
1936{
1937 CopyData();
1938 mxData->maIconFont = rFont;
1939}
1940
1941const vcl::Font&
1943{
1944 return mxData->maIconFont;
1945}
1946
1947void
1949{
1950 CopyData();
1951 mxData->maTabFont = rFont;
1952}
1953
1954const vcl::Font&
1956{
1957 return mxData->maTabFont;
1958}
1959
1960sal_Int32
1962{
1963 return 1;
1964}
1965
1966void
1968{
1969 CopyData();
1970 mxData->mnTitleHeight = nSize;
1971}
1972
1973sal_Int32
1975{
1976 return mxData->mnTitleHeight;
1977}
1978
1979void
1981{
1982 CopyData();
1983 mxData->mnFloatTitleHeight = nSize;
1984}
1985
1986sal_Int32
1988{
1989 return mxData->mnFloatTitleHeight;
1990}
1991
1992void
1994{
1995 CopyData();
1996 mxData->mnScrollBarSize = nSize;
1997}
1998
1999sal_Int32
2001{
2002 return mxData->mnScrollBarSize;
2003}
2004
2005void
2007{
2008 CopyData();
2009 mxData->mnMinThumbSize = nSize;
2010}
2011
2012sal_Int32
2014{
2015 return mxData->mnMinThumbSize;
2016}
2017
2018void
2020{
2021 CopyData();
2022 mxData->mnSpinSize = nSize;
2023}
2024
2025sal_Int32
2027{
2028 return mxData->mnSpinSize;
2029}
2030
2031sal_Int32
2033{
2034 return 3;
2035}
2036
2037void
2039{
2040 CopyData();
2041 mxData->mnCursorSize = nSize;
2042}
2043
2044sal_Int32
2046{
2047 return mxData->mnCursorSize;
2048}
2049
2050void
2052{
2053 CopyData();
2054 mxData->mnCursorBlinkTime = nBlinkTime;
2055}
2056
2057sal_uInt64
2059{
2060 return mxData->mnCursorBlinkTime;
2061}
2062
2063void
2065{
2066 CopyData();
2067 mxData->mnDragFullOptions = nOptions;
2068}
2069
2072{
2073 return mxData->mnDragFullOptions;
2074}
2075
2076void
2078{
2079 CopyData();
2080 mxData->mnSelectionOptions = nOptions;
2081}
2082
2085{
2086 return mxData->mnSelectionOptions;
2087}
2088
2089void
2091{
2092 CopyData();
2093 mxData->mnDisplayOptions = nOptions;
2094}
2095
2098{
2099 return mxData->mnDisplayOptions;
2100}
2101
2102void
2104{
2105 CopyData();
2106 mxData->mnAntialiasedMin = nMinPixel;
2107}
2108
2109sal_Int32
2111{
2112 return mxData->mnAntialiasedMin;
2113}
2114
2115void
2117{
2118 CopyData();
2119 mxData->mnOptions = nOptions;
2120}
2121
2122void
2124{
2125 CopyData();
2126 mxData->mbAutoMnemonic = bAutoMnemonic;
2127}
2128
2129bool
2131{
2132 return mxData->mbAutoMnemonic;
2133}
2134
2135bool
2137{
2138 ImplSVData* pSVData = ImplGetSVData();
2140}
2141
2142void
2144{
2145 CopyData();
2146 mxData->mnToolbarIconSize = nSize;
2147}
2148
2151{
2152 return mxData->mnToolbarIconSize;
2153}
2154
2156{
2157 switch (GetToolbarIconSize())
2158 {
2160 return Size(24, 24);
2162 return Size(32, 32);
2164 default:
2165 return Size(16, 16);
2166 }
2167}
2168
2169const DialogStyle&
2171{
2172 return mxData->maDialogStyle;
2173}
2174
2175void
2177{
2178 CopyData();
2179 mxData->mnEdgeBlending = nCount;
2180}
2181
2182sal_uInt16
2184{
2185 return mxData->mnEdgeBlending;
2186}
2187
2188const Color&
2190{
2191 return mxData->maEdgeBlendingTopLeftColor;
2192}
2193
2194const Color&
2196{
2197 return mxData->maEdgeBlendingBottomRightColor;
2198}
2199
2200void
2202{
2203 CopyData();
2204 mxData->mnListBoxMaximumLineCount = nCount;
2205}
2206
2207sal_uInt16
2209{
2210 return mxData->mnListBoxMaximumLineCount;
2211}
2212
2213void
2215{
2216 CopyData();
2217 mxData->mnColorValueSetColumnCount = nCount;
2218}
2219
2220sal_uInt16
2222{
2223 return mxData->mnColorValueSetColumnCount;
2224}
2225
2226sal_uInt16
2228{
2229 return 1;
2230}
2231
2232void
2234{
2235 CopyData();
2236 mxData->mbPreviewUsesCheckeredBackground = bNew;
2237}
2238
2239bool
2241{
2242 return mxData->mbPreviewUsesCheckeredBackground;
2243}
2244
2245bool
2247{
2248 return !(*this == rSet);
2249}
2250
2252{
2253 mxData->maListBoxPreviewDefaultLogicSize = rSize;
2254}
2255
2257{
2258 if(0 == mxData->maListBoxPreviewDefaultPixelSize.Width() || 0 == mxData->maListBoxPreviewDefaultPixelSize.Height())
2259 {
2260 const_cast< StyleSettings* >(this)->mxData->maListBoxPreviewDefaultPixelSize =
2261 Application::GetDefaultDevice()->LogicToPixel(mxData->maListBoxPreviewDefaultLogicSize, MapMode(MapUnit::MapAppFont));
2262 }
2263
2264 return mxData->maListBoxPreviewDefaultPixelSize;
2265}
2266
2268{
2269 CopyData();
2270 mxData->maFaceColor = rColor;
2271 mxData->maLightBorderColor = rColor;
2272 mxData->maMenuBorderColor = rColor;
2273 mxData->maDarkShadowColor = COL_BLACK;
2274 if ( rColor != COL_LIGHTGRAY )
2275 {
2276 mxData->maLightColor = rColor;
2277 mxData->maShadowColor = rColor;
2278 mxData->maDarkShadowColor = rColor;
2279
2280 if (!rColor.IsDark())
2281 {
2282 mxData->maLightColor.IncreaseLuminance(64);
2283 mxData->maShadowColor.DecreaseLuminance(64);
2284 mxData->maDarkShadowColor.DecreaseLuminance(100);
2285 }
2286 else
2287 {
2288 mxData->maLightColor.DecreaseLuminance(64);
2289 mxData->maShadowColor.IncreaseLuminance(64);
2290 mxData->maDarkShadowColor.IncreaseLuminance(100);
2291 }
2292
2293 sal_uInt8 nRed = (mxData->maLightColor.GetRed() + mxData->maShadowColor.GetRed()) / 2;
2294 sal_uInt8 nGreen = (mxData->maLightColor.GetGreen() + mxData->maShadowColor.GetGreen()) / 2;
2295 sal_uInt8 nBlue = (mxData->maLightColor.GetBlue() + mxData->maShadowColor.GetBlue()) / 2;
2296 mxData->maCheckedColor = Color(nRed, nGreen, nBlue);
2297 }
2298 else
2299 {
2300 mxData->maCheckedColor = Color( 0x99, 0x99, 0x99 );
2301 mxData->maLightColor = COL_WHITE;
2302 mxData->maShadowColor = COL_GRAY;
2303 }
2304}
2305
2307{
2308 CopyData();
2309 // Light gray checked color special case
2310 if ( GetFaceColor() == COL_LIGHTGRAY )
2311 mxData->maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
2312 else
2313 {
2314 sal_uInt8 nRed = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetRed()) + static_cast<sal_uInt16>(mxData->maLightColor.GetRed()))/2);
2315 sal_uInt8 nGreen = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetGreen()) + static_cast<sal_uInt16>(mxData->maLightColor.GetGreen()))/2);
2316 sal_uInt8 nBlue = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetBlue()) + static_cast<sal_uInt16>(mxData->maLightColor.GetBlue()))/2);
2317 mxData->maCheckedColor = Color( nRed, nGreen, nBlue );
2318 }
2319}
2320
2322{
2323 // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
2324 switch (mxData->meUseImagesInMenus) {
2325 case TRISTATE_FALSE:
2326 return false;
2327 case TRISTATE_TRUE:
2328 return true;
2329 default: // TRISTATE_INDET:
2331 }
2332}
2333
2334static BitmapEx readBitmapEx( const OUString& rPath )
2335{
2336 OUString aPath( rPath );
2337 rtl::Bootstrap::expandMacros( aPath );
2338
2339 // import the image
2340 Graphic aGraphic;
2341 if ( GraphicFilter::LoadGraphic( aPath, OUString(), aGraphic ) != ERRCODE_NONE )
2342 return BitmapEx();
2343 return aGraphic.GetBitmapEx();
2344}
2345
2346namespace {
2347
2348enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
2349
2350}
2351
2353static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, std::optional<Color>& rMenuBarTextColor )
2354{
2355 // don't burn time loading images we don't need.
2357 return;
2358
2359 // read from the configuration
2360 OUString aPersona( officecfg::Office::Common::Misc::Persona::get() );
2361 OUString aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get() );
2362
2363 // have the settings changed? marks if header /footer prepared before
2364 //should maybe extended to a flag that marks if header /footer /both are loaded
2365 OUString aOldValue= eWhich==PERSONA_HEADER?OUString(aPersona + ";" + aPersonaSettings+";h" ):OUString(aPersona + ";" + aPersonaSettings+";f" );
2366 if ( rHeaderFooter == aOldValue )
2367 return;
2368
2369 rHeaderFooter = aOldValue;
2370 rHeaderFooterBitmap = BitmapEx();
2371 rMenuBarTextColor.reset();
2372
2373 // now read the new values and setup bitmaps
2374 OUString aHeader, aFooter;
2375 if ( aPersona == "own" || aPersona == "default" )
2376 {
2377 sal_Int32 nIndex = 0;
2378
2379 // Skip the persona slug, name, and preview
2380 aHeader = aPersonaSettings.getToken( 3, ';', nIndex );
2381
2382 if ( nIndex > 0 )
2383 aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
2384
2385 // change menu text color, advance nIndex to skip the '#'
2386 if ( nIndex > 0 )
2387 {
2388 OUString aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
2389 rMenuBarTextColor = Color( ColorTransparency, aColor.toUInt32( 16 ) );
2390 }
2391 }
2392
2393 OUString aName;
2394 switch ( eWhich ) {
2395 case PERSONA_HEADER: aName = aHeader; break;
2396 case PERSONA_FOOTER: aName = aFooter; break;
2397 }
2398
2399 if ( !aName.isEmpty() )
2400 {
2401 OUString gallery("");
2402 // try the gallery first, then the program path:
2403 if ( aPersona == "own" && !aPersonaSettings.startsWith( "vnd.sun.star.expand" ) )
2404 {
2405 gallery = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
2406 rtl::Bootstrap::expandMacros( gallery );
2407 gallery += "/user/gallery/personas/";
2408 }
2409 else if ( aPersona == "default" )
2410 {
2411 gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/";
2412 }
2413 rHeaderFooterBitmap = readBitmapEx( gallery + aName );
2414
2415 if ( rHeaderFooterBitmap.IsEmpty() )
2416 rHeaderFooterBitmap = readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" + aName );
2417 }
2418
2419 // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
2420
2421 if( rHeaderFooterBitmap.IsEmpty() )
2422 {
2423 std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
2424 officecfg::Office::Common::Misc::Persona::set( "no", batch );
2425 officecfg::Office::Common::Misc::PersonaSettings::set( "", batch );
2426 batch->commit();
2427 }
2428}
2429
2431{
2432 setupPersonaHeaderFooter( PERSONA_HEADER, mxData->maPersonaHeaderFooter, mxData->maPersonaHeaderBitmap, mxData->maPersonaMenuBarTextColor );
2433 return mxData->maPersonaHeaderBitmap;
2434}
2435
2437{
2438 setupPersonaHeaderFooter( PERSONA_FOOTER, mxData->maPersonaHeaderFooter, mxData->maPersonaFooterBitmap, mxData->maPersonaMenuBarTextColor );
2439 return mxData->maPersonaFooterBitmap;
2440}
2441
2442const std::optional<Color>& StyleSettings::GetPersonaMenuBarTextColor() const
2443{
2445 return mxData->maPersonaMenuBarTextColor;
2446}
2447
2449{
2450 CopyData();
2451 mxData->SetStandardStyles();
2452}
2453
2455{
2456 // compute a brighter face color that can be used in gradients
2457 // for a convex look (eg toolbars)
2458
2459 sal_uInt16 h, s, b;
2460 GetFaceColor().RGBtoHSB( h, s, b );
2461 if( s > 1) s=1;
2462 if( b < 98) b=98;
2463 return Color::HSBtoRGB( h, s, b );
2464}
2465
2467{
2468 // compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
2469 sal_uInt16 h, s, b;
2470 GetShadowColor().RGBtoHSB( h, s, b );
2471 b += b/4;
2472 s -= s/4;
2473 return Color::HSBtoRGB( h, s, b );
2474}
2475
2477{
2478 // copy if other references exist
2479 if (mxData.use_count() > 1)
2480 {
2481 mxData = std::make_shared<ImplStyleData>(*mxData);
2482 }
2483}
2484
2486{
2487 if ( mxData == rSet.mxData )
2488 return true;
2489
2490 if (mxData->mIconTheme != rSet.mxData->mIconTheme) {
2491 return false;
2492 }
2493
2494 if (*mxData->mIconThemeSelector != *rSet.mxData->mIconThemeSelector) {
2495 return false;
2496 }
2497
2498 return (mxData->mnOptions == rSet.mxData->mnOptions) &&
2499 (mxData->mbAutoMnemonic == rSet.mxData->mbAutoMnemonic) &&
2500 (mxData->mnDragFullOptions == rSet.mxData->mnDragFullOptions) &&
2501 (mxData->mnSelectionOptions == rSet.mxData->mnSelectionOptions) &&
2502 (mxData->mnDisplayOptions == rSet.mxData->mnDisplayOptions) &&
2503 (mxData->mnCursorSize == rSet.mxData->mnCursorSize) &&
2504 (mxData->mnCursorBlinkTime == rSet.mxData->mnCursorBlinkTime) &&
2505 (mxData->mnTitleHeight == rSet.mxData->mnTitleHeight) &&
2506 (mxData->mnFloatTitleHeight == rSet.mxData->mnFloatTitleHeight) &&
2507 (mxData->mnScrollBarSize == rSet.mxData->mnScrollBarSize) &&
2508 (mxData->mnMinThumbSize == rSet.mxData->mnMinThumbSize) &&
2509 (mxData->mnSpinSize == rSet.mxData->mnSpinSize) &&
2510 (mxData->mnAntialiasedMin == rSet.mxData->mnAntialiasedMin) &&
2511 (mxData->mbHighContrast == rSet.mxData->mbHighContrast) &&
2512 (mxData->mbUseSystemUIFonts == rSet.mxData->mbUseSystemUIFonts) &&
2513 (mxData->mbUseFontAAFromSystem == rSet.mxData->mbUseFontAAFromSystem) &&
2514 (mxData->mnUseFlatBorders == rSet.mxData->mnUseFlatBorders) &&
2515 (mxData->mnUseFlatMenus == rSet.mxData->mnUseFlatMenus) &&
2516 (mxData->maFaceColor == rSet.mxData->maFaceColor) &&
2517 (mxData->maCheckedColor == rSet.mxData->maCheckedColor) &&
2518 (mxData->maLightColor == rSet.mxData->maLightColor) &&
2519 (mxData->maLightBorderColor == rSet.mxData->maLightBorderColor) &&
2520 (mxData->maShadowColor == rSet.mxData->maShadowColor) &&
2521 (mxData->maDarkShadowColor == rSet.mxData->maDarkShadowColor) &&
2522 (mxData->maWarningColor == rSet.mxData->maWarningColor) &&
2523 (mxData->maButtonTextColor == rSet.mxData->maButtonTextColor) &&
2524 (mxData->maDefaultActionButtonTextColor == rSet.mxData->maDefaultActionButtonTextColor) &&
2525 (mxData->maActionButtonTextColor == rSet.mxData->maActionButtonTextColor) &&
2526 (mxData->maButtonRolloverTextColor == rSet.mxData->maButtonRolloverTextColor) &&
2527 (mxData->maActionButtonRolloverTextColor == rSet.mxData->maActionButtonRolloverTextColor) &&
2528 (mxData->maRadioCheckTextColor == rSet.mxData->maRadioCheckTextColor) &&
2529 (mxData->maGroupTextColor == rSet.mxData->maGroupTextColor) &&
2530 (mxData->maLabelTextColor == rSet.mxData->maLabelTextColor) &&
2531 (mxData->maWindowColor == rSet.mxData->maWindowColor) &&
2532 (mxData->maWindowTextColor == rSet.mxData->maWindowTextColor) &&
2533 (mxData->maDialogColor == rSet.mxData->maDialogColor) &&
2534 (mxData->maDialogTextColor == rSet.mxData->maDialogTextColor) &&
2535 (mxData->maWorkspaceColor == rSet.mxData->maWorkspaceColor) &&
2536 (mxData->maMonoColor == rSet.mxData->maMonoColor) &&
2537 (mxData->maFieldColor == rSet.mxData->maFieldColor) &&
2538 (mxData->maFieldTextColor == rSet.mxData->maFieldTextColor) &&
2539 (mxData->maActiveColor == rSet.mxData->maActiveColor) &&
2540 (mxData->maActiveTextColor == rSet.mxData->maActiveTextColor) &&
2541 (mxData->maActiveBorderColor == rSet.mxData->maActiveBorderColor) &&
2542 (mxData->maDeactiveColor == rSet.mxData->maDeactiveColor) &&
2543 (mxData->maDeactiveTextColor == rSet.mxData->maDeactiveTextColor) &&
2544 (mxData->maDeactiveBorderColor == rSet.mxData->maDeactiveBorderColor) &&
2545 (mxData->maMenuColor == rSet.mxData->maMenuColor) &&
2546 (mxData->maMenuBarColor == rSet.mxData->maMenuBarColor) &&
2547 (mxData->maMenuBarRolloverColor == rSet.mxData->maMenuBarRolloverColor) &&
2548 (mxData->maMenuBorderColor == rSet.mxData->maMenuBorderColor) &&
2549 (mxData->maMenuTextColor == rSet.mxData->maMenuTextColor) &&
2550 (mxData->maListBoxWindowBackgroundColor == rSet.mxData->maListBoxWindowBackgroundColor) &&
2551 (mxData->maListBoxWindowTextColor == rSet.mxData->maListBoxWindowTextColor) &&
2552 (mxData->maListBoxWindowHighlightColor == rSet.mxData->maListBoxWindowHighlightColor) &&
2553 (mxData->maListBoxWindowHighlightTextColor == rSet.mxData->maListBoxWindowHighlightTextColor) &&
2554 (mxData->maMenuBarTextColor == rSet.mxData->maMenuBarTextColor) &&
2555 (mxData->maMenuBarRolloverTextColor == rSet.mxData->maMenuBarRolloverTextColor) &&
2556 (mxData->maMenuHighlightColor == rSet.mxData->maMenuHighlightColor) &&
2557 (mxData->maMenuHighlightTextColor == rSet.mxData->maMenuHighlightTextColor) &&
2558 (mxData->maAccentColor == rSet.mxData->maAccentColor) &&
2559 (mxData->maHighlightColor == rSet.mxData->maHighlightColor) &&
2560 (mxData->maHighlightTextColor == rSet.mxData->maHighlightTextColor) &&
2561 (mxData->maTabTextColor == rSet.mxData->maTabTextColor) &&
2562 (mxData->maTabRolloverTextColor == rSet.mxData->maTabRolloverTextColor) &&
2563 (mxData->maTabHighlightTextColor == rSet.mxData->maTabHighlightTextColor) &&
2564 (mxData->maActiveTabColor == rSet.mxData->maActiveTabColor) &&
2565 (mxData->maInactiveTabColor == rSet.mxData->maInactiveTabColor) &&
2566 (mxData->maDisableColor == rSet.mxData->maDisableColor) &&
2567 (mxData->maHelpColor == rSet.mxData->maHelpColor) &&
2568 (mxData->maHelpTextColor == rSet.mxData->maHelpTextColor) &&
2569 (mxData->maLinkColor == rSet.mxData->maLinkColor) &&
2570 (mxData->maVisitedLinkColor == rSet.mxData->maVisitedLinkColor) &&
2571 (mxData->maToolTextColor == rSet.mxData->maToolTextColor) &&
2572 (mxData->maAppFont == rSet.mxData->maAppFont) &&
2573 (mxData->maHelpFont == rSet.mxData->maHelpFont) &&
2574 (mxData->maTitleFont == rSet.mxData->maTitleFont) &&
2575 (mxData->maFloatTitleFont == rSet.mxData->maFloatTitleFont) &&
2576 (mxData->maMenuFont == rSet.mxData->maMenuFont) &&
2577 (mxData->maToolFont == rSet.mxData->maToolFont) &&
2578 (mxData->maGroupFont == rSet.mxData->maGroupFont) &&
2579 (mxData->maLabelFont == rSet.mxData->maLabelFont) &&
2580 (mxData->maRadioCheckFont == rSet.mxData->maRadioCheckFont) &&
2581 (mxData->maPushButtonFont == rSet.mxData->maPushButtonFont) &&
2582 (mxData->maFieldFont == rSet.mxData->maFieldFont) &&
2583 (mxData->maIconFont == rSet.mxData->maIconFont) &&
2584 (mxData->maTabFont == rSet.mxData->maTabFont) &&
2585 (mxData->meUseImagesInMenus == rSet.mxData->meUseImagesInMenus) &&
2586 (mxData->mbPreferredUseImagesInMenus == rSet.mxData->mbPreferredUseImagesInMenus) &&
2587 (mxData->mbSkipDisabledInMenus == rSet.mxData->mbSkipDisabledInMenus) &&
2588 (mxData->mbHideDisabledMenuItems == rSet.mxData->mbHideDisabledMenuItems) &&
2589 (mxData->mbPreferredContextMenuShortcuts == rSet.mxData->mbPreferredContextMenuShortcuts)&&
2590 (mxData->meContextMenuShortcuts == rSet.mxData->meContextMenuShortcuts) &&
2591 (mxData->mbPrimaryButtonWarpsSlider == rSet.mxData->mbPrimaryButtonWarpsSlider) &&
2592 (mxData->mnEdgeBlending == rSet.mxData->mnEdgeBlending) &&
2593 (mxData->maEdgeBlendingTopLeftColor == rSet.mxData->maEdgeBlendingTopLeftColor) &&
2594 (mxData->maEdgeBlendingBottomRightColor == rSet.mxData->maEdgeBlendingBottomRightColor) &&
2595 (mxData->mnListBoxMaximumLineCount == rSet.mxData->mnListBoxMaximumLineCount) &&
2596 (mxData->mnColorValueSetColumnCount == rSet.mxData->mnColorValueSetColumnCount) &&
2597 (mxData->maListBoxPreviewDefaultLogicSize == rSet.mxData->maListBoxPreviewDefaultLogicSize) &&
2598 (mxData->maListBoxPreviewDefaultPixelSize == rSet.mxData->maListBoxPreviewDefaultPixelSize) &&
2599 (mxData->mbPreviewUsesCheckeredBackground == rSet.mxData->mbPreviewUsesCheckeredBackground);
2600}
2601
2603 mnEnableATT(TRISTATE_INDET),
2604 mnDisablePrinting(TRISTATE_INDET)
2605{
2606 static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
2607 mbEnableLocalizedDecimalSep = (pEnv != nullptr);
2608}
2609
2611 : mxData(std::make_shared<ImplMiscData>())
2612{
2613}
2614
2616{
2617 if ( mxData == rSet.mxData )
2618 return true;
2619
2620 return (mxData->mnEnableATT == rSet.mxData->mnEnableATT ) &&
2621 (mxData->mnDisablePrinting == rSet.mxData->mnDisablePrinting ) &&
2622 (mxData->mbEnableLocalizedDecimalSep == rSet.mxData->mbEnableLocalizedDecimalSep );
2623}
2624
2625bool
2627{
2628 return !(*this == rSet);
2629}
2630
2632{
2633 if( mxData->mnDisablePrinting == TRISTATE_INDET )
2634 {
2635 OUString aEnable =
2637 getValue( "DesktopManagement",
2638 "DisablePrinting" );
2639 mxData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2640 }
2641
2642 return mxData->mnDisablePrinting != TRISTATE_FALSE;
2643}
2644
2646{
2647
2648#ifdef _WIN32
2649 if( mxData->mnEnableATT == TRISTATE_INDET )
2650 {
2651 // Check in the Windows registry if an AT tool wants Accessibility support to
2652 // be activated ..
2653 HKEY hkey;
2654
2655 if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2656 L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2657 &hkey) )
2658 {
2659 DWORD dwType;
2660 wchar_t Data[6]; // possible values: "true", "false", "1", "0", DWORD
2661 DWORD cbData = sizeof(Data);
2662
2663 if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2664 nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2665 {
2666 switch (dwType)
2667 {
2668 case REG_SZ:
2669 mxData->mnEnableATT = ((0 == wcsicmp(Data, L"1")) || (0 == wcsicmp(Data, L"true"))) ? TRISTATE_TRUE : TRISTATE_FALSE;
2670 break;
2671 case REG_DWORD:
2672 switch (reinterpret_cast<DWORD *>(Data)[0]) {
2673 case 0:
2674 mxData->mnEnableATT = TRISTATE_FALSE;
2675 break;
2676 case 1:
2677 mxData->mnEnableATT = TRISTATE_TRUE;
2678 break;
2679 default:
2680 mxData->mnEnableATT = TRISTATE_INDET;
2681 //TODO: or TRISTATE_TRUE?
2682 break;
2683 }
2684 break;
2685 default:
2686 // Unsupported registry type
2687 break;
2688 }
2689 }
2690
2691 RegCloseKey(hkey);
2692 }
2693 }
2694#endif
2695
2696 if( mxData->mnEnableATT == TRISTATE_INDET )
2697 {
2698 static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
2699 if( !pEnv || !*pEnv )
2700 {
2701 OUString aEnable =
2703 getValue( "Accessibility",
2704 "EnableATToolSupport" );
2705 mxData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2706 }
2707 else
2708 {
2709 mxData->mnEnableATT = TRISTATE_TRUE;
2710 }
2711 }
2712
2713 return mxData->mnEnableATT != TRISTATE_FALSE;
2714}
2715
2716#ifdef _WIN32
2717void MiscSettings::SetEnableATToolSupport( bool bEnable )
2718{
2719 if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mxData->mnEnableATT )
2720 {
2721 if( bEnable && !ImplInitAccessBridge() )
2722 return;
2723
2724 mxData->mnEnableATT = bEnable ? TRISTATE_TRUE : TRISTATE_FALSE;
2725
2726 if (getenv("LO_TESTNAME") != nullptr)
2727 return; // No registry changing; no SettingsConfigItem modification
2728
2729 HKEY hkey;
2730
2731 // If the accessibility key in the Windows registry exists, change it synchronously
2732 if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2733 L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2734 &hkey) )
2735 {
2736 DWORD dwType;
2737 wchar_t Data[6]; // possible values: "true", "false", 1, 0
2738 DWORD cbData = sizeof(Data);
2739
2740 if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2741 nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2742 {
2743 switch (dwType)
2744 {
2745 case REG_SZ:
2746 RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2747 0, dwType,
2748 reinterpret_cast<const BYTE*>(bEnable ? L"true" : L"false"),
2749 bEnable ? sizeof(L"true") : sizeof(L"false"));
2750 break;
2751 case REG_DWORD:
2752 reinterpret_cast<DWORD *>(Data)[0] = bEnable ? 1 : 0;
2753 RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2754 0, dwType, reinterpret_cast<const BYTE*>(Data), sizeof(DWORD));
2755 break;
2756 default:
2757 // Unsupported registry type
2758 break;
2759 }
2760 }
2761
2762 RegCloseKey(hkey);
2763 }
2764
2766 setValue( "Accessibility",
2767 "EnableATToolSupport",
2768 bEnable ? OUString("true") : OUString("false" ) );
2769 }
2770}
2771#endif
2772
2774{
2775 // copy if other references exist
2776 if (mxData.use_count() > 1)
2777 {
2778 mxData = std::make_shared<ImplMiscData>(*mxData);
2779 }
2780 mxData->mbEnableLocalizedDecimalSep = bEnable;
2781}
2782
2784{
2785 return mxData->mbEnableLocalizedDecimalSep;
2786}
2787
2789{
2790 return officecfg::Office::Common::Misc::Appearance::get();
2791}
2792
2794{
2795 std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
2796 officecfg::Office::Common::Misc::Appearance::set(nMode, batch);
2797 batch->commit();
2798
2800 while (pWin)
2801 {
2802 pWin->ImplGetFrame()->UpdateDarkMode();
2804 }
2805}
2806
2808{
2809 vcl::Window* pDefWindow = ImplGetDefaultWindow();
2810 if (pDefWindow == nullptr)
2811 return false;
2812 return pDefWindow->ImplGetFrame()->GetUseDarkMode();
2813}
2814
2816{
2818 return 0;
2819 return officecfg::Office::Common::Misc::ApplicationAppearance::get();
2820}
2821
2823{
2824 std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
2825 officecfg::Office::Common::Misc::ApplicationAppearance::set(nMode, batch);
2826 batch->commit();
2827}
2828
2830{
2831 vcl::Window* pDefWindow = ImplGetDefaultWindow();
2832 if (pDefWindow == nullptr)
2833 return false;
2834 return pDefWindow->ImplGetFrame()->GetUseReducedAnimation();
2835}
2836
2838 : mxData(std::make_shared<ImplHelpData>())
2839{
2840}
2841
2843{
2844 if ( mxData == rSet.mxData )
2845 return true;
2846
2847 return (mxData->mnTipTimeout == rSet.mxData->mnTipTimeout );
2848}
2849
2850sal_Int32
2852{
2853 return 500;
2854}
2855
2856void
2857HelpSettings::SetTipTimeout( sal_Int32 nTipTimeout )
2858{
2859 // copy if other references exist
2860 if (mxData.use_count() > 1)
2861 {
2862 mxData = std::make_shared<ImplHelpData>(*mxData);
2863 }
2864 mxData->mnTipTimeout = nTipTimeout;
2865}
2866
2867sal_Int32
2869{
2870 return mxData->mnTipTimeout;
2871}
2872
2873sal_Int32
2875{
2876 return 1500;
2877}
2878
2879bool
2881{
2882 return !(*this == rSet);
2883}
2884
2886 :
2887 maLocale( LANGUAGE_SYSTEM ),
2888 maUILocale( LANGUAGE_SYSTEM )
2889{
2892}
2893
2895 maMouseSettings( rData.maMouseSettings ),
2896 maStyleSettings( rData.maStyleSettings ),
2897 maMiscSettings( rData.maMiscSettings ),
2898 maHelpSettings( rData.maHelpSettings ),
2899 maLocale( rData.maLocale ),
2900 maUILocale( rData.maUILocale )
2901{
2902 // Create the cache objects new when their getter is called.
2903}
2904
2906{
2907 mpLocaleDataWrapper.reset();
2908 mpUILocaleDataWrapper.reset();
2910 mpI18nHelper.reset();
2911 mpUII18nHelper.reset();
2912}
2913
2915 : mxData(std::make_shared<ImplAllSettingsData>())
2916{
2917}
2918
2920{
2921 // copy if other references exist
2922 if (mxData.use_count() > 1)
2923 {
2924 mxData = std::make_shared<ImplAllSettingsData>(*mxData);
2925 }
2926
2927}
2928
2930{
2931
2933
2934 if ( nFlags & AllSettingsFlags::MOUSE )
2935 {
2936 if ( mxData->maMouseSettings != rSet.mxData->maMouseSettings )
2937 {
2938 CopyData();
2939 mxData->maMouseSettings = rSet.mxData->maMouseSettings;
2940 nChangeFlags |= AllSettingsFlags::MOUSE;
2941 }
2942 }
2943
2944 if ( nFlags & AllSettingsFlags::STYLE )
2945 {
2946 if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2947 {
2948 CopyData();
2949 mxData->maStyleSettings = rSet.mxData->maStyleSettings;
2950 nChangeFlags |= AllSettingsFlags::STYLE;
2951 }
2952 }
2953
2954 if ( nFlags & AllSettingsFlags::MISC )
2955 {
2956 if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2957 {
2958 CopyData();
2959 mxData->maMiscSettings = rSet.mxData->maMiscSettings;
2960 nChangeFlags |= AllSettingsFlags::MISC;
2961 }
2962 }
2963
2964 if ( nFlags & AllSettingsFlags::LOCALE )
2965 {
2966 if ( mxData->maLocale != rSet.mxData->maLocale )
2967 {
2968 SetLanguageTag( rSet.mxData->maLocale );
2969 nChangeFlags |= AllSettingsFlags::LOCALE;
2970 }
2971 }
2972
2973 return nChangeFlags;
2974}
2975
2977{
2978
2980
2981 if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2982 nChangeFlags |= AllSettingsFlags::STYLE;
2983
2984 if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2985 nChangeFlags |= AllSettingsFlags::MISC;
2986
2987 if ( mxData->maLocale != rSet.mxData->maLocale )
2988 nChangeFlags |= AllSettingsFlags::LOCALE;
2989
2990 return nChangeFlags;
2991}
2992
2993bool AllSettings::operator ==( const AllSettings& rSet ) const
2994{
2995 if ( mxData == rSet.mxData )
2996 return true;
2997
2998 if ( (mxData->maMouseSettings == rSet.mxData->maMouseSettings) &&
2999 (mxData->maStyleSettings == rSet.mxData->maStyleSettings) &&
3000 (mxData->maMiscSettings == rSet.mxData->maMiscSettings) &&
3001 (mxData->maHelpSettings == rSet.mxData->maHelpSettings) &&
3002 (mxData->maLocale == rSet.mxData->maLocale) )
3003 {
3004 return true;
3005 }
3006
3007 return false;
3008}
3009
3010void AllSettings::SetLanguageTag(const OUString& rLanguage, bool bCanonicalize)
3011{
3012 SetLanguageTag(LanguageTag(rLanguage, bCanonicalize));
3013}
3014
3015void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag )
3016{
3017 if (mxData->maLocale == rLanguageTag)
3018 return;
3019
3020 CopyData();
3021
3022 mxData->maLocale = rLanguageTag;
3023
3024 if ( mxData->mpLocaleDataWrapper )
3025 {
3026 mxData->mpLocaleDataWrapper.reset();
3027 }
3028 if ( mxData->mpI18nHelper )
3029 {
3030 mxData->mpI18nHelper.reset();
3031 }
3032}
3033
3034namespace
3035{
3036 bool GetConfigLayoutRTL(bool bMath)
3037 {
3038 static const char* pEnv = getenv("SAL_RTL_ENABLED" );
3039 static int nUIMirroring = -1; // -1: undef, 0: auto, 1: on 2: off
3040
3041 // environment always overrides
3042 if( pEnv )
3043 return true;
3044
3045 bool bRTL = false;
3046
3047 if( nUIMirroring == -1 )
3048 {
3049 nUIMirroring = 0; // ask configuration only once
3052 "org.openoffice.Office.Common/I18N/CTL" ); // note: case sensitive !
3053 if ( aNode.isValid() )
3054 {
3055 bool bTmp = bool();
3056 css::uno::Any aValue = aNode.getNodeValue( "UIMirroring" );
3057 if( aValue >>= bTmp )
3058 {
3059 // found true or false; if it was nil, nothing is changed
3060 nUIMirroring = bTmp ? 1 : 2;
3061 }
3062 }
3063 }
3064
3065 if( nUIMirroring == 0 ) // no config found (eg, setup) or default (nil) was set: check language
3066 {
3068 if (bMath)
3069 bRTL = MsLangId::isRightToLeftMath( aLang );
3070 else
3071 bRTL = MsLangId::isRightToLeft( aLang );
3072 }
3073 else
3074 bRTL = (nUIMirroring == 1);
3075
3076 return bRTL;
3077 }
3078}
3079
3081{
3083 return false;
3084 return GetConfigLayoutRTL(false);
3085}
3086
3088{
3090 return false;
3091 return GetConfigLayoutRTL(true);
3092}
3093
3095{
3097 {
3098 static LanguageTag aRet("en-US");
3099 return aRet;
3100 }
3101
3104
3105 // SYSTEM locale means: use settings from SvtSysLocale that is resolved
3106 if ( mxData->maLocale.isSystemLocale() )
3107 mxData->maLocale = mxData->maSysLocale.GetLanguageTag();
3108
3109 return mxData->maLocale;
3110}
3111
3113{
3115 {
3116 static LanguageTag aRet("en-US");
3117 return aRet;
3118 }
3119
3122
3123 // the UILocale is never changed
3124 if ( mxData->maUILocale.isSystemLocale() )
3125 mxData->maUILocale = mxData->maSysLocale.GetUILanguageTag();
3126
3127 return mxData->maUILocale;
3128}
3129
3131{
3132 if ( !mxData->mpLocaleDataWrapper )
3133 const_cast<AllSettings*>(this)->mxData->mpLocaleDataWrapper.reset( new LocaleDataWrapper(
3135 return *mxData->mpLocaleDataWrapper;
3136}
3137
3139{
3140 if ( !mxData->mpUILocaleDataWrapper )
3141 const_cast<AllSettings*>(this)->mxData->mpUILocaleDataWrapper.reset( new LocaleDataWrapper(
3143 return *mxData->mpUILocaleDataWrapper;
3144}
3145
3147{
3148 if ( !mxData->mpNeutralLocaleDataWrapper )
3149 const_cast<AllSettings*>(this)->mxData->mpNeutralLocaleDataWrapper.reset( new LocaleDataWrapper(
3151 return *mxData->mpNeutralLocaleDataWrapper;
3152}
3153
3155{
3156 if ( !mxData->mpI18nHelper ) {
3157 const_cast<AllSettings*>(this)->mxData->mpI18nHelper.reset( new vcl::I18nHelper(
3159 }
3160 return *mxData->mpI18nHelper;
3161}
3162
3164{
3165 if ( !mxData->mpUII18nHelper ) {
3166 const_cast<AllSettings*>(this)->mxData->mpUII18nHelper.reset( new vcl::I18nHelper(
3168 }
3169 return *mxData->mpUII18nHelper;
3170}
3171
3173{
3174 AllSettings aAllSettings( Application::GetSettings() );
3175 if ( nHint & ConfigurationHints::DecSep )
3176 {
3177 MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
3178 bool bIsDecSepAsLocale = aAllSettings.mxData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale();
3179 if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale )
3180 {
3181 aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale );
3182 aAllSettings.SetMiscSettings( aMiscSettings );
3183 }
3184 }
3185
3186 if ( nHint & ConfigurationHints::Locale )
3187 aAllSettings.SetLanguageTag( aAllSettings.mxData->maSysLocale.GetOptions().GetLanguageTag() );
3188
3189 Application::SetSettings( aAllSettings );
3190}
3191
3192const StyleSettings&
3194{
3195 return mxData->maStyleSettings;
3196}
3197
3200{
3201 return mxData->mnOptions;
3202}
3203
3204std::vector<vcl::IconThemeInfo> const &
3206{
3207 if (!mxData->mIconThemeScanner) {
3209 }
3210 return mxData->mIconThemeScanner->GetFoundIconThemes();
3211}
3212
3213/*static*/ OUString
3215{
3216 OUString desktopEnvironment = Application::GetDesktopEnvironment();
3217 if (!mxData->mIconThemeScanner) {
3219 }
3220 OUString themeName = mxData->mIconThemeSelector->SelectIconThemeForDesktopEnvironment(
3221 mxData->mIconThemeScanner->GetFoundIconThemes(),
3222 desktopEnvironment
3223 );
3224 return themeName;
3225}
3226
3227void
3228StyleSettings::SetIconTheme(const OUString& theme)
3229{
3230 CopyData();
3231 mxData->mIconTheme = theme;
3232}
3233
3234OUString
3236{
3237 OUString sTheme(mxData->mIconTheme);
3238 if (sTheme.isEmpty())
3239 {
3241 sTheme = "colibre";
3242 else
3243 {
3244 // read from the configuration, or fallback to what the desktop wants
3245 sTheme = officecfg::Office::Common::Misc::SymbolStyle::get();
3246
3247 if (sTheme.isEmpty() || sTheme == "auto")
3249 }
3250 }
3251
3252 if (!mxData->mIconThemeScanner) {
3254 }
3255 OUString r = mxData->mIconThemeSelector->SelectIconTheme(
3256 mxData->mIconThemeScanner->GetFoundIconThemes(),
3257 sTheme);
3258 return r;
3259}
3260
3261void
3263{
3264 if (mxData->mbHighContrast == bHighContrast) {
3265 return;
3266 }
3267
3268 CopyData();
3269 mxData->mbHighContrast = bHighContrast;
3270 mxData->mIconThemeSelector->SetUseHighContrastTheme(bHighContrast);
3271}
3272
3273bool
3275{
3276 return mxData->mbHighContrast;
3277}
3278
3279void
3280StyleSettings::SetPreferredIconTheme(const OUString& theme, bool bDarkIconTheme)
3281{
3282 const bool bChanged = mxData->mIconThemeSelector->SetPreferredIconTheme(theme, bDarkIconTheme);
3283 if (bChanged)
3284 {
3285 // clear this so it is recalculated if it was selected as the automatic theme
3286 mxData->mIconTheme.clear();
3287 }
3288}
3289
3290void
3292{
3293 CopyData();
3294 mxData->maMouseSettings = rSet;
3295}
3296
3297const MouseSettings&
3299{
3300 return mxData->maMouseSettings;
3301}
3302
3303void
3305{
3306 CopyData();
3307 mxData->maStyleSettings = rSet;
3308}
3309
3310void
3312{
3313 CopyData();
3314 mxData->maMiscSettings = rSet;
3315}
3316
3317const MiscSettings&
3319{
3320 return mxData->maMiscSettings;
3321}
3322
3323void
3325{
3326 CopyData();
3327 mxData->maHelpSettings = rSet;
3328}
3329
3330const HelpSettings&
3332{
3333 return mxData->maHelpSettings;
3334}
3335
3336bool
3338{
3339 return !(*this == rSet);
3340}
3341
3344{
3345 return mxData->maSysLocale;
3346}
3347
3348
3350 bool bCheckedColorSpecialCase )
3351{
3352 Set3DColors( aBackColor );
3353 SetFaceColor( aBackColor );
3354 SetDialogColor( aBackColor );
3355 SetWorkspaceColor( aBackColor );
3356
3357 if (bCheckedColorSpecialCase)
3359}
3360
3362 const vcl::Font& aLabelFont )
3363{
3364 SetAppFont( aAppFont );
3365 SetPushButtonFont( aAppFont );
3366 SetToolFont( aAppFont );
3367 SetHelpFont( aAppFont );
3368
3369 SetMenuFont( aLabelFont );
3370 SetTabFont( aLabelFont );
3371 SetLabelFont( aLabelFont );
3372 SetRadioCheckFont( aLabelFont );
3373 SetFieldFont( aLabelFont );
3374 SetGroupFont( aLabelFont );
3375 SetIconFont( aLabelFont );
3376}
3377
3378/* 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:699
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:1043
static vcl::Window * GetNextTopLevelWindow(vcl::Window const *pWindow)
Get the next top level window.
Definition: svapp.cxx:1067
static const AllSettings & GetSettings()
Gets the application's settings.
Definition: svapp.cxx:638
static const OUString & GetDesktopEnvironment()
Get the desktop environment the process is currently running in.
Definition: svapp.cxx:1583
static void SetSettings(const AllSettings &rSettings)
Sets the application's settings and notifies all windows of the change.
Definition: svapp.cxx:544
static bool IsHeadlessModeEnabled()
Determines if headless mode is enabled.
Definition: svapp.cxx:1539
static vcl::Window * GetFirstTopLevelWindow()
Get the first top-level window of the application.
Definition: svapp.cxx:1061
bool IsEmpty() const
Definition: BitmapEx.cxx:186
void RGBtoHSB(sal_uInt16 &nHue, sal_uInt16 &nSaturation, sal_uInt16 &nBrightness) const
bool IsDark() 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:667
static sal_Int32 GetBalloonDelay()
sal_Int32 GetTipTimeout() const
static sal_Int32 GetTipDelay()
LanguageType getLanguageType(bool bResolveSystem=true) const
static int GetAppColorMode()
bool GetDisablePrinting() const
static bool GetUseReducedAnimation()
bool GetEnableLocalizedDecimalSep() const
std::shared_ptr< ImplMiscData > mxData
Definition: settings.hxx:639
static void SetDarkMode(int nMode)
static int GetDarkMode()
bool operator==(const MiscSettings &rSet) const
bool operator!=(const MiscSettings &rSet) const
static void SetAppColorMode(int nMode)
static bool GetUseDarkMode()
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:879
virtual bool GetUseDarkMode() const
Definition: salframe.hxx:303
virtual bool GetUseReducedAnimation() const
Definition: salframe.hxx:304
virtual void UpdateDarkMode()
Definition: salframe.hxx:302
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 SetAccentColor(const Color &rColor)
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 & GetAccentColor() const
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()
SalFrame * ImplGetFrame() const
Definition: window2.cxx:879
constexpr ::Color COL_GRAY(0x80, 0x80, 0x80)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_YELLOW(0xFF, 0xFF, 0x00)
constexpr ::Color COL_RED(0x80, 0x00, 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:682
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
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:403
bool mbCanDetermineWindowPosition
Definition: svdata.hxx:344
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
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:77
vcl::Window * ImplGetDefaultWindow()
Returns either the application window, or the default GL context window.
Definition: svdata.cxx:212
const ::Color maShadowColor
unsigned char sal_uInt8
unsigned char BYTE