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{
77
78 void SetStandardStyles();
79
162 sal_Int32 mnTitleHeight;
165 sal_Int32 mnSpinSize;
166 sal_Int32 mnCursorSize;
186 sal_Int32 mnMinThumbSize;
187 std::shared_ptr<vcl::IconThemeScanner>
189 std::shared_ptr<vcl::IconThemeSelector>
191
192 OUString mIconTheme;
197 //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise
198 //primary means scroll by single page. Secondary button takes the alternative behaviour
201
202 sal_uInt16 mnEdgeBlending;
210
212
215 std::optional<Color> maPersonaMenuBarTextColor;
216};
217
219{
220 ImplMiscData();
224};
225
227{
228 sal_Int32 mnTipTimeout = 3000;
229};
230
232{
236
243 std::unique_ptr<LocaleDataWrapper> mpLocaleDataWrapper;
244 std::unique_ptr<LocaleDataWrapper> mpUILocaleDataWrapper;
245 std::unique_ptr<LocaleDataWrapper> mpNeutralLocaleDataWrapper;
246 std::unique_ptr<vcl::I18nHelper> mpI18nHelper;
247 std::unique_ptr<vcl::I18nHelper> mpUII18nHelper;
249};
250
251void
253{
254 CopyData();
255 mxData->mnOptions = nOptions;
256}
257
260{
261 return mxData->mnOptions;
262}
263
264void
265MouseSettings::SetDoubleClickTime( sal_uInt64 nDoubleClkTime )
266{
267 CopyData();
268 mxData->mnDoubleClkTime = nDoubleClkTime;
269}
270
271sal_uInt64
273{
274 return mxData->mnDoubleClkTime;
275}
276
277void
278MouseSettings::SetDoubleClickWidth( sal_Int32 nDoubleClkWidth )
279{
280 CopyData();
281 mxData->mnDoubleClkWidth = nDoubleClkWidth;
282}
283
284sal_Int32
286{
287 return mxData->mnDoubleClkWidth;
288}
289
290void
291MouseSettings::SetDoubleClickHeight( sal_Int32 nDoubleClkHeight )
292{
293 CopyData();
294 mxData->mnDoubleClkHeight = nDoubleClkHeight;
295}
296
297sal_Int32
299{
300 return mxData->mnDoubleClkHeight;
301}
302
303void
304MouseSettings::SetStartDragWidth( sal_Int32 nDragWidth )
305{
306 CopyData();
307 mxData->mnStartDragWidth = nDragWidth;
308}
309
310sal_Int32
312{
313 return mxData->mnStartDragWidth;
314}
315
316void
317MouseSettings::SetStartDragHeight( sal_Int32 nDragHeight )
318{
319 CopyData();
320 mxData->mnStartDragHeight = nDragHeight;
321}
322
323sal_Int32
325{
326 return mxData->mnStartDragHeight;
327}
328
329sal_uInt16
331{
332 return MOUSE_LEFT;
333}
334
335sal_uInt16
337{
338 return MOUSE_RIGHT;
339}
340
341sal_uInt16
343{
344 return 1;
345}
346
347sal_Int32
349{
350 return 100;
351}
352
353sal_Int32
355{
356 return 370;
357}
358
359void
361{
362 CopyData();
363 mxData->mnButtonRepeat = nRepeat;
364}
365
366sal_Int32
368{
369 return mxData->mnButtonRepeat;
370}
371
372sal_Int32
374{
375 return 250;
376}
377
378void
380{
381 CopyData();
382 mxData->mnMenuDelay = nDelay;
383}
384
385sal_Int32
387{
388 return mxData->mnMenuDelay;
389}
390
391void
393{
394 CopyData();
395 mxData->mnFollow = nFollow;
396}
397
400{
401 return mxData->mnFollow;
402}
403
404void
406{
407 CopyData();
408 mxData->mnMiddleButtonAction = nAction;
409}
410
413{
414 return mxData->mnMiddleButtonAction;
415}
416
417void
419{
420 CopyData();
421 mxData->mnWheelBehavior = nBehavior;
422}
423
426{
427 return mxData->mnWheelBehavior;
428}
429
430bool
432{
433 return !(*this == rSet);
434}
435
437 : mxData(std::make_shared<ImplMouseData>())
438{
439}
440
442{
443 // copy if other references exist
444 if (mxData.use_count() > 1)
445 {
446 mxData = std::make_shared<ImplMouseData>(*mxData);
447 }
448}
449
451{
452 if ( mxData == rSet.mxData )
453 return true;
454
455 return
456 (mxData->mnOptions == rSet.mxData->mnOptions) &&
457 (mxData->mnDoubleClkTime == rSet.mxData->mnDoubleClkTime) &&
458 (mxData->mnDoubleClkWidth == rSet.mxData->mnDoubleClkWidth) &&
459 (mxData->mnDoubleClkHeight == rSet.mxData->mnDoubleClkHeight) &&
460 (mxData->mnStartDragWidth == rSet.mxData->mnStartDragWidth) &&
461 (mxData->mnStartDragHeight == rSet.mxData->mnStartDragHeight) &&
462 (mxData->mnMiddleButtonAction == rSet.mxData->mnMiddleButtonAction) &&
463 (mxData->mnButtonRepeat == rSet.mxData->mnButtonRepeat) &&
464 (mxData->mnMenuDelay == rSet.mxData->mnMenuDelay) &&
465 (mxData->mnFollow == rSet.mxData->mnFollow) &&
466 (mxData->mnWheelBehavior == rSet.mxData->mnWheelBehavior );
467}
468
470 mnScrollBarSize(16),
471 mnSpinSize(16),
472 mnCursorSize(2),
473 mnAntialiasedMin(0),
474 mnCursorBlinkTime(STYLE_CURSOR_NOBLINKTIME),
475 mnDragFullOptions(DragFullOptions::All),
476 mnSelectionOptions(SelectionOptions::NONE),
477 mnDisplayOptions(DisplayOptions::NONE),
478 mnToolbarIconSize(ToolbarIconSize::Unknown),
479 mnOptions(StyleSettingsOptions::NONE),
480 mbAutoMnemonic(true),
481 meUseImagesInMenus(TRISTATE_INDET),
482 mnMinThumbSize(16),
483 mIconThemeSelector(std::make_shared<vcl::IconThemeSelector>()),
484 meContextMenuShortcuts(TRISTATE_INDET),
485 mnEdgeBlending(35),
486 maEdgeBlendingTopLeftColor(Color(0xC0, 0xC0, 0xC0)),
487 maEdgeBlendingBottomRightColor(Color(0x40, 0x40, 0x40)),
488 mnListBoxMaximumLineCount(25),
489 // For some reason this isn't actually the column count that gets used, at least on iOS, but
490 // instead what SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() in
491 // svtools/source/config/accessibilityoptions.cxx returns.
492 mnColorValueSetColumnCount(12),
493#ifdef IOS
494 maListBoxPreviewDefaultLogicSize(Size(30, 30)),
495#else
496 maListBoxPreviewDefaultLogicSize(Size(15, 7)),
497#endif
498 maListBoxPreviewDefaultPixelSize(Size(0, 0)), // on-demand calculated in GetListBoxPreviewDefaultPixelSize(),
499 mbPreviewUsesCheckeredBackground(true)
500{
502}
503
505 maActiveBorderColor( rData.maActiveBorderColor ),
506 maActiveColor( rData.maActiveColor ),
507 maActiveTextColor( rData.maActiveTextColor ),
508 maAlternatingRowColor( rData.maAlternatingRowColor ),
509 maDefaultButtonTextColor( rData.maDefaultButtonTextColor ),
510 maButtonTextColor( rData.maButtonTextColor ),
511 maDefaultActionButtonTextColor( rData.maDefaultActionButtonTextColor ),
512 maActionButtonTextColor( rData.maActionButtonTextColor ),
513 maFlatButtonTextColor( rData.maFlatButtonTextColor ),
514 maDefaultButtonRolloverTextColor( rData.maDefaultButtonRolloverTextColor ),
515 maButtonRolloverTextColor( rData.maButtonRolloverTextColor ),
516 maDefaultActionButtonRolloverTextColor( rData.maDefaultActionButtonRolloverTextColor ),
517 maActionButtonRolloverTextColor( rData.maActionButtonRolloverTextColor ),
518 maFlatButtonRolloverTextColor( rData.maFlatButtonRolloverTextColor ),
519 maDefaultButtonPressedRolloverTextColor( rData.maDefaultButtonPressedRolloverTextColor ),
520 maButtonPressedRolloverTextColor( rData.maButtonPressedRolloverTextColor ),
521 maDefaultActionButtonPressedRolloverTextColor( rData.maDefaultActionButtonPressedRolloverTextColor ),
522 maActionButtonPressedRolloverTextColor( rData.maActionButtonPressedRolloverTextColor ),
523 maFlatButtonPressedRolloverTextColor( rData.maFlatButtonPressedRolloverTextColor ),
524 maCheckedColor( rData.maCheckedColor ),
525 maDarkShadowColor( rData.maDarkShadowColor ),
526 maDeactiveBorderColor( rData.maDeactiveBorderColor ),
527 maDeactiveColor( rData.maDeactiveColor ),
528 maDeactiveTextColor( rData.maDeactiveTextColor ),
529 maDialogColor( rData.maDialogColor ),
530 maDialogTextColor( rData.maDialogTextColor ),
531 maDisableColor( rData.maDisableColor ),
532 maFaceColor( rData.maFaceColor ),
533 maFieldColor( rData.maFieldColor ),
534 maFieldTextColor( rData.maFieldTextColor ),
535 maFieldRolloverTextColor( rData.maFieldRolloverTextColor ),
536 maFontColor( rData.maFontColor ),
537 maGroupTextColor( rData.maGroupTextColor ),
538 maHelpColor( rData.maHelpColor ),
539 maHelpTextColor( rData.maHelpTextColor ),
540 maHighlightColor( rData.maHighlightColor ),
541 maHighlightTextColor( rData.maHighlightTextColor ),
542 maLabelTextColor( rData.maLabelTextColor ),
543 maLightBorderColor( rData.maLightBorderColor ),
544 maLightColor( rData.maLightColor ),
545 maLinkColor( rData.maLinkColor ),
546 maMenuBarColor( rData.maMenuBarColor ),
547 maMenuBarRolloverColor( rData.maMenuBarRolloverColor ),
548 maMenuBorderColor( rData.maMenuBorderColor ),
549 maMenuColor( rData.maMenuColor ),
550 maMenuHighlightColor( rData.maMenuHighlightColor ),
551 maMenuHighlightTextColor( rData.maMenuHighlightTextColor ),
552 maMenuTextColor( rData.maMenuTextColor ),
553 maListBoxWindowBackgroundColor( rData.maListBoxWindowBackgroundColor ),
554 maListBoxWindowTextColor( rData.maListBoxWindowTextColor ),
555 maListBoxWindowHighlightColor( rData.maListBoxWindowHighlightColor ),
556 maListBoxWindowHighlightTextColor( rData.maListBoxWindowHighlightTextColor ),
557 maMenuBarTextColor( rData.maMenuBarTextColor ),
558 maMenuBarRolloverTextColor( rData.maMenuBarRolloverTextColor ),
559 maMenuBarHighlightTextColor( rData.maMenuBarHighlightTextColor ),
560 maMonoColor( rData.maMonoColor ),
561 maRadioCheckTextColor( rData.maRadioCheckTextColor ),
563 maWarningColor( rData.maWarningColor ),
564 maVisitedLinkColor( rData.maVisitedLinkColor ),
565 maToolTextColor( rData.maToolTextColor ),
566 maWindowColor( rData.maWindowColor ),
567 maWindowTextColor( rData.maWindowTextColor ),
568 maWorkspaceColor( rData.maWorkspaceColor ),
569 maActiveTabColor( rData.maActiveTabColor ),
570 maInactiveTabColor( rData.maInactiveTabColor ),
571 maTabTextColor( rData.maTabTextColor ),
572 maTabRolloverTextColor( rData.maTabRolloverTextColor ),
573 maTabHighlightTextColor( rData.maTabHighlightTextColor ),
574 maAppFont( rData.maAppFont ),
575 maHelpFont( rData.maAppFont ),
576 maTitleFont( rData.maTitleFont ),
577 maFloatTitleFont( rData.maFloatTitleFont ),
578 maMenuFont( rData.maMenuFont ),
579 maToolFont( rData.maToolFont ),
580 maLabelFont( rData.maLabelFont ),
581 maRadioCheckFont( rData.maRadioCheckFont ),
582 maPushButtonFont( rData.maPushButtonFont ),
583 maFieldFont( rData.maFieldFont ),
584 maIconFont( rData.maIconFont ),
585 maTabFont( rData.maTabFont ),
586 maGroupFont( rData.maGroupFont ),
587 mnTitleHeight(rData.mnTitleHeight),
588 mnFloatTitleHeight(rData.mnFloatTitleHeight),
589 mnScrollBarSize(rData.mnScrollBarSize),
590 mnSpinSize(rData.mnSpinSize),
591 mnCursorSize(rData.mnCursorSize),
592 mnAntialiasedMin(rData.mnAntialiasedMin),
593 mnCursorBlinkTime(rData.mnCursorBlinkTime),
594 mnDragFullOptions(rData.mnDragFullOptions),
595 mnSelectionOptions(rData.mnSelectionOptions),
596 mnDisplayOptions(rData.mnDisplayOptions),
597 mnToolbarIconSize(rData.mnToolbarIconSize),
598 mnUseFlatMenus(rData.mnUseFlatMenus),
599 mnOptions(rData.mnOptions),
600 mbHighContrast(rData.mbHighContrast),
601 mbUseSystemUIFonts(rData.mbUseSystemUIFonts),
602 mbUseFontAAFromSystem(rData.mbUseFontAAFromSystem),
603 mbAutoMnemonic(rData.mbAutoMnemonic),
604 meUseImagesInMenus(rData.meUseImagesInMenus),
605 mnUseFlatBorders(rData.mnUseFlatBorders),
606 mbPreferredUseImagesInMenus(rData.mbPreferredUseImagesInMenus),
607 mnMinThumbSize(rData.mnMinThumbSize),
608 mIconThemeSelector(std::make_shared<vcl::IconThemeSelector>(*rData.mIconThemeSelector)),
609 mIconTheme(rData.mIconTheme),
610 mbSkipDisabledInMenus(rData.mbSkipDisabledInMenus),
611 mbHideDisabledMenuItems(rData.mbHideDisabledMenuItems),
612 mbPreferredContextMenuShortcuts(rData.mbPreferredContextMenuShortcuts),
613 meContextMenuShortcuts(rData.meContextMenuShortcuts),
614 mbPrimaryButtonWarpsSlider(rData.mbPrimaryButtonWarpsSlider),
615 maDialogStyle( rData.maDialogStyle ),
616 mnEdgeBlending(rData.mnEdgeBlending),
617 maEdgeBlendingTopLeftColor(rData.maEdgeBlendingTopLeftColor),
618 maEdgeBlendingBottomRightColor(rData.maEdgeBlendingBottomRightColor),
619 mnListBoxMaximumLineCount(rData.mnListBoxMaximumLineCount),
620 mnColorValueSetColumnCount(rData.mnColorValueSetColumnCount),
621 maListBoxPreviewDefaultLogicSize(rData.maListBoxPreviewDefaultLogicSize),
622 maListBoxPreviewDefaultPixelSize(rData.maListBoxPreviewDefaultPixelSize),
623 mbPreviewUsesCheckeredBackground(rData.mbPreviewUsesCheckeredBackground),
624 maPersonaHeaderFooter( rData.maPersonaHeaderFooter ),
625 maPersonaHeaderBitmap( rData.maPersonaHeaderBitmap ),
626 maPersonaFooterBitmap( rData.maPersonaFooterBitmap ),
627 maPersonaMenuBarTextColor( rData.maPersonaMenuBarTextColor )
628{
629 if (rData.mIconThemeScanner)
630 mIconThemeScanner = std::make_shared<vcl::IconThemeScanner>(*rData.mIconThemeScanner);
631}
632
634{
635 vcl::Font aStdFont( FAMILY_SWISS, Size( 0, 8 ) );
636 aStdFont.SetCharSet( osl_getThreadTextEncoding() );
637 aStdFont.SetWeight( WEIGHT_NORMAL );
639 aStdFont.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en")));
640 else
641 aStdFont.SetFamilyName("Liberation Sans");
642 maAppFont = aStdFont;
643 maHelpFont = aStdFont;
644 maMenuFont = aStdFont;
645 maToolFont = aStdFont;
646 maGroupFont = aStdFont;
647 maLabelFont = aStdFont;
648 maRadioCheckFont = aStdFont;
649 maPushButtonFont = aStdFont;
650 maFieldFont = aStdFont;
651 maIconFont = aStdFont;
652 maTabFont = aStdFont;
653 aStdFont.SetWeight( WEIGHT_BOLD );
654 maFloatTitleFont = aStdFont;
655 maTitleFont = aStdFont;
656
658 maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
663
665
681
689 maWorkspaceColor = Color( 0xDF, 0xDF, 0xDE );
714 // make active like highlight, except with a small contrast
724 maHelpColor = Color( 0xFF, 0xFF, 0xE0 );
727 maVisitedLinkColor = Color( 0x00, 0x00, 0xCC );
730 maAlternatingRowColor = Color( 0xEE, 0xEE, 0xEE );
731
732 mnTitleHeight = 18;
734 mbHighContrast = false;
735 mbUseSystemUIFonts = true;
737 mnUseFlatBorders = false;
738 mnUseFlatMenus = false;
740 mbSkipDisabledInMenus = false;
744}
745
747 : mxData(std::make_shared<ImplStyleData>())
748{
749}
750
751void
753{
754 CopyData();
755 mxData->maFaceColor = rColor;
756}
757
758const Color&
760{
761 return mxData->maFaceColor;
762}
763
764void
766{
767 CopyData();
768 mxData->maCheckedColor = rColor;
769}
770
771const Color&
773{
774 return mxData->maCheckedColor;
775}
776
777void
779{
780 CopyData();
781 mxData->maLightColor = rColor;
782}
783
784const Color&
786{
787 return mxData->maLightColor;
788}
789
790void
792{
793 CopyData();
794 mxData->maLightBorderColor = rColor;
795}
796
797const Color&
799{
800 return mxData->maLightBorderColor;
801}
802
803void
805{
806 CopyData();
807 mxData->maWarningColor = rColor;
808}
809
810const Color&
812{
813 return mxData->maWarningColor;
814}
815
816void
818{
819 CopyData();
820 mxData->maShadowColor = rColor;
821}
822
823const Color&
825{
826 return mxData->maShadowColor;
827}
828
829void
831{
832 CopyData();
833 mxData->maDarkShadowColor = rColor;
834}
835
836const Color&
838{
839 return mxData->maDarkShadowColor;
840}
841
842void
844{
845 CopyData();
846 mxData->maDefaultButtonTextColor = rColor;
847}
848
849const Color&
851{
852 return mxData->maDefaultButtonTextColor;
853}
854
855void
857{
858 CopyData();
859 mxData->maButtonTextColor = rColor;
860}
861
862const Color&
864{
865 return mxData->maButtonTextColor;
866}
867
868void
870{
871 CopyData();
872 mxData->maDefaultActionButtonTextColor = rColor;
873}
874
875const Color&
877{
878 return mxData->maDefaultActionButtonTextColor;
879}
880
881void
883{
884 CopyData();
885 mxData->maActionButtonTextColor = rColor;
886}
887
888const Color&
890{
891 return mxData->maActionButtonTextColor;
892}
893
894void
896{
897 CopyData();
898 mxData->maFlatButtonTextColor = rColor;
899}
900
901const Color&
903{
904 return mxData->maFlatButtonTextColor;
905}
906
907void
909{
910 CopyData();
911 mxData->maDefaultButtonRolloverTextColor = rColor;
912}
913
914const Color&
916{
917 return mxData->maDefaultButtonRolloverTextColor;
918}
919
920void
922{
923 CopyData();
924 mxData->maButtonRolloverTextColor = rColor;
925}
926
927const Color&
929{
930 return mxData->maButtonRolloverTextColor;
931}
932
933void
935{
936 CopyData();
937 mxData->maDefaultActionButtonRolloverTextColor = rColor;
938}
939
940const Color&
942{
943 return mxData->maDefaultActionButtonRolloverTextColor;
944}
945
946void
948{
949 CopyData();
950 mxData->maActionButtonRolloverTextColor = rColor;
951}
952
953const Color&
955{
956 return mxData->maActionButtonRolloverTextColor;
957}
958
959void
961{
962 CopyData();
963 mxData->maFlatButtonRolloverTextColor = rColor;
964}
965
966const Color&
968{
969 return mxData->maFlatButtonRolloverTextColor;
970}
971
972void
974{
975 CopyData();
976 mxData->maDefaultButtonPressedRolloverTextColor = rColor;
977}
978
979const Color&
981{
982 return mxData->maDefaultButtonPressedRolloverTextColor;
983}
984
985void
987{
988 CopyData();
989 mxData->maButtonPressedRolloverTextColor = rColor;
990}
991
992const Color&
994{
995 return mxData->maButtonPressedRolloverTextColor;
996}
997
998void
1000{
1001 CopyData();
1002 mxData->maDefaultActionButtonPressedRolloverTextColor = rColor;
1003}
1004
1005const Color&
1007{
1008 return mxData->maDefaultActionButtonPressedRolloverTextColor;
1009}
1010
1011void
1013{
1014 CopyData();
1015 mxData->maActionButtonPressedRolloverTextColor = rColor;
1016}
1017
1018const Color&
1020{
1021 return mxData->maActionButtonPressedRolloverTextColor;
1022}
1023
1024void
1026{
1027 CopyData();
1028 mxData->maFlatButtonPressedRolloverTextColor = rColor;
1029}
1030
1031const Color&
1033{
1034 return mxData->maFlatButtonPressedRolloverTextColor;
1035}
1036
1037void
1039{
1040 CopyData();
1041 mxData->maRadioCheckTextColor = rColor;
1042}
1043
1044const Color&
1046{
1047 return mxData->maRadioCheckTextColor;
1048}
1049
1050void
1052{
1053 CopyData();
1054 mxData->maGroupTextColor = rColor;
1055}
1056
1057const Color&
1059{
1060 return mxData->maGroupTextColor;
1061}
1062
1063void
1065{
1066 CopyData();
1067 mxData->maLabelTextColor = rColor;
1068}
1069
1070const Color&
1072{
1073 return mxData->maLabelTextColor;
1074}
1075
1076void
1078{
1079 CopyData();
1080 mxData->maWindowColor = rColor;
1081}
1082
1083const Color&
1085{
1086 return mxData->maWindowColor;
1087}
1088
1089void
1091{
1092 CopyData();
1093 mxData->maWindowTextColor = rColor;
1094}
1095
1096const Color&
1098{
1099 return mxData->maWindowTextColor;
1100}
1101
1102void
1104{
1105 CopyData();
1106 mxData->maDialogColor = rColor;
1107}
1108
1109const Color&
1111{
1112 return mxData->maDialogColor;
1113}
1114
1115void
1117{
1118 CopyData();
1119 mxData->maDialogTextColor = rColor;
1120}
1121
1122const Color&
1124{
1125 return mxData->maDialogTextColor;
1126}
1127
1128void
1130{
1131 CopyData();
1132 mxData->maWorkspaceColor = rColor;
1133}
1134
1135const Color&
1137{
1138 return mxData->maWorkspaceColor;
1139}
1140
1141void
1143{
1144 CopyData();
1145 mxData->maFieldColor = rColor;
1146}
1147
1148const Color&
1150{
1151 return mxData->maFieldColor;
1152}
1153
1154void
1156{
1157 CopyData();
1158 mxData->maFieldTextColor = rColor;
1159}
1160
1161const Color&
1163{
1164 return mxData->maFieldTextColor;
1165}
1166
1167void
1169{
1170 CopyData();
1171 mxData->maFieldRolloverTextColor = rColor;
1172}
1173
1174const Color&
1176{
1177 return mxData->maFieldRolloverTextColor;
1178}
1179
1180void
1182{
1183 CopyData();
1184 mxData->maActiveColor = rColor;
1185}
1186
1187const Color&
1189{
1190 return mxData->maActiveColor;
1191}
1192
1193void
1195{
1196 CopyData();
1197 mxData->maActiveTextColor = rColor;
1198}
1199
1200const Color&
1202{
1203 return mxData->maActiveTextColor;
1204}
1205
1206void
1208{
1209 CopyData();
1210 mxData->maActiveBorderColor = rColor;
1211}
1212
1213const Color&
1215{
1216 return mxData->maActiveBorderColor;
1217}
1218
1219void
1221{
1222 CopyData();
1223 mxData->maDeactiveColor = rColor;
1224}
1225
1226const Color&
1228{
1229 return mxData->maDeactiveColor;
1230}
1231
1232void
1234{
1235 CopyData();
1236 mxData->maDeactiveTextColor = rColor;
1237}
1238
1239const Color&
1241{
1242 return mxData->maDeactiveTextColor;
1243}
1244
1245void
1247{
1248 CopyData();
1249 mxData->maDeactiveBorderColor = rColor;
1250}
1251
1252const Color&
1254{
1255 return mxData->maDeactiveBorderColor;
1256}
1257
1258void
1260{
1261 CopyData();
1262 mxData->maHighlightColor = rColor;
1263}
1264
1265const Color&
1267{
1268 return mxData->maHighlightColor;
1269}
1270
1271void
1273{
1274 CopyData();
1275 mxData->maHighlightTextColor = rColor;
1276}
1277
1278const Color&
1280{
1281 return mxData->maHighlightTextColor;
1282}
1283
1284void
1286{
1287 CopyData();
1288 mxData->maDisableColor = rColor;
1289}
1290
1291const Color&
1293{
1294 return mxData->maDisableColor;
1295}
1296
1297void
1299{
1300 CopyData();
1301 mxData->maHelpColor = rColor;
1302}
1303
1304const Color&
1306{
1307 return mxData->maHelpColor;
1308}
1309
1310void
1312{
1313 CopyData();
1314 mxData->maHelpTextColor = rColor;
1315}
1316
1317const Color&
1319{
1320 return mxData->maHelpTextColor;
1321}
1322
1323void
1325{
1326 CopyData();
1327 mxData->maMenuColor = rColor;
1328}
1329
1330const Color&
1332{
1333 return mxData->maMenuColor;
1334}
1335
1336void
1338{
1339 CopyData();
1340 mxData->maMenuBarColor = rColor;
1341}
1342
1343const Color&
1345{
1346 return mxData->maMenuBarColor;
1347}
1348
1349void
1351{
1352 CopyData();
1353 mxData->maMenuBarRolloverColor = rColor;
1354}
1355
1356const Color&
1358{
1359 return mxData->maMenuBarRolloverColor;
1360}
1361
1362void
1364{
1365 CopyData();
1366 mxData->maMenuBorderColor = rColor;
1367}
1368
1369const Color&
1371{
1372 return mxData->maMenuBorderColor;
1373}
1374
1375void
1377{
1378 CopyData();
1379 mxData->maMenuTextColor = rColor;
1380}
1381
1382const Color&
1384{
1385 return mxData->maMenuTextColor;
1386}
1387
1388void
1390{
1391 CopyData();
1392 mxData->maMenuBarTextColor = rColor;
1393}
1394
1395const Color&
1397{
1398 return mxData->maMenuBarTextColor;
1399}
1400
1401void
1403{
1404 CopyData();
1405 mxData->maMenuBarRolloverTextColor = rColor;
1406}
1407
1408const Color&
1410{
1411 return mxData->maMenuBarRolloverTextColor;
1412}
1413
1414void
1416{
1417 CopyData();
1418 mxData->maMenuBarHighlightTextColor = rColor;
1419}
1420
1421const Color&
1423{
1424 return mxData->maMenuBarHighlightTextColor;
1425}
1426
1427void
1429{
1430 CopyData();
1431 mxData->maMenuHighlightColor = rColor;
1432}
1433
1434const Color&
1436{
1437 return mxData->maMenuHighlightColor;
1438}
1439
1440void
1442{
1443 CopyData();
1444 mxData->maMenuHighlightTextColor = rColor;
1445}
1446
1447const Color&
1449{
1450 return mxData->maMenuHighlightTextColor;
1451}
1452
1453void
1455{
1456 CopyData();
1457 mxData->maListBoxWindowBackgroundColor = rColor;
1458}
1459
1460const Color&
1462{
1463 return mxData->maListBoxWindowBackgroundColor;
1464}
1465
1466void
1468{
1469 CopyData();
1470 mxData->maListBoxWindowTextColor = rColor;
1471}
1472
1473const Color&
1475{
1476 return mxData->maListBoxWindowTextColor;
1477}
1478
1479void
1481{
1482 CopyData();
1483 mxData->maListBoxWindowHighlightColor = rColor;
1484}
1485
1486const Color&
1488{
1489 return mxData->maListBoxWindowHighlightColor;
1490}
1491
1492void
1494{
1495 CopyData();
1496 mxData->maListBoxWindowHighlightTextColor = rColor;
1497}
1498
1499const Color&
1501{
1502 return mxData->maListBoxWindowHighlightTextColor;
1503}
1504
1505void
1507{
1508 CopyData();
1509 mxData->maTabTextColor = rColor;
1510}
1511
1512const Color&
1514{
1515 return mxData->maTabTextColor;
1516}
1517
1518void
1520{
1521 CopyData();
1522 mxData->maTabRolloverTextColor = rColor;
1523}
1524
1525const Color&
1527{
1528 return mxData->maTabRolloverTextColor;
1529}
1530
1531void
1533{
1534 CopyData();
1535 mxData->maTabHighlightTextColor = rColor;
1536}
1537
1538const Color&
1540{
1541 return mxData->maTabHighlightTextColor;
1542}
1543
1544void
1546{
1547 CopyData();
1548 mxData->maLinkColor = rColor;
1549}
1550
1551const Color&
1553{
1554 return mxData->maLinkColor;
1555}
1556
1557void
1559{
1560 CopyData();
1561 mxData->maVisitedLinkColor = rColor;
1562}
1563
1564const Color&
1566{
1567 return mxData->maVisitedLinkColor;
1568}
1569
1570void
1572{
1573 CopyData();
1574 mxData->maToolTextColor = rColor;
1575}
1576
1577const Color&
1579{
1580 return mxData->maToolTextColor;
1581}
1582
1583void
1585{
1586 CopyData();
1587 mxData->maMonoColor = rColor;
1588}
1589
1590const Color&
1592{
1593 return mxData->maMonoColor;
1594}
1595
1596void
1598{
1599 CopyData();
1600 mxData->maActiveTabColor = rColor;
1601}
1602
1603const Color&
1605{
1606 return mxData->maActiveTabColor;
1607}
1608
1609void
1611{
1612 CopyData();
1613 mxData->maInactiveTabColor = rColor;
1614}
1615
1616const Color&
1618{
1619 return mxData->maInactiveTabColor;
1620}
1621
1623{
1624 CopyData();
1625 mxData->maAlternatingRowColor = rColor;
1626}
1627
1628const Color&
1630{
1631 return mxData->maAlternatingRowColor;
1632}
1633
1634void
1635StyleSettings::SetUseSystemUIFonts( bool bUseSystemUIFonts )
1636{
1637 CopyData();
1638 mxData->mbUseSystemUIFonts = bUseSystemUIFonts;
1639}
1640
1641bool
1643{
1644 return mxData->mbUseSystemUIFonts;
1645}
1646
1647void StyleSettings::SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
1648{
1649 CopyData();
1650 mxData->mbUseFontAAFromSystem = bUseFontAAFromSystem;
1651}
1652
1654{
1655 return mxData->mbUseFontAAFromSystem;
1656}
1657
1658void
1660{
1661 CopyData();
1662 mxData->mnUseFlatBorders = bUseFlatBorders;
1663}
1664
1665bool
1667{
1668 return mxData->mnUseFlatBorders;
1669}
1670
1671void
1673{
1674 CopyData();
1675 mxData->mnUseFlatMenus = bUseFlatMenus;
1676}
1677
1678bool
1680{
1681 return mxData->mnUseFlatMenus;
1682}
1683
1684void
1686{
1687 CopyData();
1688 mxData->meUseImagesInMenus = eUseImagesInMenus;
1689}
1690
1691void
1692StyleSettings::SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus )
1693{
1694 CopyData();
1695 mxData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus;
1696}
1697
1698bool
1700{
1701 return mxData->mbPreferredUseImagesInMenus;
1702}
1703
1704void
1705StyleSettings::SetSkipDisabledInMenus( bool bSkipDisabledInMenus )
1706{
1707 CopyData();
1708 mxData->mbSkipDisabledInMenus = bSkipDisabledInMenus;
1709}
1710
1711bool
1713{
1714 return mxData->mbSkipDisabledInMenus;
1715}
1716
1717void
1718StyleSettings::SetHideDisabledMenuItems( bool bHideDisabledMenuItems )
1719{
1720 CopyData();
1721 mxData->mbHideDisabledMenuItems = bHideDisabledMenuItems;
1722}
1723
1724bool
1726{
1727 return mxData->mbHideDisabledMenuItems;
1728}
1729
1730void
1732{
1733 CopyData();
1734 mxData->meContextMenuShortcuts = eContextMenuShortcuts;
1735}
1736
1737bool
1739{
1740 switch (mxData->meContextMenuShortcuts)
1741 {
1742 case TRISTATE_FALSE:
1743 return false;
1744 case TRISTATE_TRUE:
1745 return true;
1746 default: // TRISTATE_INDET:
1748 }
1749}
1750
1751void
1753{
1754 CopyData();
1755 mxData->mbPreferredContextMenuShortcuts = bContextMenuShortcuts;
1756}
1757
1758bool
1760{
1761 return mxData->mbPreferredContextMenuShortcuts;
1762}
1763
1764void
1765StyleSettings::SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider )
1766{
1767 CopyData();
1768 mxData->mbPrimaryButtonWarpsSlider = bPrimaryButtonWarpsSlider;
1769}
1770
1771bool
1773{
1774 return mxData->mbPrimaryButtonWarpsSlider;
1775}
1776
1777void
1779{
1780 CopyData();
1781 mxData->maAppFont = rFont;
1782}
1783
1784const vcl::Font&
1786{
1787 return mxData->maAppFont;
1788}
1789
1790void
1792{
1793 CopyData();
1794 mxData->maHelpFont = rFont;
1795}
1796
1797const vcl::Font&
1799{
1800 return mxData->maHelpFont;
1801}
1802
1803void
1805{
1806 CopyData();
1807 mxData->maTitleFont = rFont;
1808}
1809
1810const vcl::Font&
1812{
1813 return mxData->maTitleFont;
1814}
1815
1816void
1818{
1819 CopyData();
1820 mxData->maFloatTitleFont = rFont;
1821}
1822
1823const vcl::Font&
1825{
1826 return mxData->maFloatTitleFont;
1827}
1828
1829void
1831{
1832 CopyData();
1833 mxData->maMenuFont = rFont;
1834}
1835
1836const vcl::Font&
1838{
1839 return mxData->maMenuFont;
1840}
1841
1842void
1844{
1845 CopyData();
1846 mxData->maToolFont = rFont;
1847}
1848
1849const vcl::Font&
1851{
1852 return mxData->maToolFont;
1853}
1854
1855void
1857{
1858 CopyData();
1859 mxData->maGroupFont = rFont;
1860}
1861
1862const vcl::Font&
1864{
1865 return mxData->maGroupFont;
1866}
1867
1868void
1870{
1871 CopyData();
1872 mxData->maLabelFont = rFont;
1873}
1874
1875const vcl::Font&
1877{
1878 return mxData->maLabelFont;
1879}
1880
1881void
1883{
1884 CopyData();
1885 mxData->maRadioCheckFont = rFont;
1886}
1887
1888const vcl::Font&
1890{
1891 return mxData->maRadioCheckFont;
1892}
1893
1894void
1896{
1897 CopyData();
1898 mxData->maPushButtonFont = rFont;
1899}
1900
1901const vcl::Font&
1903{
1904 return mxData->maPushButtonFont;
1905}
1906
1907void
1909{
1910 CopyData();
1911 mxData->maFieldFont = rFont;
1912}
1913
1914const vcl::Font&
1916{
1917 return mxData->maFieldFont;
1918}
1919
1920void
1922{
1923 CopyData();
1924 mxData->maIconFont = rFont;
1925}
1926
1927const vcl::Font&
1929{
1930 return mxData->maIconFont;
1931}
1932
1933void
1935{
1936 CopyData();
1937 mxData->maTabFont = rFont;
1938}
1939
1940const vcl::Font&
1942{
1943 return mxData->maTabFont;
1944}
1945
1946sal_Int32
1948{
1949 return 1;
1950}
1951
1952void
1954{
1955 CopyData();
1956 mxData->mnTitleHeight = nSize;
1957}
1958
1959sal_Int32
1961{
1962 return mxData->mnTitleHeight;
1963}
1964
1965void
1967{
1968 CopyData();
1969 mxData->mnFloatTitleHeight = nSize;
1970}
1971
1972sal_Int32
1974{
1975 return mxData->mnFloatTitleHeight;
1976}
1977
1978void
1980{
1981 CopyData();
1982 mxData->mnScrollBarSize = nSize;
1983}
1984
1985sal_Int32
1987{
1988 return mxData->mnScrollBarSize;
1989}
1990
1991void
1993{
1994 CopyData();
1995 mxData->mnMinThumbSize = nSize;
1996}
1997
1998sal_Int32
2000{
2001 return mxData->mnMinThumbSize;
2002}
2003
2004void
2006{
2007 CopyData();
2008 mxData->mnSpinSize = nSize;
2009}
2010
2011sal_Int32
2013{
2014 return mxData->mnSpinSize;
2015}
2016
2017sal_Int32
2019{
2020 return 3;
2021}
2022
2023void
2025{
2026 CopyData();
2027 mxData->mnCursorSize = nSize;
2028}
2029
2030sal_Int32
2032{
2033 return mxData->mnCursorSize;
2034}
2035
2036void
2038{
2039 CopyData();
2040 mxData->mnCursorBlinkTime = nBlinkTime;
2041}
2042
2043sal_uInt64
2045{
2046 return mxData->mnCursorBlinkTime;
2047}
2048
2049void
2051{
2052 CopyData();
2053 mxData->mnDragFullOptions = nOptions;
2054}
2055
2058{
2059 return mxData->mnDragFullOptions;
2060}
2061
2062void
2064{
2065 CopyData();
2066 mxData->mnSelectionOptions = nOptions;
2067}
2068
2071{
2072 return mxData->mnSelectionOptions;
2073}
2074
2075void
2077{
2078 CopyData();
2079 mxData->mnDisplayOptions = nOptions;
2080}
2081
2084{
2085 return mxData->mnDisplayOptions;
2086}
2087
2088void
2090{
2091 CopyData();
2092 mxData->mnAntialiasedMin = nMinPixel;
2093}
2094
2095sal_Int32
2097{
2098 return mxData->mnAntialiasedMin;
2099}
2100
2101void
2103{
2104 CopyData();
2105 mxData->mnOptions = nOptions;
2106}
2107
2108void
2110{
2111 CopyData();
2112 mxData->mbAutoMnemonic = bAutoMnemonic;
2113}
2114
2115bool
2117{
2118 return mxData->mbAutoMnemonic;
2119}
2120
2121bool
2123{
2124 ImplSVData* pSVData = ImplGetSVData();
2126}
2127
2128void
2130{
2131 CopyData();
2132 mxData->maFontColor = rColor;
2133}
2134
2135const Color&
2137{
2138 return mxData->maFontColor;
2139}
2140
2141void
2143{
2144 CopyData();
2145 mxData->mnToolbarIconSize = nSize;
2146}
2147
2150{
2151 return mxData->mnToolbarIconSize;
2152}
2153
2155{
2156 switch (GetToolbarIconSize())
2157 {
2159 return Size(24, 24);
2161 return Size(32, 32);
2163 default:
2164 return Size(16, 16);
2165 }
2166}
2167
2168const DialogStyle&
2170{
2171 return mxData->maDialogStyle;
2172}
2173
2174void
2176{
2177 CopyData();
2178 mxData->mnEdgeBlending = nCount;
2179}
2180
2181sal_uInt16
2183{
2184 return mxData->mnEdgeBlending;
2185}
2186
2187const Color&
2189{
2190 return mxData->maEdgeBlendingTopLeftColor;
2191}
2192
2193const Color&
2195{
2196 return mxData->maEdgeBlendingBottomRightColor;
2197}
2198
2199void
2201{
2202 CopyData();
2203 mxData->mnListBoxMaximumLineCount = nCount;
2204}
2205
2206sal_uInt16
2208{
2209 return mxData->mnListBoxMaximumLineCount;
2210}
2211
2212void
2214{
2215 CopyData();
2216 mxData->mnColorValueSetColumnCount = nCount;
2217}
2218
2219sal_uInt16
2221{
2222 return mxData->mnColorValueSetColumnCount;
2223}
2224
2225sal_uInt16
2227{
2228 return 1;
2229}
2230
2231void
2233{
2234 CopyData();
2235 mxData->mbPreviewUsesCheckeredBackground = bNew;
2236}
2237
2238bool
2240{
2241 return mxData->mbPreviewUsesCheckeredBackground;
2242}
2243
2244bool
2246{
2247 return !(*this == rSet);
2248}
2249
2251{
2252 mxData->maListBoxPreviewDefaultLogicSize = rSize;
2253}
2254
2256{
2257 if(0 == mxData->maListBoxPreviewDefaultPixelSize.Width() || 0 == mxData->maListBoxPreviewDefaultPixelSize.Height())
2258 {
2259 const_cast< StyleSettings* >(this)->mxData->maListBoxPreviewDefaultPixelSize =
2260 Application::GetDefaultDevice()->LogicToPixel(mxData->maListBoxPreviewDefaultLogicSize, MapMode(MapUnit::MapAppFont));
2261 }
2262
2263 return mxData->maListBoxPreviewDefaultPixelSize;
2264}
2265
2267{
2268 CopyData();
2269 mxData->maFaceColor = rColor;
2270 mxData->maLightBorderColor = rColor;
2271 mxData->maMenuBorderColor = rColor;
2272 mxData->maDarkShadowColor = COL_BLACK;
2273 if ( rColor != COL_LIGHTGRAY )
2274 {
2275 mxData->maLightColor = rColor;
2276 mxData->maShadowColor = rColor;
2277 mxData->maDarkShadowColor=rColor;
2278 mxData->maLightColor.IncreaseLuminance( 64 );
2279 mxData->maShadowColor.DecreaseLuminance( 64 );
2280 mxData->maDarkShadowColor.DecreaseLuminance( 100 );
2281 sal_uLong nRed = mxData->maLightColor.GetRed();
2282 sal_uLong nGreen = mxData->maLightColor.GetGreen();
2283 sal_uLong nBlue = mxData->maLightColor.GetBlue();
2284 nRed += static_cast<sal_uLong>(mxData->maShadowColor.GetRed());
2285 nGreen += static_cast<sal_uLong>(mxData->maShadowColor.GetGreen());
2286 nBlue += static_cast<sal_uLong>(mxData->maShadowColor.GetBlue());
2287 mxData->maCheckedColor = Color( static_cast<sal_uInt8>(nRed/2), static_cast<sal_uInt8>(nGreen/2), static_cast<sal_uInt8>(nBlue/2) );
2288 }
2289 else
2290 {
2291 mxData->maCheckedColor = Color( 0x99, 0x99, 0x99 );
2292 mxData->maLightColor = COL_WHITE;
2293 mxData->maShadowColor = COL_GRAY;
2294 }
2295}
2296
2298{
2299 CopyData();
2300 // Light gray checked color special case
2301 if ( GetFaceColor() == COL_LIGHTGRAY )
2302 mxData->maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
2303 else
2304 {
2305 sal_uInt8 nRed = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetRed()) + static_cast<sal_uInt16>(mxData->maLightColor.GetRed()))/2);
2306 sal_uInt8 nGreen = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetGreen()) + static_cast<sal_uInt16>(mxData->maLightColor.GetGreen()))/2);
2307 sal_uInt8 nBlue = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetBlue()) + static_cast<sal_uInt16>(mxData->maLightColor.GetBlue()))/2);
2308 mxData->maCheckedColor = Color( nRed, nGreen, nBlue );
2309 }
2310}
2311
2313{
2314 // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
2315 switch (mxData->meUseImagesInMenus) {
2316 case TRISTATE_FALSE:
2317 return false;
2318 case TRISTATE_TRUE:
2319 return true;
2320 default: // TRISTATE_INDET:
2322 }
2323}
2324
2325static BitmapEx readBitmapEx( const OUString& rPath )
2326{
2327 OUString aPath( rPath );
2328 rtl::Bootstrap::expandMacros( aPath );
2329
2330 // import the image
2331 Graphic aGraphic;
2332 if ( GraphicFilter::LoadGraphic( aPath, OUString(), aGraphic ) != ERRCODE_NONE )
2333 return BitmapEx();
2334 return aGraphic.GetBitmapEx();
2335}
2336
2337namespace {
2338
2339enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
2340
2341}
2342
2344static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, std::optional<Color>& rMenuBarTextColor )
2345{
2346 // don't burn time loading images we don't need.
2348 return;
2349
2350 // read from the configuration
2351 OUString aPersona( officecfg::Office::Common::Misc::Persona::get() );
2352 OUString aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get() );
2353 if (aPersona == "no")
2354 return;
2355
2356 // have the settings changed? marks if header /footer prepared before
2357 //should maybe extended to a flag that marks if header /footer /both are loaded
2358 OUString aOldValue= eWhich==PERSONA_HEADER?OUString(aPersona + ";" + aPersonaSettings+";h" ):OUString(aPersona + ";" + aPersonaSettings+";f" );
2359 if ( rHeaderFooter == aOldValue )
2360 return;
2361
2362 rHeaderFooter = aOldValue;
2363 rHeaderFooterBitmap = BitmapEx();
2364 rMenuBarTextColor.reset();
2365
2366 // now read the new values and setup bitmaps
2367 OUString aHeader, aFooter;
2368 if ( aPersona == "own" || aPersona == "default" )
2369 {
2370 sal_Int32 nIndex = 0;
2371
2372 // Skip the persona slug, name, and preview
2373 aHeader = aPersonaSettings.getToken( 3, ';', nIndex );
2374
2375 if ( nIndex > 0 )
2376 aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
2377
2378 // change menu text color, advance nIndex to skip the '#'
2379 if ( nIndex > 0 )
2380 {
2381 OUString aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
2382 rMenuBarTextColor = Color( ColorTransparency, aColor.toUInt32( 16 ) );
2383 }
2384 }
2385
2386 OUString aName;
2387 switch ( eWhich ) {
2388 case PERSONA_HEADER: aName = aHeader; break;
2389 case PERSONA_FOOTER: aName = aFooter; break;
2390 }
2391
2392 if ( !aName.isEmpty() )
2393 {
2394 OUString gallery("");
2395 // try the gallery first, then the program path:
2396 if ( aPersona == "own" && !aPersonaSettings.startsWith( "vnd.sun.star.expand" ) )
2397 {
2398 gallery = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
2399 rtl::Bootstrap::expandMacros( gallery );
2400 gallery += "/user/gallery/personas/";
2401 }
2402 else if ( aPersona == "default" )
2403 {
2404 gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/";
2405 }
2406 rHeaderFooterBitmap = readBitmapEx( gallery + aName );
2407
2408 if ( rHeaderFooterBitmap.IsEmpty() )
2409 rHeaderFooterBitmap = readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" + aName );
2410 }
2411
2412 // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
2413
2414 if( rHeaderFooterBitmap.IsEmpty() )
2415 {
2416 std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
2417 officecfg::Office::Common::Misc::Persona::set( "no", batch );
2418 officecfg::Office::Common::Misc::PersonaSettings::set( "", batch );
2419 batch->commit();
2420 }
2421}
2422
2424{
2425 setupPersonaHeaderFooter( PERSONA_HEADER, mxData->maPersonaHeaderFooter, mxData->maPersonaHeaderBitmap, mxData->maPersonaMenuBarTextColor );
2426 return mxData->maPersonaHeaderBitmap;
2427}
2428
2430{
2431 setupPersonaHeaderFooter( PERSONA_FOOTER, mxData->maPersonaHeaderFooter, mxData->maPersonaFooterBitmap, mxData->maPersonaMenuBarTextColor );
2432 return mxData->maPersonaFooterBitmap;
2433}
2434
2435const std::optional<Color>& StyleSettings::GetPersonaMenuBarTextColor() const
2436{
2438 return mxData->maPersonaMenuBarTextColor;
2439}
2440
2442{
2443 CopyData();
2444 mxData->SetStandardStyles();
2445}
2446
2448{
2449 // compute a brighter face color that can be used in gradients
2450 // for a convex look (eg toolbars)
2451
2452 sal_uInt16 h, s, b;
2453 GetFaceColor().RGBtoHSB( h, s, b );
2454 if( s > 1) s=1;
2455 if( b < 98) b=98;
2456 return Color::HSBtoRGB( h, s, b );
2457}
2458
2460{
2461 // compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
2462 sal_uInt16 h, s, b;
2463 GetShadowColor().RGBtoHSB( h, s, b );
2464 b += b/4;
2465 s -= s/4;
2466 return Color::HSBtoRGB( h, s, b );
2467}
2468
2470{
2471 // copy if other references exist
2472 if (mxData.use_count() > 1)
2473 {
2474 mxData = std::make_shared<ImplStyleData>(*mxData);
2475 }
2476}
2477
2479{
2480 if ( mxData == rSet.mxData )
2481 return true;
2482
2483 if (mxData->mIconTheme != rSet.mxData->mIconTheme) {
2484 return false;
2485 }
2486
2487 if (*mxData->mIconThemeSelector != *rSet.mxData->mIconThemeSelector) {
2488 return false;
2489 }
2490
2491 return (mxData->mnOptions == rSet.mxData->mnOptions) &&
2492 (mxData->mbAutoMnemonic == rSet.mxData->mbAutoMnemonic) &&
2493 (mxData->mnDragFullOptions == rSet.mxData->mnDragFullOptions) &&
2494 (mxData->mnSelectionOptions == rSet.mxData->mnSelectionOptions) &&
2495 (mxData->mnDisplayOptions == rSet.mxData->mnDisplayOptions) &&
2496 (mxData->mnCursorSize == rSet.mxData->mnCursorSize) &&
2497 (mxData->mnCursorBlinkTime == rSet.mxData->mnCursorBlinkTime) &&
2498 (mxData->mnTitleHeight == rSet.mxData->mnTitleHeight) &&
2499 (mxData->mnFloatTitleHeight == rSet.mxData->mnFloatTitleHeight) &&
2500 (mxData->mnScrollBarSize == rSet.mxData->mnScrollBarSize) &&
2501 (mxData->mnMinThumbSize == rSet.mxData->mnMinThumbSize) &&
2502 (mxData->mnSpinSize == rSet.mxData->mnSpinSize) &&
2503 (mxData->mnAntialiasedMin == rSet.mxData->mnAntialiasedMin) &&
2504 (mxData->mbHighContrast == rSet.mxData->mbHighContrast) &&
2505 (mxData->mbUseSystemUIFonts == rSet.mxData->mbUseSystemUIFonts) &&
2506 (mxData->mbUseFontAAFromSystem == rSet.mxData->mbUseFontAAFromSystem) &&
2507 (mxData->mnUseFlatBorders == rSet.mxData->mnUseFlatBorders) &&
2508 (mxData->mnUseFlatMenus == rSet.mxData->mnUseFlatMenus) &&
2509 (mxData->maFaceColor == rSet.mxData->maFaceColor) &&
2510 (mxData->maCheckedColor == rSet.mxData->maCheckedColor) &&
2511 (mxData->maLightColor == rSet.mxData->maLightColor) &&
2512 (mxData->maLightBorderColor == rSet.mxData->maLightBorderColor) &&
2513 (mxData->maShadowColor == rSet.mxData->maShadowColor) &&
2514 (mxData->maDarkShadowColor == rSet.mxData->maDarkShadowColor) &&
2515 (mxData->maWarningColor == rSet.mxData->maWarningColor) &&
2516 (mxData->maButtonTextColor == rSet.mxData->maButtonTextColor) &&
2517 (mxData->maDefaultActionButtonTextColor == rSet.mxData->maDefaultActionButtonTextColor) &&
2518 (mxData->maActionButtonTextColor == rSet.mxData->maActionButtonTextColor) &&
2519 (mxData->maButtonRolloverTextColor == rSet.mxData->maButtonRolloverTextColor) &&
2520 (mxData->maActionButtonRolloverTextColor == rSet.mxData->maActionButtonRolloverTextColor) &&
2521 (mxData->maRadioCheckTextColor == rSet.mxData->maRadioCheckTextColor) &&
2522 (mxData->maGroupTextColor == rSet.mxData->maGroupTextColor) &&
2523 (mxData->maLabelTextColor == rSet.mxData->maLabelTextColor) &&
2524 (mxData->maWindowColor == rSet.mxData->maWindowColor) &&
2525 (mxData->maWindowTextColor == rSet.mxData->maWindowTextColor) &&
2526 (mxData->maDialogColor == rSet.mxData->maDialogColor) &&
2527 (mxData->maDialogTextColor == rSet.mxData->maDialogTextColor) &&
2528 (mxData->maWorkspaceColor == rSet.mxData->maWorkspaceColor) &&
2529 (mxData->maMonoColor == rSet.mxData->maMonoColor) &&
2530 (mxData->maFieldColor == rSet.mxData->maFieldColor) &&
2531 (mxData->maFieldTextColor == rSet.mxData->maFieldTextColor) &&
2532 (mxData->maActiveColor == rSet.mxData->maActiveColor) &&
2533 (mxData->maActiveTextColor == rSet.mxData->maActiveTextColor) &&
2534 (mxData->maActiveBorderColor == rSet.mxData->maActiveBorderColor) &&
2535 (mxData->maDeactiveColor == rSet.mxData->maDeactiveColor) &&
2536 (mxData->maDeactiveTextColor == rSet.mxData->maDeactiveTextColor) &&
2537 (mxData->maDeactiveBorderColor == rSet.mxData->maDeactiveBorderColor) &&
2538 (mxData->maMenuColor == rSet.mxData->maMenuColor) &&
2539 (mxData->maMenuBarColor == rSet.mxData->maMenuBarColor) &&
2540 (mxData->maMenuBarRolloverColor == rSet.mxData->maMenuBarRolloverColor) &&
2541 (mxData->maMenuBorderColor == rSet.mxData->maMenuBorderColor) &&
2542 (mxData->maMenuTextColor == rSet.mxData->maMenuTextColor) &&
2543 (mxData->maListBoxWindowBackgroundColor == rSet.mxData->maListBoxWindowBackgroundColor) &&
2544 (mxData->maListBoxWindowTextColor == rSet.mxData->maListBoxWindowTextColor) &&
2545 (mxData->maListBoxWindowHighlightColor == rSet.mxData->maListBoxWindowHighlightColor) &&
2546 (mxData->maListBoxWindowHighlightTextColor == rSet.mxData->maListBoxWindowHighlightTextColor) &&
2547 (mxData->maMenuBarTextColor == rSet.mxData->maMenuBarTextColor) &&
2548 (mxData->maMenuBarRolloverTextColor == rSet.mxData->maMenuBarRolloverTextColor) &&
2549 (mxData->maMenuHighlightColor == rSet.mxData->maMenuHighlightColor) &&
2550 (mxData->maMenuHighlightTextColor == rSet.mxData->maMenuHighlightTextColor) &&
2551 (mxData->maHighlightColor == rSet.mxData->maHighlightColor) &&
2552 (mxData->maHighlightTextColor == rSet.mxData->maHighlightTextColor) &&
2553 (mxData->maTabTextColor == rSet.mxData->maTabTextColor) &&
2554 (mxData->maTabRolloverTextColor == rSet.mxData->maTabRolloverTextColor) &&
2555 (mxData->maTabHighlightTextColor == rSet.mxData->maTabHighlightTextColor) &&
2556 (mxData->maActiveTabColor == rSet.mxData->maActiveTabColor) &&
2557 (mxData->maInactiveTabColor == rSet.mxData->maInactiveTabColor) &&
2558 (mxData->maDisableColor == rSet.mxData->maDisableColor) &&
2559 (mxData->maHelpColor == rSet.mxData->maHelpColor) &&
2560 (mxData->maHelpTextColor == rSet.mxData->maHelpTextColor) &&
2561 (mxData->maLinkColor == rSet.mxData->maLinkColor) &&
2562 (mxData->maVisitedLinkColor == rSet.mxData->maVisitedLinkColor) &&
2563 (mxData->maToolTextColor == rSet.mxData->maToolTextColor) &&
2564 (mxData->maAppFont == rSet.mxData->maAppFont) &&
2565 (mxData->maHelpFont == rSet.mxData->maHelpFont) &&
2566 (mxData->maTitleFont == rSet.mxData->maTitleFont) &&
2567 (mxData->maFloatTitleFont == rSet.mxData->maFloatTitleFont) &&
2568 (mxData->maMenuFont == rSet.mxData->maMenuFont) &&
2569 (mxData->maToolFont == rSet.mxData->maToolFont) &&
2570 (mxData->maGroupFont == rSet.mxData->maGroupFont) &&
2571 (mxData->maLabelFont == rSet.mxData->maLabelFont) &&
2572 (mxData->maRadioCheckFont == rSet.mxData->maRadioCheckFont) &&
2573 (mxData->maPushButtonFont == rSet.mxData->maPushButtonFont) &&
2574 (mxData->maFieldFont == rSet.mxData->maFieldFont) &&
2575 (mxData->maIconFont == rSet.mxData->maIconFont) &&
2576 (mxData->maTabFont == rSet.mxData->maTabFont) &&
2577 (mxData->meUseImagesInMenus == rSet.mxData->meUseImagesInMenus) &&
2578 (mxData->mbPreferredUseImagesInMenus == rSet.mxData->mbPreferredUseImagesInMenus) &&
2579 (mxData->mbSkipDisabledInMenus == rSet.mxData->mbSkipDisabledInMenus) &&
2580 (mxData->mbHideDisabledMenuItems == rSet.mxData->mbHideDisabledMenuItems) &&
2581 (mxData->mbPreferredContextMenuShortcuts == rSet.mxData->mbPreferredContextMenuShortcuts)&&
2582 (mxData->meContextMenuShortcuts == rSet.mxData->meContextMenuShortcuts) &&
2583 (mxData->mbPrimaryButtonWarpsSlider == rSet.mxData->mbPrimaryButtonWarpsSlider) &&
2584 (mxData->maFontColor == rSet.mxData->maFontColor) &&
2585 (mxData->mnEdgeBlending == rSet.mxData->mnEdgeBlending) &&
2586 (mxData->maEdgeBlendingTopLeftColor == rSet.mxData->maEdgeBlendingTopLeftColor) &&
2587 (mxData->maEdgeBlendingBottomRightColor == rSet.mxData->maEdgeBlendingBottomRightColor) &&
2588 (mxData->mnListBoxMaximumLineCount == rSet.mxData->mnListBoxMaximumLineCount) &&
2589 (mxData->mnColorValueSetColumnCount == rSet.mxData->mnColorValueSetColumnCount) &&
2590 (mxData->maListBoxPreviewDefaultLogicSize == rSet.mxData->maListBoxPreviewDefaultLogicSize) &&
2591 (mxData->maListBoxPreviewDefaultPixelSize == rSet.mxData->maListBoxPreviewDefaultPixelSize) &&
2592 (mxData->mbPreviewUsesCheckeredBackground == rSet.mxData->mbPreviewUsesCheckeredBackground);
2593}
2594
2596 mnEnableATT(TRISTATE_INDET),
2597 mnDisablePrinting(TRISTATE_INDET)
2598{
2599 static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
2600 mbEnableLocalizedDecimalSep = (pEnv != nullptr);
2601}
2602
2604 : mxData(std::make_shared<ImplMiscData>())
2605{
2606}
2607
2609{
2610 if ( mxData == rSet.mxData )
2611 return true;
2612
2613 return (mxData->mnEnableATT == rSet.mxData->mnEnableATT ) &&
2614 (mxData->mnDisablePrinting == rSet.mxData->mnDisablePrinting ) &&
2615 (mxData->mbEnableLocalizedDecimalSep == rSet.mxData->mbEnableLocalizedDecimalSep );
2616}
2617
2618bool
2620{
2621 return !(*this == rSet);
2622}
2623
2625{
2626 if( mxData->mnDisablePrinting == TRISTATE_INDET )
2627 {
2628 OUString aEnable =
2630 getValue( "DesktopManagement",
2631 "DisablePrinting" );
2632 mxData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2633 }
2634
2635 return mxData->mnDisablePrinting != TRISTATE_FALSE;
2636}
2637
2639{
2640
2641#ifdef _WIN32
2642 if( mxData->mnEnableATT == TRISTATE_INDET )
2643 {
2644 // Check in the Windows registry if an AT tool wants Accessibility support to
2645 // be activated ..
2646 HKEY hkey;
2647
2648 if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2649 L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2650 &hkey) )
2651 {
2652 DWORD dwType;
2653 wchar_t Data[6]; // possible values: "true", "false", "1", "0", DWORD
2654 DWORD cbData = sizeof(Data);
2655
2656 if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2657 nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2658 {
2659 switch (dwType)
2660 {
2661 case REG_SZ:
2662 mxData->mnEnableATT = ((0 == wcsicmp(Data, L"1")) || (0 == wcsicmp(Data, L"true"))) ? TRISTATE_TRUE : TRISTATE_FALSE;
2663 break;
2664 case REG_DWORD:
2665 switch (reinterpret_cast<DWORD *>(Data)[0]) {
2666 case 0:
2667 mxData->mnEnableATT = TRISTATE_FALSE;
2668 break;
2669 case 1:
2670 mxData->mnEnableATT = TRISTATE_TRUE;
2671 break;
2672 default:
2673 mxData->mnEnableATT = TRISTATE_INDET;
2674 //TODO: or TRISTATE_TRUE?
2675 break;
2676 }
2677 break;
2678 default:
2679 // Unsupported registry type
2680 break;
2681 }
2682 }
2683
2684 RegCloseKey(hkey);
2685 }
2686 }
2687#endif
2688
2689 if( mxData->mnEnableATT == TRISTATE_INDET )
2690 {
2691 static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
2692 if( !pEnv || !*pEnv )
2693 {
2694 OUString aEnable =
2696 getValue( "Accessibility",
2697 "EnableATToolSupport" );
2698 mxData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2699 }
2700 else
2701 {
2702 mxData->mnEnableATT = TRISTATE_TRUE;
2703 }
2704 }
2705
2706 return mxData->mnEnableATT != TRISTATE_FALSE;
2707}
2708
2709#ifdef _WIN32
2710void MiscSettings::SetEnableATToolSupport( bool bEnable )
2711{
2712 if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mxData->mnEnableATT )
2713 {
2714 if( bEnable && !ImplInitAccessBridge() )
2715 return;
2716
2717 HKEY hkey;
2718
2719 // If the accessibility key in the Windows registry exists, change it synchronously
2720 if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2721 L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2722 &hkey) )
2723 {
2724 DWORD dwType;
2725 wchar_t Data[6]; // possible values: "true", "false", 1, 0
2726 DWORD cbData = sizeof(Data);
2727
2728 if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2729 nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2730 {
2731 switch (dwType)
2732 {
2733 case REG_SZ:
2734 RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2735 0, dwType,
2736 reinterpret_cast<const BYTE*>(bEnable ? L"true" : L"false"),
2737 bEnable ? sizeof(L"true") : sizeof(L"false"));
2738 break;
2739 case REG_DWORD:
2740 reinterpret_cast<DWORD *>(Data)[0] = bEnable ? 1 : 0;
2741 RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2742 0, dwType, reinterpret_cast<const BYTE*>(Data), sizeof(DWORD));
2743 break;
2744 default:
2745 // Unsupported registry type
2746 break;
2747 }
2748 }
2749
2750 RegCloseKey(hkey);
2751 }
2752
2754 setValue( "Accessibility",
2755 "EnableATToolSupport",
2756 bEnable ? OUString("true") : OUString("false" ) );
2757 mxData->mnEnableATT = bEnable ? TRISTATE_TRUE : TRISTATE_FALSE;
2758 }
2759}
2760#endif
2761
2763{
2764 // copy if other references exist
2765 if (mxData.use_count() > 1)
2766 {
2767 mxData = std::make_shared<ImplMiscData>(*mxData);
2768 }
2769 mxData->mbEnableLocalizedDecimalSep = bEnable;
2770}
2771
2773{
2774 return mxData->mbEnableLocalizedDecimalSep;
2775}
2776
2778 : mxData(std::make_shared<ImplHelpData>())
2779{
2780}
2781
2783{
2784 if ( mxData == rSet.mxData )
2785 return true;
2786
2787 return (mxData->mnTipTimeout == rSet.mxData->mnTipTimeout );
2788}
2789
2790sal_Int32
2792{
2793 return 500;
2794}
2795
2796void
2797HelpSettings::SetTipTimeout( sal_Int32 nTipTimeout )
2798{
2799 // copy if other references exist
2800 if (mxData.use_count() > 1)
2801 {
2802 mxData = std::make_shared<ImplHelpData>(*mxData);
2803 }
2804 mxData->mnTipTimeout = nTipTimeout;
2805}
2806
2807sal_Int32
2809{
2810 return mxData->mnTipTimeout;
2811}
2812
2813sal_Int32
2815{
2816 return 1500;
2817}
2818
2819bool
2821{
2822 return !(*this == rSet);
2823}
2824
2826 :
2827 maLocale( LANGUAGE_SYSTEM ),
2828 maUILocale( LANGUAGE_SYSTEM )
2829{
2832}
2833
2835 maMouseSettings( rData.maMouseSettings ),
2836 maStyleSettings( rData.maStyleSettings ),
2837 maMiscSettings( rData.maMiscSettings ),
2838 maHelpSettings( rData.maHelpSettings ),
2839 maLocale( rData.maLocale ),
2840 maUILocale( rData.maUILocale )
2841{
2842 // Create the cache objects new when their getter is called.
2843}
2844
2846{
2847 mpLocaleDataWrapper.reset();
2848 mpUILocaleDataWrapper.reset();
2850 mpI18nHelper.reset();
2851 mpUII18nHelper.reset();
2852}
2853
2855 : mxData(std::make_shared<ImplAllSettingsData>())
2856{
2857}
2858
2860{
2861 // copy if other references exist
2862 if (mxData.use_count() > 1)
2863 {
2864 mxData = std::make_shared<ImplAllSettingsData>(*mxData);
2865 }
2866
2867}
2868
2870{
2871
2873
2874 if ( nFlags & AllSettingsFlags::MOUSE )
2875 {
2876 if ( mxData->maMouseSettings != rSet.mxData->maMouseSettings )
2877 {
2878 CopyData();
2879 mxData->maMouseSettings = rSet.mxData->maMouseSettings;
2880 nChangeFlags |= AllSettingsFlags::MOUSE;
2881 }
2882 }
2883
2884 if ( nFlags & AllSettingsFlags::STYLE )
2885 {
2886 if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2887 {
2888 CopyData();
2889 mxData->maStyleSettings = rSet.mxData->maStyleSettings;
2890 nChangeFlags |= AllSettingsFlags::STYLE;
2891 }
2892 }
2893
2894 if ( nFlags & AllSettingsFlags::MISC )
2895 {
2896 if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2897 {
2898 CopyData();
2899 mxData->maMiscSettings = rSet.mxData->maMiscSettings;
2900 nChangeFlags |= AllSettingsFlags::MISC;
2901 }
2902 }
2903
2904 if ( nFlags & AllSettingsFlags::LOCALE )
2905 {
2906 if ( mxData->maLocale != rSet.mxData->maLocale )
2907 {
2908 SetLanguageTag( rSet.mxData->maLocale );
2909 nChangeFlags |= AllSettingsFlags::LOCALE;
2910 }
2911 }
2912
2913 return nChangeFlags;
2914}
2915
2917{
2918
2920
2921 if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2922 nChangeFlags |= AllSettingsFlags::STYLE;
2923
2924 if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2925 nChangeFlags |= AllSettingsFlags::MISC;
2926
2927 if ( mxData->maLocale != rSet.mxData->maLocale )
2928 nChangeFlags |= AllSettingsFlags::LOCALE;
2929
2930 return nChangeFlags;
2931}
2932
2933bool AllSettings::operator ==( const AllSettings& rSet ) const
2934{
2935 if ( mxData == rSet.mxData )
2936 return true;
2937
2938 if ( (mxData->maMouseSettings == rSet.mxData->maMouseSettings) &&
2939 (mxData->maStyleSettings == rSet.mxData->maStyleSettings) &&
2940 (mxData->maMiscSettings == rSet.mxData->maMiscSettings) &&
2941 (mxData->maHelpSettings == rSet.mxData->maHelpSettings) &&
2942 (mxData->maLocale == rSet.mxData->maLocale) )
2943 {
2944 return true;
2945 }
2946
2947 return false;
2948}
2949
2950void AllSettings::SetLanguageTag(const OUString& rLanguage, bool bCanonicalize)
2951{
2952 SetLanguageTag(LanguageTag(rLanguage, bCanonicalize));
2953}
2954
2955void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag )
2956{
2957 if (mxData->maLocale == rLanguageTag)
2958 return;
2959
2960 CopyData();
2961
2962 mxData->maLocale = rLanguageTag;
2963
2964 if ( mxData->mpLocaleDataWrapper )
2965 {
2966 mxData->mpLocaleDataWrapper.reset();
2967 }
2968 if ( mxData->mpI18nHelper )
2969 {
2970 mxData->mpI18nHelper.reset();
2971 }
2972}
2973
2974namespace
2975{
2976 bool GetConfigLayoutRTL(bool bMath)
2977 {
2978 static const char* pEnv = getenv("SAL_RTL_ENABLED" );
2979 static int nUIMirroring = -1; // -1: undef, 0: auto, 1: on 2: off
2980
2981 // environment always overrides
2982 if( pEnv )
2983 return true;
2984
2985 bool bRTL = false;
2986
2987 if( nUIMirroring == -1 )
2988 {
2989 nUIMirroring = 0; // ask configuration only once
2992 "org.openoffice.Office.Common/I18N/CTL" ); // note: case sensitive !
2993 if ( aNode.isValid() )
2994 {
2995 bool bTmp = bool();
2996 css::uno::Any aValue = aNode.getNodeValue( "UIMirroring" );
2997 if( aValue >>= bTmp )
2998 {
2999 // found true or false; if it was nil, nothing is changed
3000 nUIMirroring = bTmp ? 1 : 2;
3001 }
3002 }
3003 }
3004
3005 if( nUIMirroring == 0 ) // no config found (eg, setup) or default (nil) was set: check language
3006 {
3008 if (bMath)
3009 bRTL = MsLangId::isRightToLeftMath( aLang );
3010 else
3011 bRTL = MsLangId::isRightToLeft( aLang );
3012 }
3013 else
3014 bRTL = (nUIMirroring == 1);
3015
3016 return bRTL;
3017 }
3018}
3019
3021{
3023 return false;
3024 return GetConfigLayoutRTL(false);
3025}
3026
3028{
3030 return false;
3031 return GetConfigLayoutRTL(true);
3032}
3033
3035{
3037 {
3038 static LanguageTag aRet("en-US");
3039 return aRet;
3040 }
3041
3044
3045 // SYSTEM locale means: use settings from SvtSysLocale that is resolved
3046 if ( mxData->maLocale.isSystemLocale() )
3047 mxData->maLocale = mxData->maSysLocale.GetLanguageTag();
3048
3049 return mxData->maLocale;
3050}
3051
3053{
3055 {
3056 static LanguageTag aRet("en-US");
3057 return aRet;
3058 }
3059
3062
3063 // the UILocale is never changed
3064 if ( mxData->maUILocale.isSystemLocale() )
3065 mxData->maUILocale = mxData->maSysLocale.GetUILanguageTag();
3066
3067 return mxData->maUILocale;
3068}
3069
3071{
3072 if ( !mxData->mpLocaleDataWrapper )
3073 const_cast<AllSettings*>(this)->mxData->mpLocaleDataWrapper.reset( new LocaleDataWrapper(
3075 return *mxData->mpLocaleDataWrapper;
3076}
3077
3079{
3080 if ( !mxData->mpUILocaleDataWrapper )
3081 const_cast<AllSettings*>(this)->mxData->mpUILocaleDataWrapper.reset( new LocaleDataWrapper(
3083 return *mxData->mpUILocaleDataWrapper;
3084}
3085
3087{
3088 if ( !mxData->mpNeutralLocaleDataWrapper )
3089 const_cast<AllSettings*>(this)->mxData->mpNeutralLocaleDataWrapper.reset( new LocaleDataWrapper(
3091 return *mxData->mpNeutralLocaleDataWrapper;
3092}
3093
3095{
3096 if ( !mxData->mpI18nHelper ) {
3097 const_cast<AllSettings*>(this)->mxData->mpI18nHelper.reset( new vcl::I18nHelper(
3099 }
3100 return *mxData->mpI18nHelper;
3101}
3102
3104{
3105 if ( !mxData->mpUII18nHelper ) {
3106 const_cast<AllSettings*>(this)->mxData->mpUII18nHelper.reset( new vcl::I18nHelper(
3108 }
3109 return *mxData->mpUII18nHelper;
3110}
3111
3113{
3114 AllSettings aAllSettings( Application::GetSettings() );
3115 if ( nHint & ConfigurationHints::DecSep )
3116 {
3117 MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
3118 bool bIsDecSepAsLocale = aAllSettings.mxData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale();
3119 if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale )
3120 {
3121 aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale );
3122 aAllSettings.SetMiscSettings( aMiscSettings );
3123 }
3124 }
3125
3126 if ( nHint & ConfigurationHints::Locale )
3127 aAllSettings.SetLanguageTag( aAllSettings.mxData->maSysLocale.GetOptions().GetLanguageTag() );
3128
3129 Application::SetSettings( aAllSettings );
3130}
3131
3132const StyleSettings&
3134{
3135 return mxData->maStyleSettings;
3136}
3137
3140{
3141 return mxData->mnOptions;
3142}
3143
3144std::vector<vcl::IconThemeInfo> const &
3146{
3147 if (!mxData->mIconThemeScanner) {
3149 }
3150 return mxData->mIconThemeScanner->GetFoundIconThemes();
3151}
3152
3153/*static*/ OUString
3155{
3156 OUString desktopEnvironment = Application::GetDesktopEnvironment();
3157 if (!mxData->mIconThemeScanner) {
3159 }
3160 OUString themeName = mxData->mIconThemeSelector->SelectIconThemeForDesktopEnvironment(
3161 mxData->mIconThemeScanner->GetFoundIconThemes(),
3162 desktopEnvironment
3163 );
3164 return themeName;
3165}
3166
3167void
3168StyleSettings::SetIconTheme(const OUString& theme)
3169{
3170 CopyData();
3171 mxData->mIconTheme = theme;
3172}
3173
3174OUString
3176{
3177 OUString sTheme(mxData->mIconTheme);
3178 if (sTheme.isEmpty())
3179 {
3181 sTheme = "colibre";
3182 else
3183 {
3184 // read from the configuration, or fallback to what the desktop wants
3185 sTheme = officecfg::Office::Common::Misc::SymbolStyle::get();
3186
3187 if (sTheme.isEmpty() || sTheme == "auto")
3189 }
3190 }
3191
3192 if (!mxData->mIconThemeScanner) {
3194 }
3195 OUString r = mxData->mIconThemeSelector->SelectIconTheme(
3196 mxData->mIconThemeScanner->GetFoundIconThemes(),
3197 sTheme);
3198 return r;
3199}
3200
3201void
3203{
3204 if (mxData->mbHighContrast == bHighContrast) {
3205 return;
3206 }
3207
3208 CopyData();
3209 mxData->mbHighContrast = bHighContrast;
3210 mxData->mIconThemeSelector->SetUseHighContrastTheme(bHighContrast);
3211}
3212
3213bool
3215{
3216 return mxData->mbHighContrast;
3217}
3218
3219void
3220StyleSettings::SetPreferredIconTheme(const OUString& theme, bool bDarkIconTheme)
3221{
3222 const bool bChanged = mxData->mIconThemeSelector->SetPreferredIconTheme(theme, bDarkIconTheme);
3223 if (bChanged)
3224 {
3225 // clear this so it is recalculated if it was selected as the automatic theme
3226 mxData->mIconTheme.clear();
3227 }
3228}
3229
3230void
3232{
3233 CopyData();
3234 mxData->maMouseSettings = rSet;
3235}
3236
3237const MouseSettings&
3239{
3240 return mxData->maMouseSettings;
3241}
3242
3243void
3245{
3246 CopyData();
3247 mxData->maStyleSettings = rSet;
3248}
3249
3250void
3252{
3253 CopyData();
3254 mxData->maMiscSettings = rSet;
3255}
3256
3257const MiscSettings&
3259{
3260 return mxData->maMiscSettings;
3261}
3262
3263void
3265{
3266 CopyData();
3267 mxData->maHelpSettings = rSet;
3268}
3269
3270const HelpSettings&
3272{
3273 return mxData->maHelpSettings;
3274}
3275
3276bool
3278{
3279 return !(*this == rSet);
3280}
3281
3284{
3285 return mxData->maSysLocale;
3286}
3287
3288
3290 bool bCheckedColorSpecialCase )
3291{
3292 Set3DColors( aBackColor );
3293 SetFaceColor( aBackColor );
3294 SetDialogColor( aBackColor );
3295 SetWorkspaceColor( aBackColor );
3296
3297 if (bCheckedColorSpecialCase)
3299}
3300
3302 const vcl::Font& aLabelFont )
3303{
3304 SetAppFont( aAppFont );
3305 SetPushButtonFont( aAppFont );
3306 SetToolFont( aAppFont );
3307 SetHelpFont( aAppFont );
3308
3309 SetMenuFont( aLabelFont );
3310 SetTabFont( aLabelFont );
3311 SetLabelFont( aLabelFont );
3312 SetRadioCheckFont( aLabelFont );
3313 SetFieldFont( aLabelFont );
3314 SetGroupFont( aLabelFont );
3315 SetIconFont( aLabelFont );
3316}
3317
3318/* 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:691
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:1164
static const AllSettings & GetSettings()
Gets the application's settings.
Definition: svapp.cxx:760
static const OUString & GetDesktopEnvironment()
Get the desktop environment the process is currently running in.
Definition: svapp.cxx:1712
static void SetSettings(const AllSettings &rSettings)
Sets the application's settings and notifies all windows of the change.
Definition: svapp.cxx:666
static bool IsHeadlessModeEnabled()
Determines if headless mode is enabled.
Definition: svapp.cxx:1656
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:329
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:659
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:639
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:933
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 SetFontColor(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)
const Color & GetFontColor() const
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:249
void SetCharSet(rtl_TextEncoding)
Definition: font/font.cxx:160
void SetFamilyName(const OUString &rFamilyName)
Definition: font/font.cxx:136
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
Definition: errcode.hxx:196
#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
const ContentProperties & rData
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:674
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:404
bool mbCanDetermineWindowPosition
Definition: svdata.hxx:345
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