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 
31 #include <i18nlangtag/mslangid.hxx>
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>
49 #include <unotools/confignode.hxx>
50 #include <unotools/configmgr.hxx>
51 #include <unotools/syslocale.hxx>
53 
54 using namespace ::com::sun::star;
55 
56 #include <svdata.hxx>
57 
59 {
61  sal_uInt64 mnDoubleClkTime = 500;
71 };
72 
74 {
75  ImplStyleData();
77 
78  void SetStandardStyles();
79 
164  sal_uInt64 mnCursorBlinkTime;
183  std::shared_ptr<vcl::IconThemeScanner>
185  std::shared_ptr<vcl::IconThemeSelector>
187 
188  OUString mIconTheme;
193  //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise
194  //primary means scroll by single page. Secondary button takes the alternative behaviour
197 
198  sal_uInt16 mnEdgeBlending;
206 
208 
211  std::optional<Color> maPersonaMenuBarTextColor;
212 };
213 
215 {
216  ImplMiscData();
220 };
221 
223 {
225 };
226 
228 {
232 
239  std::unique_ptr<LocaleDataWrapper> mpLocaleDataWrapper;
240  std::unique_ptr<LocaleDataWrapper> mpUILocaleDataWrapper;
241  std::unique_ptr<LocaleDataWrapper> mpNeutralLocaleDataWrapper;
242  std::unique_ptr<vcl::I18nHelper> mpI18nHelper;
243  std::unique_ptr<vcl::I18nHelper> mpUII18nHelper;
245 };
246 
247 void
249 {
250  CopyData();
251  mxData->mnOptions = nOptions;
252 }
253 
256 {
257  return mxData->mnOptions;
258 }
259 
260 void
261 MouseSettings::SetDoubleClickTime( sal_uInt64 nDoubleClkTime )
262 {
263  CopyData();
264  mxData->mnDoubleClkTime = nDoubleClkTime;
265 }
266 
267 sal_uInt64
269 {
270  return mxData->mnDoubleClkTime;
271 }
272 
273 void
275 {
276  CopyData();
277  mxData->mnDoubleClkWidth = nDoubleClkWidth;
278 }
279 
282 {
283  return mxData->mnDoubleClkWidth;
284 }
285 
286 void
288 {
289  CopyData();
290  mxData->mnDoubleClkHeight = nDoubleClkHeight;
291 }
292 
295 {
296  return mxData->mnDoubleClkHeight;
297 }
298 
299 void
301 {
302  CopyData();
303  mxData->mnStartDragWidth = nDragWidth;
304 }
305 
308 {
309  return mxData->mnStartDragWidth;
310 }
311 
312 void
314 {
315  CopyData();
316  mxData->mnStartDragHeight = nDragHeight;
317 }
318 
321 {
322  return mxData->mnStartDragHeight;
323 }
324 
325 sal_uInt16
327 {
328  return MOUSE_LEFT;
329 }
330 
331 sal_uInt16
333 {
334  return MOUSE_RIGHT;
335 }
336 
337 sal_uInt16
339 {
340  return 1;
341 }
342 
343 sal_uLong
345 {
346  return 100;
347 }
348 
349 sal_uLong
351 {
352  return 370;
353 }
354 
355 void
357 {
358  CopyData();
359  mxData->mnButtonRepeat = nRepeat;
360 }
361 
362 sal_uLong
364 {
365  return mxData->mnButtonRepeat;
366 }
367 
368 sal_uLong
370 {
371  return 250;
372 }
373 
374 void
376 {
377  CopyData();
378  mxData->mnMenuDelay = nDelay;
379 }
380 
381 sal_uLong
383 {
384  return mxData->mnMenuDelay;
385 }
386 
387 void
389 {
390  CopyData();
391  mxData->mnFollow = nFollow;
392 }
393 
396 {
397  return mxData->mnFollow;
398 }
399 
400 void
402 {
403  CopyData();
404  mxData->mnMiddleButtonAction = nAction;
405 }
406 
409 {
410  return mxData->mnMiddleButtonAction;
411 }
412 
413 void
415 {
416  CopyData();
417  mxData->mnWheelBehavior = nBehavior;
418 }
419 
422 {
423  return mxData->mnWheelBehavior;
424 }
425 
426 bool
428 {
429  return !(*this == rSet);
430 }
431 
433  : mxData(std::make_shared<ImplMouseData>())
434 {
435 }
436 
438 {
439  // copy if other references exist
440  if (mxData.use_count() > 1)
441  {
442  mxData = std::make_shared<ImplMouseData>(*mxData);
443  }
444 }
445 
446 bool MouseSettings::operator ==( const MouseSettings& rSet ) const
447 {
448  if ( mxData == rSet.mxData )
449  return true;
450 
451  return
452  (mxData->mnOptions == rSet.mxData->mnOptions) &&
453  (mxData->mnDoubleClkTime == rSet.mxData->mnDoubleClkTime) &&
454  (mxData->mnDoubleClkWidth == rSet.mxData->mnDoubleClkWidth) &&
455  (mxData->mnDoubleClkHeight == rSet.mxData->mnDoubleClkHeight) &&
456  (mxData->mnStartDragWidth == rSet.mxData->mnStartDragWidth) &&
457  (mxData->mnStartDragHeight == rSet.mxData->mnStartDragHeight) &&
458  (mxData->mnMiddleButtonAction == rSet.mxData->mnMiddleButtonAction) &&
459  (mxData->mnButtonRepeat == rSet.mxData->mnButtonRepeat) &&
460  (mxData->mnMenuDelay == rSet.mxData->mnMenuDelay) &&
461  (mxData->mnFollow == rSet.mxData->mnFollow) &&
462  (mxData->mnWheelBehavior == rSet.mxData->mnWheelBehavior );
463 }
464 
466  mnScrollBarSize(16),
467  mnSpinSize(16),
468  mnCursorSize(2),
469  mnAntialiasedMin(0),
470  mnCursorBlinkTime(STYLE_CURSOR_NOBLINKTIME),
471  mnDragFullOptions(DragFullOptions::All),
472  mnSelectionOptions(SelectionOptions::NONE),
473  mnDisplayOptions(DisplayOptions::NONE),
474  mnToolbarIconSize(ToolbarIconSize::Unknown),
475  mnOptions(StyleSettingsOptions::NONE),
476  mbAutoMnemonic(true),
477  meUseImagesInMenus(TRISTATE_INDET),
478  mnMinThumbSize(16),
479  mIconThemeSelector(std::make_shared<vcl::IconThemeSelector>()),
480  meContextMenuShortcuts(TRISTATE_INDET),
481  mnEdgeBlending(35),
482  maEdgeBlendingTopLeftColor(Color(0xC0, 0xC0, 0xC0)),
483  maEdgeBlendingBottomRightColor(Color(0x40, 0x40, 0x40)),
484  mnListBoxMaximumLineCount(25),
485  // For some reason this isn't actually the column count that gets used, at least on iOS, but
486  // instead what SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() in
487  // svtools/source/config/accessibilityoptions.cxx returns.
488  mnColorValueSetColumnCount(12),
489 #ifdef IOS
490  maListBoxPreviewDefaultLogicSize(Size(30, 30)),
491 #else
492  maListBoxPreviewDefaultLogicSize(Size(15, 7)),
493 #endif
494  maListBoxPreviewDefaultPixelSize(Size(0, 0)), // on-demand calculated in GetListBoxPreviewDefaultPixelSize(),
495  mbPreviewUsesCheckeredBackground(true)
496 {
498 }
499 
501  maActiveBorderColor( rData.maActiveBorderColor ),
502  maActiveColor( rData.maActiveColor ),
503  maActiveTextColor( rData.maActiveTextColor ),
504  maAlternatingRowColor( rData.maAlternatingRowColor ),
505  maDefaultButtonTextColor( rData.maDefaultButtonTextColor ),
506  maButtonTextColor( rData.maButtonTextColor ),
507  maDefaultActionButtonTextColor( rData.maDefaultActionButtonTextColor ),
508  maActionButtonTextColor( rData.maActionButtonTextColor ),
509  maFlatButtonTextColor( rData.maFlatButtonTextColor ),
510  maDefaultButtonRolloverTextColor( rData.maDefaultButtonRolloverTextColor ),
511  maButtonRolloverTextColor( rData.maButtonRolloverTextColor ),
512  maDefaultActionButtonRolloverTextColor( rData.maDefaultActionButtonRolloverTextColor ),
513  maActionButtonRolloverTextColor( rData.maActionButtonRolloverTextColor ),
514  maFlatButtonRolloverTextColor( rData.maFlatButtonRolloverTextColor ),
515  maDefaultButtonPressedRolloverTextColor( rData.maDefaultButtonPressedRolloverTextColor ),
516  maButtonPressedRolloverTextColor( rData.maButtonPressedRolloverTextColor ),
517  maDefaultActionButtonPressedRolloverTextColor( rData.maDefaultActionButtonPressedRolloverTextColor ),
518  maActionButtonPressedRolloverTextColor( rData.maActionButtonPressedRolloverTextColor ),
519  maFlatButtonPressedRolloverTextColor( rData.maFlatButtonPressedRolloverTextColor ),
520  maCheckedColor( rData.maCheckedColor ),
521  maDarkShadowColor( rData.maDarkShadowColor ),
522  maDeactiveBorderColor( rData.maDeactiveBorderColor ),
523  maDeactiveColor( rData.maDeactiveColor ),
524  maDeactiveTextColor( rData.maDeactiveTextColor ),
525  maDialogColor( rData.maDialogColor ),
526  maDialogTextColor( rData.maDialogTextColor ),
527  maDisableColor( rData.maDisableColor ),
528  maFaceColor( rData.maFaceColor ),
529  maFieldColor( rData.maFieldColor ),
530  maFieldTextColor( rData.maFieldTextColor ),
531  maFieldRolloverTextColor( rData.maFieldRolloverTextColor ),
532  maFontColor( rData.maFontColor ),
533  maGroupTextColor( rData.maGroupTextColor ),
534  maHelpColor( rData.maHelpColor ),
535  maHelpTextColor( rData.maHelpTextColor ),
536  maHighlightColor( rData.maHighlightColor ),
537  maHighlightLinkColor( rData.maHighlightLinkColor ),
538  maHighlightTextColor( rData.maHighlightTextColor ),
539  maLabelTextColor( rData.maLabelTextColor ),
540  maLightBorderColor( rData.maLightBorderColor ),
541  maLightColor( rData.maLightColor ),
542  maLinkColor( rData.maLinkColor ),
543  maMenuBarColor( rData.maMenuBarColor ),
544  maMenuBarRolloverColor( rData.maMenuBarRolloverColor ),
545  maMenuBorderColor( rData.maMenuBorderColor ),
546  maMenuColor( rData.maMenuColor ),
547  maMenuHighlightColor( rData.maMenuHighlightColor ),
548  maMenuHighlightTextColor( rData.maMenuHighlightTextColor ),
549  maMenuTextColor( rData.maMenuTextColor ),
550  maMenuBarTextColor( rData.maMenuBarTextColor ),
551  maMenuBarRolloverTextColor( rData.maMenuBarRolloverTextColor ),
552  maMenuBarHighlightTextColor( rData.maMenuBarHighlightTextColor ),
553  maMonoColor( rData.maMonoColor ),
554  maRadioCheckTextColor( rData.maRadioCheckTextColor ),
555  maShadowColor( rData.maShadowColor ),
556  maVisitedLinkColor( rData.maVisitedLinkColor ),
557  maToolTextColor( rData.maToolTextColor ),
558  maWindowColor( rData.maWindowColor ),
559  maWindowTextColor( rData.maWindowTextColor ),
560  maWorkspaceColor( rData.maWorkspaceColor ),
561  maActiveTabColor( rData.maActiveTabColor ),
562  maInactiveTabColor( rData.maInactiveTabColor ),
563  maTabTextColor( rData.maTabTextColor ),
564  maTabRolloverTextColor( rData.maTabRolloverTextColor ),
565  maTabHighlightTextColor( rData.maTabHighlightTextColor ),
566  maAppFont( rData.maAppFont ),
567  maHelpFont( rData.maAppFont ),
568  maTitleFont( rData.maTitleFont ),
569  maFloatTitleFont( rData.maFloatTitleFont ),
570  maMenuFont( rData.maMenuFont ),
571  maToolFont( rData.maToolFont ),
572  maLabelFont( rData.maLabelFont ),
573  maRadioCheckFont( rData.maRadioCheckFont ),
574  maPushButtonFont( rData.maPushButtonFont ),
575  maFieldFont( rData.maFieldFont ),
576  maIconFont( rData.maIconFont ),
577  maTabFont( rData.maTabFont ),
578  maGroupFont( rData.maGroupFont ),
579  mnTitleHeight(rData.mnTitleHeight),
580  mnFloatTitleHeight(rData.mnFloatTitleHeight),
581  mnScrollBarSize(rData.mnScrollBarSize),
582  mnSpinSize(rData.mnSpinSize),
583  mnCursorSize(rData.mnCursorSize),
584  mnAntialiasedMin(rData.mnAntialiasedMin),
585  mnCursorBlinkTime(rData.mnCursorBlinkTime),
586  mnDragFullOptions(rData.mnDragFullOptions),
587  mnSelectionOptions(rData.mnSelectionOptions),
588  mnDisplayOptions(rData.mnDisplayOptions),
589  mnToolbarIconSize(rData.mnToolbarIconSize),
590  mnUseFlatMenus(rData.mnUseFlatMenus),
591  mnOptions(rData.mnOptions),
592  mbHighContrast(rData.mbHighContrast),
593  mbUseSystemUIFonts(rData.mbUseSystemUIFonts),
594  mbUseFontAAFromSystem(rData.mbUseFontAAFromSystem),
595  mbAutoMnemonic(rData.mbAutoMnemonic),
596  meUseImagesInMenus(rData.meUseImagesInMenus),
597  mnUseFlatBorders(rData.mnUseFlatBorders),
598  mbPreferredUseImagesInMenus(rData.mbPreferredUseImagesInMenus),
599  mnMinThumbSize(rData.mnMinThumbSize),
600  mIconThemeSelector(std::make_shared<vcl::IconThemeSelector>(*rData.mIconThemeSelector)),
601  mIconTheme(rData.mIconTheme),
602  mbSkipDisabledInMenus(rData.mbSkipDisabledInMenus),
603  mbHideDisabledMenuItems(rData.mbHideDisabledMenuItems),
604  mbPreferredContextMenuShortcuts(rData.mbPreferredContextMenuShortcuts),
605  meContextMenuShortcuts(rData.meContextMenuShortcuts),
606  mbPrimaryButtonWarpsSlider(rData.mbPrimaryButtonWarpsSlider),
607  maDialogStyle( rData.maDialogStyle ),
608  mnEdgeBlending(rData.mnEdgeBlending),
609  maEdgeBlendingTopLeftColor(rData.maEdgeBlendingTopLeftColor),
610  maEdgeBlendingBottomRightColor(rData.maEdgeBlendingBottomRightColor),
611  mnListBoxMaximumLineCount(rData.mnListBoxMaximumLineCount),
612  mnColorValueSetColumnCount(rData.mnColorValueSetColumnCount),
613  maListBoxPreviewDefaultLogicSize(rData.maListBoxPreviewDefaultLogicSize),
614  maListBoxPreviewDefaultPixelSize(rData.maListBoxPreviewDefaultPixelSize),
615  mbPreviewUsesCheckeredBackground(rData.mbPreviewUsesCheckeredBackground),
616  maPersonaHeaderFooter( rData.maPersonaHeaderFooter ),
617  maPersonaHeaderBitmap( rData.maPersonaHeaderBitmap ),
618  maPersonaFooterBitmap( rData.maPersonaFooterBitmap ),
619  maPersonaMenuBarTextColor( rData.maPersonaMenuBarTextColor )
620 {
621  if (rData.mIconThemeScanner)
622  mIconThemeScanner = std::make_shared<vcl::IconThemeScanner>(*rData.mIconThemeScanner);
623 }
624 
626 {
627  vcl::Font aStdFont( FAMILY_SWISS, Size( 0, 8 ) );
628  aStdFont.SetCharSet( osl_getThreadTextEncoding() );
629  aStdFont.SetWeight( WEIGHT_NORMAL );
631  aStdFont.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en")));
632  else
633  aStdFont.SetFamilyName("Liberation Sans");
634  maAppFont = aStdFont;
635  maHelpFont = aStdFont;
636  maMenuFont = aStdFont;
637  maToolFont = aStdFont;
638  maGroupFont = aStdFont;
639  maLabelFont = aStdFont;
640  maRadioCheckFont = aStdFont;
641  maPushButtonFont = aStdFont;
642  maFieldFont = aStdFont;
643  maIconFont = aStdFont;
644  maTabFont = aStdFont;
645  aStdFont.SetWeight( WEIGHT_BOLD );
646  maFloatTitleFont = aStdFont;
647  maTitleFont = aStdFont;
648 
650  maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
655 
671 
679  maWorkspaceColor = Color( 0xDF, 0xDF, 0xDE );
700  // make active like highlight, except with a small contrast
710  maHelpColor = Color( 0xFF, 0xFF, 0xE0 );
713  maVisitedLinkColor = Color( 0x00, 0x00, 0xCC );
717  maAlternatingRowColor = Color( 0xEE, 0xEE, 0xEE );
718 
719  mnTitleHeight = 18;
720  mnFloatTitleHeight = 13;
721  mbHighContrast = false;
722  mbUseSystemUIFonts = true;
723  mbUseFontAAFromSystem = true;
724  mnUseFlatBorders = false;
725  mnUseFlatMenus = false;
727  mbSkipDisabledInMenus = false;
728  mbHideDisabledMenuItems = false;
731 }
732 
734  : mxData(std::make_shared<ImplStyleData>())
735 {
736 }
737 
738 void
740 {
741  CopyData();
742  mxData->maFaceColor = rColor;
743 }
744 
745 const Color&
747 {
748  return mxData->maFaceColor;
749 }
750 
751 void
753 {
754  CopyData();
755  mxData->maCheckedColor = rColor;
756 }
757 
758 const Color&
760 {
761  return mxData->maCheckedColor;
762 }
763 
764 void
766 {
767  CopyData();
768  mxData->maLightColor = rColor;
769 }
770 
771 const Color&
773 {
774  return mxData->maLightColor;
775 }
776 
777 void
779 {
780  CopyData();
781  mxData->maLightBorderColor = rColor;
782 }
783 
784 const Color&
786 {
787  return mxData->maLightBorderColor;
788 }
789 
790 void
792 {
793  CopyData();
794  mxData->maShadowColor = rColor;
795 }
796 
797 const Color&
799 {
800  return mxData->maShadowColor;
801 }
802 
803 void
805 {
806  CopyData();
807  mxData->maDarkShadowColor = rColor;
808 }
809 
810 const Color&
812 {
813  return mxData->maDarkShadowColor;
814 }
815 
816 void
818 {
819  CopyData();
820  mxData->maDefaultButtonTextColor = rColor;
821 }
822 
823 const Color&
825 {
826  return mxData->maDefaultButtonTextColor;
827 }
828 
829 void
831 {
832  CopyData();
833  mxData->maButtonTextColor = rColor;
834 }
835 
836 const Color&
838 {
839  return mxData->maButtonTextColor;
840 }
841 
842 void
844 {
845  CopyData();
846  mxData->maDefaultActionButtonTextColor = rColor;
847 }
848 
849 const Color&
851 {
852  return mxData->maDefaultActionButtonTextColor;
853 }
854 
855 void
857 {
858  CopyData();
859  mxData->maActionButtonTextColor = rColor;
860 }
861 
862 const Color&
864 {
865  return mxData->maActionButtonTextColor;
866 }
867 
868 void
870 {
871  CopyData();
872  mxData->maFlatButtonTextColor = rColor;
873 }
874 
875 const Color&
877 {
878  return mxData->maFlatButtonTextColor;
879 }
880 
881 void
883 {
884  CopyData();
885  mxData->maDefaultButtonRolloverTextColor = rColor;
886 }
887 
888 const Color&
890 {
891  return mxData->maDefaultButtonRolloverTextColor;
892 }
893 
894 void
896 {
897  CopyData();
898  mxData->maButtonRolloverTextColor = rColor;
899 }
900 
901 const Color&
903 {
904  return mxData->maButtonRolloverTextColor;
905 }
906 
907 void
909 {
910  CopyData();
911  mxData->maDefaultActionButtonRolloverTextColor = rColor;
912 }
913 
914 const Color&
916 {
917  return mxData->maDefaultActionButtonRolloverTextColor;
918 }
919 
920 void
922 {
923  CopyData();
924  mxData->maActionButtonRolloverTextColor = rColor;
925 }
926 
927 const Color&
929 {
930  return mxData->maActionButtonRolloverTextColor;
931 }
932 
933 void
935 {
936  CopyData();
937  mxData->maFlatButtonRolloverTextColor = rColor;
938 }
939 
940 const Color&
942 {
943  return mxData->maFlatButtonRolloverTextColor;
944 }
945 
946 void
948 {
949  CopyData();
950  mxData->maDefaultButtonPressedRolloverTextColor = rColor;
951 }
952 
953 const Color&
955 {
956  return mxData->maDefaultButtonPressedRolloverTextColor;
957 }
958 
959 void
961 {
962  CopyData();
963  mxData->maButtonPressedRolloverTextColor = rColor;
964 }
965 
966 const Color&
968 {
969  return mxData->maButtonPressedRolloverTextColor;
970 }
971 
972 void
974 {
975  CopyData();
976  mxData->maDefaultActionButtonPressedRolloverTextColor = rColor;
977 }
978 
979 const Color&
981 {
982  return mxData->maDefaultActionButtonPressedRolloverTextColor;
983 }
984 
985 void
987 {
988  CopyData();
989  mxData->maActionButtonPressedRolloverTextColor = rColor;
990 }
991 
992 const Color&
994 {
995  return mxData->maActionButtonPressedRolloverTextColor;
996 }
997 
998 void
1000 {
1001  CopyData();
1002  mxData->maFlatButtonPressedRolloverTextColor = rColor;
1003 }
1004 
1005 const Color&
1007 {
1008  return mxData->maFlatButtonPressedRolloverTextColor;
1009 }
1010 
1011 void
1013 {
1014  CopyData();
1015  mxData->maRadioCheckTextColor = rColor;
1016 }
1017 
1018 const Color&
1020 {
1021  return mxData->maRadioCheckTextColor;
1022 }
1023 
1024 void
1026 {
1027  CopyData();
1028  mxData->maGroupTextColor = rColor;
1029 }
1030 
1031 const Color&
1033 {
1034  return mxData->maGroupTextColor;
1035 }
1036 
1037 void
1039 {
1040  CopyData();
1041  mxData->maLabelTextColor = rColor;
1042 }
1043 
1044 const Color&
1046 {
1047  return mxData->maLabelTextColor;
1048 }
1049 
1050 void
1052 {
1053  CopyData();
1054  mxData->maWindowColor = rColor;
1055 }
1056 
1057 const Color&
1059 {
1060  return mxData->maWindowColor;
1061 }
1062 
1063 void
1065 {
1066  CopyData();
1067  mxData->maWindowTextColor = rColor;
1068 }
1069 
1070 const Color&
1072 {
1073  return mxData->maWindowTextColor;
1074 }
1075 
1076 void
1078 {
1079  CopyData();
1080  mxData->maDialogColor = rColor;
1081 }
1082 
1083 const Color&
1085 {
1086  return mxData->maDialogColor;
1087 }
1088 
1089 void
1091 {
1092  CopyData();
1093  mxData->maDialogTextColor = rColor;
1094 }
1095 
1096 const Color&
1098 {
1099  return mxData->maDialogTextColor;
1100 }
1101 
1102 void
1104 {
1105  CopyData();
1106  mxData->maWorkspaceColor = rColor;
1107 }
1108 
1109 const Color&
1111 {
1112  return mxData->maWorkspaceColor;
1113 }
1114 
1115 void
1117 {
1118  CopyData();
1119  mxData->maFieldColor = rColor;
1120 }
1121 
1122 const Color&
1124 {
1125  return mxData->maFieldColor;
1126 }
1127 
1128 void
1130 {
1131  CopyData();
1132  mxData->maFieldTextColor = rColor;
1133 }
1134 
1135 const Color&
1137 {
1138  return mxData->maFieldTextColor;
1139 }
1140 
1141 void
1143 {
1144  CopyData();
1145  mxData->maFieldRolloverTextColor = rColor;
1146 }
1147 
1148 const Color&
1150 {
1151  return mxData->maFieldRolloverTextColor;
1152 }
1153 
1154 void
1156 {
1157  CopyData();
1158  mxData->maActiveColor = rColor;
1159 }
1160 
1161 const Color&
1163 {
1164  return mxData->maActiveColor;
1165 }
1166 
1167 void
1169 {
1170  CopyData();
1171  mxData->maActiveTextColor = rColor;
1172 }
1173 
1174 const Color&
1176 {
1177  return mxData->maActiveTextColor;
1178 }
1179 
1180 void
1182 {
1183  CopyData();
1184  mxData->maActiveBorderColor = rColor;
1185 }
1186 
1187 const Color&
1189 {
1190  return mxData->maActiveBorderColor;
1191 }
1192 
1193 void
1195 {
1196  CopyData();
1197  mxData->maDeactiveColor = rColor;
1198 }
1199 
1200 const Color&
1202 {
1203  return mxData->maDeactiveColor;
1204 }
1205 
1206 void
1208 {
1209  CopyData();
1210  mxData->maDeactiveTextColor = rColor;
1211 }
1212 
1213 const Color&
1215 {
1216  return mxData->maDeactiveTextColor;
1217 }
1218 
1219 void
1221 {
1222  CopyData();
1223  mxData->maDeactiveBorderColor = rColor;
1224 }
1225 
1226 const Color&
1228 {
1229  return mxData->maDeactiveBorderColor;
1230 }
1231 
1232 void
1234 {
1235  CopyData();
1236  mxData->maHighlightColor = rColor;
1237 }
1238 
1239 const Color&
1241 {
1242  return mxData->maHighlightColor;
1243 }
1244 
1245 void
1247 {
1248  CopyData();
1249  mxData->maHighlightTextColor = rColor;
1250 }
1251 
1252 const Color&
1254 {
1255  return mxData->maHighlightTextColor;
1256 }
1257 
1258 void
1260 {
1261  CopyData();
1262  mxData->maDisableColor = rColor;
1263 }
1264 
1265 const Color&
1267 {
1268  return mxData->maDisableColor;
1269 }
1270 
1271 void
1273 {
1274  CopyData();
1275  mxData->maHelpColor = rColor;
1276 }
1277 
1278 const Color&
1280 {
1281  return mxData->maHelpColor;
1282 }
1283 
1284 void
1286 {
1287  CopyData();
1288  mxData->maHelpTextColor = rColor;
1289 }
1290 
1291 const Color&
1293 {
1294  return mxData->maHelpTextColor;
1295 }
1296 
1297 void
1299 {
1300  CopyData();
1301  mxData->maMenuColor = rColor;
1302 }
1303 
1304 const Color&
1306 {
1307  return mxData->maMenuColor;
1308 }
1309 
1310 void
1312 {
1313  CopyData();
1314  mxData->maMenuBarColor = rColor;
1315 }
1316 
1317 const Color&
1319 {
1320  return mxData->maMenuBarColor;
1321 }
1322 
1323 void
1325 {
1326  CopyData();
1327  mxData->maMenuBarRolloverColor = rColor;
1328 }
1329 
1330 const Color&
1332 {
1333  return mxData->maMenuBarRolloverColor;
1334 }
1335 
1336 void
1338 {
1339  CopyData();
1340  mxData->maMenuBorderColor = rColor;
1341 }
1342 
1343 const Color&
1345 {
1346  return mxData->maMenuBorderColor;
1347 }
1348 
1349 void
1351 {
1352  CopyData();
1353  mxData->maMenuTextColor = rColor;
1354 }
1355 
1356 const Color&
1358 {
1359  return mxData->maMenuTextColor;
1360 }
1361 
1362 void
1364 {
1365  CopyData();
1366  mxData->maMenuBarTextColor = rColor;
1367 }
1368 
1369 const Color&
1371 {
1372  return mxData->maMenuBarTextColor;
1373 }
1374 
1375 void
1377 {
1378  CopyData();
1379  mxData->maMenuBarRolloverTextColor = rColor;
1380 }
1381 
1382 const Color&
1384 {
1385  return mxData->maMenuBarRolloverTextColor;
1386 }
1387 
1388 void
1390 {
1391  CopyData();
1392  mxData->maMenuBarHighlightTextColor = rColor;
1393 }
1394 
1395 const Color&
1397 {
1398  return mxData->maMenuBarHighlightTextColor;
1399 }
1400 
1401 void
1403 {
1404  CopyData();
1405  mxData->maMenuHighlightColor = rColor;
1406 }
1407 
1408 const Color&
1410 {
1411  return mxData->maMenuHighlightColor;
1412 }
1413 
1414 void
1416 {
1417  CopyData();
1418  mxData->maMenuHighlightTextColor = rColor;
1419 }
1420 
1421 const Color&
1423 {
1424  return mxData->maMenuHighlightTextColor;
1425 }
1426 
1427 void
1429 {
1430  CopyData();
1431  mxData->maTabTextColor = rColor;
1432 }
1433 
1434 const Color&
1436 {
1437  return mxData->maTabTextColor;
1438 }
1439 
1440 void
1442 {
1443  CopyData();
1444  mxData->maTabRolloverTextColor = rColor;
1445 }
1446 
1447 const Color&
1449 {
1450  return mxData->maTabRolloverTextColor;
1451 }
1452 
1453 void
1455 {
1456  CopyData();
1457  mxData->maTabHighlightTextColor = rColor;
1458 }
1459 
1460 const Color&
1462 {
1463  return mxData->maTabHighlightTextColor;
1464 }
1465 
1466 void
1468 {
1469  CopyData();
1470  mxData->maLinkColor = rColor;
1471 }
1472 
1473 const Color&
1475 {
1476  return mxData->maLinkColor;
1477 }
1478 
1479 void
1481 {
1482  CopyData();
1483  mxData->maVisitedLinkColor = rColor;
1484 }
1485 
1486 const Color&
1488 {
1489  return mxData->maVisitedLinkColor;
1490 }
1491 
1492 void
1494 {
1495  CopyData();
1496  mxData->maToolTextColor = rColor;
1497 }
1498 
1499 const Color&
1501 {
1502  return mxData->maToolTextColor;
1503 }
1504 
1505 const Color&
1507 {
1508  return mxData->maHighlightLinkColor;
1509 }
1510 
1511 void
1513 {
1514  CopyData();
1515  mxData->maMonoColor = rColor;
1516 }
1517 
1518 const Color&
1520 {
1521  return mxData->maMonoColor;
1522 }
1523 
1524 void
1526 {
1527  CopyData();
1528  mxData->maActiveTabColor = rColor;
1529 }
1530 
1531 const Color&
1533 {
1534  return mxData->maActiveTabColor;
1535 }
1536 
1537 void
1539 {
1540  CopyData();
1541  mxData->maInactiveTabColor = rColor;
1542 }
1543 
1544 const Color&
1546 {
1547  return mxData->maInactiveTabColor;
1548 }
1549 
1551 {
1552  CopyData();
1553  mxData->maAlternatingRowColor = rColor;
1554 }
1555 
1556 const Color&
1558 {
1559  return mxData->maAlternatingRowColor;
1560 }
1561 
1562 void
1563 StyleSettings::SetUseSystemUIFonts( bool bUseSystemUIFonts )
1564 {
1565  CopyData();
1566  mxData->mbUseSystemUIFonts = bUseSystemUIFonts;
1567 }
1568 
1569 bool
1571 {
1572  return mxData->mbUseSystemUIFonts;
1573 }
1574 
1575 void StyleSettings::SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
1576 {
1577  CopyData();
1578  mxData->mbUseFontAAFromSystem = bUseFontAAFromSystem;
1579 }
1580 
1582 {
1583  return mxData->mbUseFontAAFromSystem;
1584 }
1585 
1586 void
1587 StyleSettings::SetUseFlatBorders( bool bUseFlatBorders )
1588 {
1589  CopyData();
1590  mxData->mnUseFlatBorders = bUseFlatBorders;
1591 }
1592 
1593 bool
1595 {
1596  return mxData->mnUseFlatBorders;
1597 }
1598 
1599 void
1600 StyleSettings::SetUseFlatMenus( bool bUseFlatMenus )
1601 {
1602  CopyData();
1603  mxData->mnUseFlatMenus = bUseFlatMenus;
1604 }
1605 
1606 bool
1608 {
1609  return mxData->mnUseFlatMenus;
1610 }
1611 
1612 void
1614 {
1615  CopyData();
1616  mxData->meUseImagesInMenus = eUseImagesInMenus;
1617 }
1618 
1619 void
1620 StyleSettings::SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus )
1621 {
1622  CopyData();
1623  mxData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus;
1624 }
1625 
1626 bool
1628 {
1629  return mxData->mbPreferredUseImagesInMenus;
1630 }
1631 
1632 void
1633 StyleSettings::SetSkipDisabledInMenus( bool bSkipDisabledInMenus )
1634 {
1635  CopyData();
1636  mxData->mbSkipDisabledInMenus = bSkipDisabledInMenus;
1637 }
1638 
1639 bool
1641 {
1642  return mxData->mbSkipDisabledInMenus;
1643 }
1644 
1645 void
1646 StyleSettings::SetHideDisabledMenuItems( bool bHideDisabledMenuItems )
1647 {
1648  CopyData();
1649  mxData->mbHideDisabledMenuItems = bHideDisabledMenuItems;
1650 }
1651 
1652 bool
1654 {
1655  return mxData->mbHideDisabledMenuItems;
1656 }
1657 
1658 void
1660 {
1661  CopyData();
1662  mxData->meContextMenuShortcuts = eContextMenuShortcuts;
1663 }
1664 
1665 bool
1667 {
1668  switch (mxData->meContextMenuShortcuts)
1669  {
1670  case TRISTATE_FALSE:
1671  return false;
1672  case TRISTATE_TRUE:
1673  return true;
1674  default: // TRISTATE_INDET:
1676  }
1677 }
1678 
1679 void
1681 {
1682  CopyData();
1683  mxData->mbPreferredContextMenuShortcuts = bContextMenuShortcuts;
1684 }
1685 
1686 bool
1688 {
1689  return mxData->mbPreferredContextMenuShortcuts;
1690 }
1691 
1692 void
1693 StyleSettings::SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider )
1694 {
1695  CopyData();
1696  mxData->mbPrimaryButtonWarpsSlider = bPrimaryButtonWarpsSlider;
1697 }
1698 
1699 bool
1701 {
1702  return mxData->mbPrimaryButtonWarpsSlider;
1703 }
1704 
1705 void
1707 {
1708  CopyData();
1709  mxData->maAppFont = rFont;
1710 }
1711 
1712 const vcl::Font&
1714 {
1715  return mxData->maAppFont;
1716 }
1717 
1718 void
1720 {
1721  CopyData();
1722  mxData->maHelpFont = rFont;
1723 }
1724 
1725 const vcl::Font&
1727 {
1728  return mxData->maHelpFont;
1729 }
1730 
1731 void
1733 {
1734  CopyData();
1735  mxData->maTitleFont = rFont;
1736 }
1737 
1738 const vcl::Font&
1740 {
1741  return mxData->maTitleFont;
1742 }
1743 
1744 void
1746 {
1747  CopyData();
1748  mxData->maFloatTitleFont = rFont;
1749 }
1750 
1751 const vcl::Font&
1753 {
1754  return mxData->maFloatTitleFont;
1755 }
1756 
1757 void
1759 {
1760  CopyData();
1761  mxData->maMenuFont = rFont;
1762 }
1763 
1764 const vcl::Font&
1766 {
1767  return mxData->maMenuFont;
1768 }
1769 
1770 void
1772 {
1773  CopyData();
1774  mxData->maToolFont = rFont;
1775 }
1776 
1777 const vcl::Font&
1779 {
1780  return mxData->maToolFont;
1781 }
1782 
1783 void
1785 {
1786  CopyData();
1787  mxData->maGroupFont = rFont;
1788 }
1789 
1790 const vcl::Font&
1792 {
1793  return mxData->maGroupFont;
1794 }
1795 
1796 void
1798 {
1799  CopyData();
1800  mxData->maLabelFont = rFont;
1801 }
1802 
1803 const vcl::Font&
1805 {
1806  return mxData->maLabelFont;
1807 }
1808 
1809 void
1811 {
1812  CopyData();
1813  mxData->maRadioCheckFont = rFont;
1814 }
1815 
1816 const vcl::Font&
1818 {
1819  return mxData->maRadioCheckFont;
1820 }
1821 
1822 void
1824 {
1825  CopyData();
1826  mxData->maPushButtonFont = rFont;
1827 }
1828 
1829 const vcl::Font&
1831 {
1832  return mxData->maPushButtonFont;
1833 }
1834 
1835 void
1837 {
1838  CopyData();
1839  mxData->maFieldFont = rFont;
1840 }
1841 
1842 const vcl::Font&
1844 {
1845  return mxData->maFieldFont;
1846 }
1847 
1848 void
1850 {
1851  CopyData();
1852  mxData->maIconFont = rFont;
1853 }
1854 
1855 const vcl::Font&
1857 {
1858  return mxData->maIconFont;
1859 }
1860 
1861 void
1863 {
1864  CopyData();
1865  mxData->maTabFont = rFont;
1866 }
1867 
1868 const vcl::Font&
1870 {
1871  return mxData->maTabFont;
1872 }
1873 
1876 {
1877  return 1;
1878 }
1879 
1880 void
1882 {
1883  CopyData();
1884  mxData->mnTitleHeight = nSize;
1885 }
1886 
1889 {
1890  return mxData->mnTitleHeight;
1891 }
1892 
1893 void
1895 {
1896  CopyData();
1897  mxData->mnFloatTitleHeight = nSize;
1898 }
1899 
1902 {
1903  return mxData->mnFloatTitleHeight;
1904 }
1905 
1906 void
1908 {
1909  CopyData();
1910  mxData->mnScrollBarSize = nSize;
1911 }
1912 
1915 {
1916  return mxData->mnScrollBarSize;
1917 }
1918 
1919 void
1921 {
1922  CopyData();
1923  mxData->mnMinThumbSize = nSize;
1924 }
1925 
1928 {
1929  return mxData->mnMinThumbSize;
1930 }
1931 
1932 void
1934 {
1935  CopyData();
1936  mxData->mnSpinSize = nSize;
1937 }
1938 
1941 {
1942  return mxData->mnSpinSize;
1943 }
1944 
1947 {
1948  return 3;
1949 }
1950 
1951 void
1953 {
1954  CopyData();
1955  mxData->mnCursorSize = nSize;
1956 }
1957 
1960 {
1961  return mxData->mnCursorSize;
1962 }
1963 
1964 void
1965 StyleSettings::SetCursorBlinkTime( sal_uInt64 nBlinkTime )
1966 {
1967  CopyData();
1968  mxData->mnCursorBlinkTime = nBlinkTime;
1969 }
1970 
1971 sal_uInt64
1973 {
1974  return static_cast<tools::Long>(mxData->mnCursorBlinkTime);
1975 }
1976 
1977 void
1979 {
1980  CopyData();
1981  mxData->mnDragFullOptions = nOptions;
1982 }
1983 
1986 {
1987  return mxData->mnDragFullOptions;
1988 }
1989 
1990 void
1992 {
1993  CopyData();
1994  mxData->mnSelectionOptions = nOptions;
1995 }
1996 
1999 {
2000  return mxData->mnSelectionOptions;
2001 }
2002 
2003 void
2005 {
2006  CopyData();
2007  mxData->mnDisplayOptions = nOptions;
2008 }
2009 
2012 {
2013  return mxData->mnDisplayOptions;
2014 }
2015 
2016 void
2018 {
2019  CopyData();
2020  mxData->mnAntialiasedMin = nMinPixel;
2021 }
2022 
2023 sal_uLong
2025 {
2026  return mxData->mnAntialiasedMin;
2027 }
2028 
2029 void
2031 {
2032  CopyData();
2033  mxData->mnOptions = nOptions;
2034 }
2035 
2036 void
2037 StyleSettings::SetAutoMnemonic( bool bAutoMnemonic )
2038 {
2039  CopyData();
2040  mxData->mbAutoMnemonic = bAutoMnemonic;
2041 }
2042 
2043 bool
2045 {
2046  return mxData->mbAutoMnemonic;
2047 }
2048 
2049 bool
2051 {
2052  ImplSVData* pSVData = ImplGetSVData();
2053  return pSVData->maNWFData.mbCanDetermineWindowPosition;
2054 }
2055 
2056 void
2058 {
2059  CopyData();
2060  mxData->maFontColor = rColor;
2061 }
2062 
2063 const Color&
2065 {
2066  return mxData->maFontColor;
2067 }
2068 
2069 void
2071 {
2072  CopyData();
2073  mxData->mnToolbarIconSize = nSize;
2074 }
2075 
2078 {
2079  return mxData->mnToolbarIconSize;
2080 }
2081 
2082 const DialogStyle&
2084 {
2085  return mxData->maDialogStyle;
2086 }
2087 
2088 void
2090 {
2091  CopyData();
2092  mxData->mnEdgeBlending = nCount;
2093 }
2094 
2095 sal_uInt16
2097 {
2098  return mxData->mnEdgeBlending;
2099 }
2100 
2101 const Color&
2103 {
2104  return mxData->maEdgeBlendingTopLeftColor;
2105 }
2106 
2107 const Color&
2109 {
2110  return mxData->maEdgeBlendingBottomRightColor;
2111 }
2112 
2113 void
2115 {
2116  CopyData();
2117  mxData->mnListBoxMaximumLineCount = nCount;
2118 }
2119 
2120 sal_uInt16
2122 {
2123  return mxData->mnListBoxMaximumLineCount;
2124 }
2125 
2126 void
2128 {
2129  CopyData();
2130  mxData->mnColorValueSetColumnCount = nCount;
2131 }
2132 
2133 sal_uInt16
2135 {
2136  return mxData->mnColorValueSetColumnCount;
2137 }
2138 
2139 sal_uInt16
2141 {
2142  return 10;
2143 }
2144 
2145 sal_uInt16
2147 {
2148  return 1;
2149 }
2150 
2151 void
2153 {
2154  CopyData();
2155  mxData->mbPreviewUsesCheckeredBackground = bNew;
2156 }
2157 
2158 bool
2160 {
2161  return mxData->mbPreviewUsesCheckeredBackground;
2162 }
2163 
2164 bool
2166 {
2167  return !(*this == rSet);
2168 }
2169 
2171 {
2172  mxData->maListBoxPreviewDefaultLogicSize = rSize;
2173 }
2174 
2176 {
2177  if(0 == mxData->maListBoxPreviewDefaultPixelSize.Width() || 0 == mxData->maListBoxPreviewDefaultPixelSize.Height())
2178  {
2179  const_cast< StyleSettings* >(this)->mxData->maListBoxPreviewDefaultPixelSize =
2180  Application::GetDefaultDevice()->LogicToPixel(mxData->maListBoxPreviewDefaultLogicSize, MapMode(MapUnit::MapAppFont));
2181  }
2182 
2183  return mxData->maListBoxPreviewDefaultPixelSize;
2184 }
2185 
2186 void StyleSettings::Set3DColors( const Color& rColor )
2187 {
2188  CopyData();
2189  mxData->maFaceColor = rColor;
2190  mxData->maLightBorderColor = rColor;
2191  mxData->maMenuBorderColor = rColor;
2192  mxData->maDarkShadowColor = COL_BLACK;
2193  if ( rColor != COL_LIGHTGRAY )
2194  {
2195  mxData->maLightColor = rColor;
2196  mxData->maShadowColor = rColor;
2197  mxData->maDarkShadowColor=rColor;
2198  mxData->maLightColor.IncreaseLuminance( 64 );
2199  mxData->maShadowColor.DecreaseLuminance( 64 );
2200  mxData->maDarkShadowColor.DecreaseLuminance( 100 );
2201  sal_uLong nRed = mxData->maLightColor.GetRed();
2202  sal_uLong nGreen = mxData->maLightColor.GetGreen();
2203  sal_uLong nBlue = mxData->maLightColor.GetBlue();
2204  nRed += static_cast<sal_uLong>(mxData->maShadowColor.GetRed());
2205  nGreen += static_cast<sal_uLong>(mxData->maShadowColor.GetGreen());
2206  nBlue += static_cast<sal_uLong>(mxData->maShadowColor.GetBlue());
2207  mxData->maCheckedColor = Color( static_cast<sal_uInt8>(nRed/2), static_cast<sal_uInt8>(nGreen/2), static_cast<sal_uInt8>(nBlue/2) );
2208  }
2209  else
2210  {
2211  mxData->maCheckedColor = Color( 0x99, 0x99, 0x99 );
2212  mxData->maLightColor = COL_WHITE;
2213  mxData->maShadowColor = COL_GRAY;
2214  }
2215 }
2216 
2218 {
2219  CopyData();
2220  // Light gray checked color special case
2221  if ( GetFaceColor() == COL_LIGHTGRAY )
2222  mxData->maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
2223  else
2224  {
2225  sal_uInt8 nRed = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetRed()) + static_cast<sal_uInt16>(mxData->maLightColor.GetRed()))/2);
2226  sal_uInt8 nGreen = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetGreen()) + static_cast<sal_uInt16>(mxData->maLightColor.GetGreen()))/2);
2227  sal_uInt8 nBlue = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetBlue()) + static_cast<sal_uInt16>(mxData->maLightColor.GetBlue()))/2);
2228  mxData->maCheckedColor = Color( nRed, nGreen, nBlue );
2229  }
2230 }
2231 
2233 {
2234  // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
2235  switch (mxData->meUseImagesInMenus) {
2236  case TRISTATE_FALSE:
2237  return false;
2238  case TRISTATE_TRUE:
2239  return true;
2240  default: // TRISTATE_INDET:
2242  }
2243 }
2244 
2245 static BitmapEx readBitmapEx( const OUString& rPath )
2246 {
2247  OUString aPath( rPath );
2248  rtl::Bootstrap::expandMacros( aPath );
2249 
2250  // import the image
2251  Graphic aGraphic;
2252  if ( GraphicFilter::LoadGraphic( aPath, OUString(), aGraphic ) != ERRCODE_NONE )
2253  return BitmapEx();
2254  return aGraphic.GetBitmapEx();
2255 }
2256 
2257 namespace {
2258 
2259 enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
2260 
2261 }
2262 
2264 static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, std::optional<Color>& rMenuBarTextColor )
2265 {
2266  uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
2267  if ( !xContext.is() )
2268  return;
2269 
2270  // don't burn time loading images we don't need.
2272  return;
2273 
2274  // read from the configuration
2275  OUString aPersona( officecfg::Office::Common::Misc::Persona::get( xContext ) );
2276  OUString aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get( xContext ) );
2277 
2278  // have the settings changed? marks if header /footer prepared before
2279  //should maybe extended to a flag that marks if header /footer /both are loaded
2280  OUString aOldValue= eWhich==PERSONA_HEADER?OUString(aPersona + ";" + aPersonaSettings+";h" ):OUString(aPersona + ";" + aPersonaSettings+";f" );
2281  if ( rHeaderFooter == aOldValue )
2282  return;
2283 
2284  rHeaderFooter = aOldValue;
2285  rHeaderFooterBitmap = BitmapEx();
2286  rMenuBarTextColor.reset();
2287 
2288  // now read the new values and setup bitmaps
2289  OUString aHeader, aFooter;
2290  if ( aPersona == "own" || aPersona == "default" )
2291  {
2292  sal_Int32 nIndex = 0;
2293 
2294  // Skip the persona slug, name, and preview
2295  aHeader = aPersonaSettings.getToken( 3, ';', nIndex );
2296 
2297  if ( nIndex > 0 )
2298  aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
2299 
2300  // change menu text color, advance nIndex to skip the '#'
2301  if ( nIndex > 0 )
2302  {
2303  OUString aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
2304  rMenuBarTextColor = Color( aColor.toUInt32( 16 ) );
2305  }
2306  }
2307 
2308  OUString aName;
2309  switch ( eWhich ) {
2310  case PERSONA_HEADER: aName = aHeader; break;
2311  case PERSONA_FOOTER: aName = aFooter; break;
2312  }
2313 
2314  if ( !aName.isEmpty() )
2315  {
2316  OUString gallery("");
2317  // try the gallery first, then the program path:
2318  if ( aPersona == "own" && !aPersonaSettings.startsWith( "vnd.sun.star.expand" ) )
2319  {
2320  gallery = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
2321  rtl::Bootstrap::expandMacros( gallery );
2322  gallery += "/user/gallery/personas/";
2323  }
2324  else if ( aPersona == "default" )
2325  {
2326  gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/";
2327  }
2328  rHeaderFooterBitmap = readBitmapEx( gallery + aName );
2329 
2330  if ( rHeaderFooterBitmap.IsEmpty() )
2331  rHeaderFooterBitmap = readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" + aName );
2332  }
2333 
2334  // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
2335 
2336  if( rHeaderFooterBitmap.IsEmpty() )
2337  {
2338  std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
2339  officecfg::Office::Common::Misc::Persona::set( "no", batch );
2340  officecfg::Office::Common::Misc::PersonaSettings::set( "", batch );
2341  batch->commit();
2342  }
2343 }
2344 
2346 {
2347  setupPersonaHeaderFooter( PERSONA_HEADER, mxData->maPersonaHeaderFooter, mxData->maPersonaHeaderBitmap, mxData->maPersonaMenuBarTextColor );
2348  return mxData->maPersonaHeaderBitmap;
2349 }
2350 
2352 {
2353  setupPersonaHeaderFooter( PERSONA_FOOTER, mxData->maPersonaHeaderFooter, mxData->maPersonaFooterBitmap, mxData->maPersonaMenuBarTextColor );
2354  return mxData->maPersonaFooterBitmap;
2355 }
2356 
2357 const std::optional<Color>& StyleSettings::GetPersonaMenuBarTextColor() const
2358 {
2359  GetPersonaHeader();
2360  return mxData->maPersonaMenuBarTextColor;
2361 }
2362 
2364 {
2365  CopyData();
2366  mxData->SetStandardStyles();
2367 }
2368 
2370 {
2371  // compute a brighter face color that can be used in gradients
2372  // for a convex look (eg toolbars)
2373 
2374  sal_uInt16 h, s, b;
2375  GetFaceColor().RGBtoHSB( h, s, b );
2376  if( s > 1) s=1;
2377  if( b < 98) b=98;
2378  return Color::HSBtoRGB( h, s, b );
2379 }
2380 
2382 {
2383  // compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
2384  sal_uInt16 h, s, b;
2385  GetShadowColor().RGBtoHSB( h, s, b );
2386  b += b/4;
2387  s -= s/4;
2388  return Color::HSBtoRGB( h, s, b );
2389 }
2390 
2392 {
2393  // copy if other references exist
2394  if (mxData.use_count() > 1)
2395  {
2396  mxData = std::make_shared<ImplStyleData>(*mxData);
2397  }
2398 }
2399 
2401 {
2402  if ( mxData == rSet.mxData )
2403  return true;
2404 
2405  if (mxData->mIconTheme != rSet.mxData->mIconTheme) {
2406  return false;
2407  }
2408 
2409  if (*mxData->mIconThemeSelector != *rSet.mxData->mIconThemeSelector) {
2410  return false;
2411  }
2412 
2413  return (mxData->mnOptions == rSet.mxData->mnOptions) &&
2414  (mxData->mbAutoMnemonic == rSet.mxData->mbAutoMnemonic) &&
2415  (mxData->mnDragFullOptions == rSet.mxData->mnDragFullOptions) &&
2416  (mxData->mnSelectionOptions == rSet.mxData->mnSelectionOptions) &&
2417  (mxData->mnDisplayOptions == rSet.mxData->mnDisplayOptions) &&
2418  (mxData->mnCursorSize == rSet.mxData->mnCursorSize) &&
2419  (mxData->mnCursorBlinkTime == rSet.mxData->mnCursorBlinkTime) &&
2420  (mxData->mnTitleHeight == rSet.mxData->mnTitleHeight) &&
2421  (mxData->mnFloatTitleHeight == rSet.mxData->mnFloatTitleHeight) &&
2422  (mxData->mnScrollBarSize == rSet.mxData->mnScrollBarSize) &&
2423  (mxData->mnMinThumbSize == rSet.mxData->mnMinThumbSize) &&
2424  (mxData->mnSpinSize == rSet.mxData->mnSpinSize) &&
2425  (mxData->mnAntialiasedMin == rSet.mxData->mnAntialiasedMin) &&
2426  (mxData->mbHighContrast == rSet.mxData->mbHighContrast) &&
2427  (mxData->mbUseSystemUIFonts == rSet.mxData->mbUseSystemUIFonts) &&
2428  (mxData->mbUseFontAAFromSystem == rSet.mxData->mbUseFontAAFromSystem) &&
2429  (mxData->mnUseFlatBorders == rSet.mxData->mnUseFlatBorders) &&
2430  (mxData->mnUseFlatMenus == rSet.mxData->mnUseFlatMenus) &&
2431  (mxData->maFaceColor == rSet.mxData->maFaceColor) &&
2432  (mxData->maCheckedColor == rSet.mxData->maCheckedColor) &&
2433  (mxData->maLightColor == rSet.mxData->maLightColor) &&
2434  (mxData->maLightBorderColor == rSet.mxData->maLightBorderColor) &&
2435  (mxData->maShadowColor == rSet.mxData->maShadowColor) &&
2436  (mxData->maDarkShadowColor == rSet.mxData->maDarkShadowColor) &&
2437  (mxData->maButtonTextColor == rSet.mxData->maButtonTextColor) &&
2438  (mxData->maDefaultActionButtonTextColor == rSet.mxData->maDefaultActionButtonTextColor) &&
2439  (mxData->maActionButtonTextColor == rSet.mxData->maActionButtonTextColor) &&
2440  (mxData->maButtonRolloverTextColor == rSet.mxData->maButtonRolloverTextColor) &&
2441  (mxData->maActionButtonRolloverTextColor == rSet.mxData->maActionButtonRolloverTextColor) &&
2442  (mxData->maRadioCheckTextColor == rSet.mxData->maRadioCheckTextColor) &&
2443  (mxData->maGroupTextColor == rSet.mxData->maGroupTextColor) &&
2444  (mxData->maLabelTextColor == rSet.mxData->maLabelTextColor) &&
2445  (mxData->maWindowColor == rSet.mxData->maWindowColor) &&
2446  (mxData->maWindowTextColor == rSet.mxData->maWindowTextColor) &&
2447  (mxData->maDialogColor == rSet.mxData->maDialogColor) &&
2448  (mxData->maDialogTextColor == rSet.mxData->maDialogTextColor) &&
2449  (mxData->maWorkspaceColor == rSet.mxData->maWorkspaceColor) &&
2450  (mxData->maMonoColor == rSet.mxData->maMonoColor) &&
2451  (mxData->maFieldColor == rSet.mxData->maFieldColor) &&
2452  (mxData->maFieldTextColor == rSet.mxData->maFieldTextColor) &&
2453  (mxData->maActiveColor == rSet.mxData->maActiveColor) &&
2454  (mxData->maActiveTextColor == rSet.mxData->maActiveTextColor) &&
2455  (mxData->maActiveBorderColor == rSet.mxData->maActiveBorderColor) &&
2456  (mxData->maDeactiveColor == rSet.mxData->maDeactiveColor) &&
2457  (mxData->maDeactiveTextColor == rSet.mxData->maDeactiveTextColor) &&
2458  (mxData->maDeactiveBorderColor == rSet.mxData->maDeactiveBorderColor) &&
2459  (mxData->maMenuColor == rSet.mxData->maMenuColor) &&
2460  (mxData->maMenuBarColor == rSet.mxData->maMenuBarColor) &&
2461  (mxData->maMenuBarRolloverColor == rSet.mxData->maMenuBarRolloverColor) &&
2462  (mxData->maMenuBorderColor == rSet.mxData->maMenuBorderColor) &&
2463  (mxData->maMenuTextColor == rSet.mxData->maMenuTextColor) &&
2464  (mxData->maMenuBarTextColor == rSet.mxData->maMenuBarTextColor) &&
2465  (mxData->maMenuBarRolloverTextColor == rSet.mxData->maMenuBarRolloverTextColor) &&
2466  (mxData->maMenuHighlightColor == rSet.mxData->maMenuHighlightColor) &&
2467  (mxData->maMenuHighlightTextColor == rSet.mxData->maMenuHighlightTextColor) &&
2468  (mxData->maHighlightColor == rSet.mxData->maHighlightColor) &&
2469  (mxData->maHighlightTextColor == rSet.mxData->maHighlightTextColor) &&
2470  (mxData->maTabTextColor == rSet.mxData->maTabTextColor) &&
2471  (mxData->maTabRolloverTextColor == rSet.mxData->maTabRolloverTextColor) &&
2472  (mxData->maTabHighlightTextColor == rSet.mxData->maTabHighlightTextColor) &&
2473  (mxData->maActiveTabColor == rSet.mxData->maActiveTabColor) &&
2474  (mxData->maInactiveTabColor == rSet.mxData->maInactiveTabColor) &&
2475  (mxData->maDisableColor == rSet.mxData->maDisableColor) &&
2476  (mxData->maHelpColor == rSet.mxData->maHelpColor) &&
2477  (mxData->maHelpTextColor == rSet.mxData->maHelpTextColor) &&
2478  (mxData->maLinkColor == rSet.mxData->maLinkColor) &&
2479  (mxData->maVisitedLinkColor == rSet.mxData->maVisitedLinkColor) &&
2480  (mxData->maToolTextColor == rSet.mxData->maToolTextColor) &&
2481  (mxData->maHighlightLinkColor == rSet.mxData->maHighlightLinkColor) &&
2482  (mxData->maAppFont == rSet.mxData->maAppFont) &&
2483  (mxData->maHelpFont == rSet.mxData->maHelpFont) &&
2484  (mxData->maTitleFont == rSet.mxData->maTitleFont) &&
2485  (mxData->maFloatTitleFont == rSet.mxData->maFloatTitleFont) &&
2486  (mxData->maMenuFont == rSet.mxData->maMenuFont) &&
2487  (mxData->maToolFont == rSet.mxData->maToolFont) &&
2488  (mxData->maGroupFont == rSet.mxData->maGroupFont) &&
2489  (mxData->maLabelFont == rSet.mxData->maLabelFont) &&
2490  (mxData->maRadioCheckFont == rSet.mxData->maRadioCheckFont) &&
2491  (mxData->maPushButtonFont == rSet.mxData->maPushButtonFont) &&
2492  (mxData->maFieldFont == rSet.mxData->maFieldFont) &&
2493  (mxData->maIconFont == rSet.mxData->maIconFont) &&
2494  (mxData->maTabFont == rSet.mxData->maTabFont) &&
2495  (mxData->meUseImagesInMenus == rSet.mxData->meUseImagesInMenus) &&
2496  (mxData->mbPreferredUseImagesInMenus == rSet.mxData->mbPreferredUseImagesInMenus) &&
2497  (mxData->mbSkipDisabledInMenus == rSet.mxData->mbSkipDisabledInMenus) &&
2498  (mxData->mbHideDisabledMenuItems == rSet.mxData->mbHideDisabledMenuItems) &&
2499  (mxData->mbPreferredContextMenuShortcuts == rSet.mxData->mbPreferredContextMenuShortcuts)&&
2500  (mxData->meContextMenuShortcuts == rSet.mxData->meContextMenuShortcuts) &&
2501  (mxData->mbPrimaryButtonWarpsSlider == rSet.mxData->mbPrimaryButtonWarpsSlider) &&
2502  (mxData->maFontColor == rSet.mxData->maFontColor) &&
2503  (mxData->mnEdgeBlending == rSet.mxData->mnEdgeBlending) &&
2504  (mxData->maEdgeBlendingTopLeftColor == rSet.mxData->maEdgeBlendingTopLeftColor) &&
2505  (mxData->maEdgeBlendingBottomRightColor == rSet.mxData->maEdgeBlendingBottomRightColor) &&
2506  (mxData->mnListBoxMaximumLineCount == rSet.mxData->mnListBoxMaximumLineCount) &&
2507  (mxData->mnColorValueSetColumnCount == rSet.mxData->mnColorValueSetColumnCount) &&
2508  (mxData->maListBoxPreviewDefaultLogicSize == rSet.mxData->maListBoxPreviewDefaultLogicSize) &&
2509  (mxData->maListBoxPreviewDefaultPixelSize == rSet.mxData->maListBoxPreviewDefaultPixelSize) &&
2510  (mxData->mbPreviewUsesCheckeredBackground == rSet.mxData->mbPreviewUsesCheckeredBackground);
2511 }
2512 
2514  mnEnableATT(TRISTATE_INDET),
2515  mnDisablePrinting(TRISTATE_INDET)
2516 {
2517  static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
2518  mbEnableLocalizedDecimalSep = (pEnv != nullptr);
2519 }
2520 
2522  : mxData(std::make_shared<ImplMiscData>())
2523 {
2524 }
2525 
2526 bool MiscSettings::operator ==( const MiscSettings& rSet ) const
2527 {
2528  if ( mxData == rSet.mxData )
2529  return true;
2530 
2531  return (mxData->mnEnableATT == rSet.mxData->mnEnableATT ) &&
2532  (mxData->mnDisablePrinting == rSet.mxData->mnDisablePrinting ) &&
2533  (mxData->mbEnableLocalizedDecimalSep == rSet.mxData->mbEnableLocalizedDecimalSep );
2534 }
2535 
2536 bool
2538 {
2539  return !(*this == rSet);
2540 }
2541 
2543 {
2544  if( mxData->mnDisablePrinting == TRISTATE_INDET )
2545  {
2546  OUString aEnable =
2548  getValue( "DesktopManagement",
2549  "DisablePrinting" );
2550  mxData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2551  }
2552 
2553  return mxData->mnDisablePrinting != TRISTATE_FALSE;
2554 }
2555 
2557 {
2558 
2559 #ifdef _WIN32
2560  if( mxData->mnEnableATT == TRISTATE_INDET )
2561  {
2562  // Check in the Windows registry if an AT tool wants Accessibility support to
2563  // be activated ..
2564  HKEY hkey;
2565 
2566  if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2567  L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2568  &hkey) )
2569  {
2570  DWORD dwType;
2571  wchar_t Data[6]; // possible values: "true", "false", "1", "0", DWORD
2572  DWORD cbData = sizeof(Data);
2573 
2574  if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2575  nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2576  {
2577  switch (dwType)
2578  {
2579  case REG_SZ:
2580  mxData->mnEnableATT = ((0 == wcsicmp(Data, L"1")) || (0 == wcsicmp(Data, L"true"))) ? TRISTATE_TRUE : TRISTATE_FALSE;
2581  break;
2582  case REG_DWORD:
2583  switch (reinterpret_cast<DWORD *>(Data)[0]) {
2584  case 0:
2585  mxData->mnEnableATT = TRISTATE_FALSE;
2586  break;
2587  case 1:
2588  mxData->mnEnableATT = TRISTATE_TRUE;
2589  break;
2590  default:
2591  mxData->mnEnableATT = TRISTATE_INDET;
2592  //TODO: or TRISTATE_TRUE?
2593  break;
2594  }
2595  break;
2596  default:
2597  // Unsupported registry type
2598  break;
2599  }
2600  }
2601 
2602  RegCloseKey(hkey);
2603  }
2604  }
2605 #endif
2606 
2607  if( mxData->mnEnableATT == TRISTATE_INDET )
2608  {
2609  static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
2610  if( !pEnv || !*pEnv )
2611  {
2612  OUString aEnable =
2614  getValue( "Accessibility",
2615  "EnableATToolSupport" );
2616  mxData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2617  }
2618  else
2619  {
2620  mxData->mnEnableATT = TRISTATE_TRUE;
2621  }
2622  }
2623 
2624  return mxData->mnEnableATT != TRISTATE_FALSE;
2625 }
2626 
2627 #ifdef _WIN32
2628 void MiscSettings::SetEnableATToolSupport( bool bEnable )
2629 {
2630  if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mxData->mnEnableATT )
2631  {
2632  if( bEnable && !ImplInitAccessBridge() )
2633  return;
2634 
2635  HKEY hkey;
2636 
2637  // If the accessibility key in the Windows registry exists, change it synchronously
2638  if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2639  L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2640  &hkey) )
2641  {
2642  DWORD dwType;
2643  wchar_t Data[6]; // possible values: "true", "false", 1, 0
2644  DWORD cbData = sizeof(Data);
2645 
2646  if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2647  nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2648  {
2649  switch (dwType)
2650  {
2651  case REG_SZ:
2652  RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2653  0, dwType,
2654  reinterpret_cast<const BYTE*>(bEnable ? L"true" : L"false"),
2655  bEnable ? sizeof(L"true") : sizeof(L"false"));
2656  break;
2657  case REG_DWORD:
2658  reinterpret_cast<DWORD *>(Data)[0] = bEnable ? 1 : 0;
2659  RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2660  0, dwType, reinterpret_cast<const BYTE*>(Data), sizeof(DWORD));
2661  break;
2662  default:
2663  // Unsupported registry type
2664  break;
2665  }
2666  }
2667 
2668  RegCloseKey(hkey);
2669  }
2670 
2672  setValue( "Accessibility",
2673  "EnableATToolSupport",
2674  bEnable ? OUString("true") : OUString("false" ) );
2675  mxData->mnEnableATT = bEnable ? TRISTATE_TRUE : TRISTATE_FALSE;
2676  }
2677 }
2678 #endif
2679 
2681 {
2682  // copy if other references exist
2683  if (mxData.use_count() > 1)
2684  {
2685  mxData = std::make_shared<ImplMiscData>(*mxData);
2686  }
2687  mxData->mbEnableLocalizedDecimalSep = bEnable;
2688 }
2689 
2691 {
2692  return mxData->mbEnableLocalizedDecimalSep;
2693 }
2694 
2696  : mxData(std::make_shared<ImplHelpData>())
2697 {
2698 }
2699 
2700 bool HelpSettings::operator ==( const HelpSettings& rSet ) const
2701 {
2702  if ( mxData == rSet.mxData )
2703  return true;
2704 
2705  return (mxData->mnTipTimeout == rSet.mxData->mnTipTimeout );
2706 }
2707 
2708 sal_uLong
2710 {
2711  return 500;
2712 }
2713 
2714 void
2716 {
2717  // copy if other references exist
2718  if (mxData.use_count() > 1)
2719  {
2720  mxData = std::make_shared<ImplHelpData>(*mxData);
2721  }
2722  mxData->mnTipTimeout = nTipTimeout;
2723 }
2724 
2725 sal_uLong
2727 {
2728  return mxData->mnTipTimeout;
2729 }
2730 
2731 sal_uLong
2733 {
2734  return 1500;
2735 }
2736 
2737 bool
2739 {
2740  return !(*this == rSet);
2741 }
2742 
2744  :
2745  maLocale( LANGUAGE_SYSTEM ),
2746  maUILocale( LANGUAGE_SYSTEM )
2747 {
2750 }
2751 
2753  maMouseSettings( rData.maMouseSettings ),
2754  maStyleSettings( rData.maStyleSettings ),
2755  maMiscSettings( rData.maMiscSettings ),
2756  maHelpSettings( rData.maHelpSettings ),
2757  maLocale( rData.maLocale ),
2758  maUILocale( rData.maUILocale )
2759 {
2760  // Create the cache objects new when their getter is called.
2761 }
2762 
2764 {
2765  mpLocaleDataWrapper.reset();
2766  mpUILocaleDataWrapper.reset();
2768  mpI18nHelper.reset();
2769  mpUII18nHelper.reset();
2770 }
2771 
2773  : mxData(std::make_shared<ImplAllSettingsData>())
2774 {
2775 }
2776 
2778 {
2779  // copy if other references exist
2780  if (mxData.use_count() > 1)
2781  {
2782  mxData = std::make_shared<ImplAllSettingsData>(*mxData);
2783  }
2784 
2785 }
2786 
2788 {
2789 
2791 
2792  if ( nFlags & AllSettingsFlags::MOUSE )
2793  {
2794  if ( mxData->maMouseSettings != rSet.mxData->maMouseSettings )
2795  {
2796  CopyData();
2797  mxData->maMouseSettings = rSet.mxData->maMouseSettings;
2798  nChangeFlags |= AllSettingsFlags::MOUSE;
2799  }
2800  }
2801 
2802  if ( nFlags & AllSettingsFlags::STYLE )
2803  {
2804  if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2805  {
2806  CopyData();
2807  mxData->maStyleSettings = rSet.mxData->maStyleSettings;
2808  nChangeFlags |= AllSettingsFlags::STYLE;
2809  }
2810  }
2811 
2812  if ( nFlags & AllSettingsFlags::MISC )
2813  {
2814  if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2815  {
2816  CopyData();
2817  mxData->maMiscSettings = rSet.mxData->maMiscSettings;
2818  nChangeFlags |= AllSettingsFlags::MISC;
2819  }
2820  }
2821 
2822  if ( nFlags & AllSettingsFlags::LOCALE )
2823  {
2824  if ( mxData->maLocale != rSet.mxData->maLocale )
2825  {
2826  SetLanguageTag( rSet.mxData->maLocale );
2827  nChangeFlags |= AllSettingsFlags::LOCALE;
2828  }
2829  }
2830 
2831  return nChangeFlags;
2832 }
2833 
2835 {
2836 
2838 
2839  if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2840  nChangeFlags |= AllSettingsFlags::STYLE;
2841 
2842  if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2843  nChangeFlags |= AllSettingsFlags::MISC;
2844 
2845  if ( mxData->maLocale != rSet.mxData->maLocale )
2846  nChangeFlags |= AllSettingsFlags::LOCALE;
2847 
2848  return nChangeFlags;
2849 }
2850 
2851 bool AllSettings::operator ==( const AllSettings& rSet ) const
2852 {
2853  if ( mxData == rSet.mxData )
2854  return true;
2855 
2856  if ( (mxData->maMouseSettings == rSet.mxData->maMouseSettings) &&
2857  (mxData->maStyleSettings == rSet.mxData->maStyleSettings) &&
2858  (mxData->maMiscSettings == rSet.mxData->maMiscSettings) &&
2859  (mxData->maHelpSettings == rSet.mxData->maHelpSettings) &&
2860  (mxData->maLocale == rSet.mxData->maLocale) )
2861  {
2862  return true;
2863  }
2864 
2865  return false;
2866 }
2867 
2868 void AllSettings::SetLanguageTag(const OUString& rLanguage, bool bCanonicalize)
2869 {
2870  SetLanguageTag(LanguageTag(rLanguage, bCanonicalize));
2871 }
2872 
2873 void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag )
2874 {
2875  if (mxData->maLocale == rLanguageTag)
2876  return;
2877 
2878  CopyData();
2879 
2880  mxData->maLocale = rLanguageTag;
2881 
2882  if ( mxData->mpLocaleDataWrapper )
2883  {
2884  mxData->mpLocaleDataWrapper.reset();
2885  }
2886  if ( mxData->mpI18nHelper )
2887  {
2888  mxData->mpI18nHelper.reset();
2889  }
2890 }
2891 
2892 namespace
2893 {
2894  bool GetConfigLayoutRTL(bool bMath)
2895  {
2896  static const char* pEnv = getenv("SAL_RTL_ENABLED" );
2897  static int nUIMirroring = -1; // -1: undef, 0: auto, 1: on 2: off
2898 
2899  // environment always overrides
2900  if( pEnv )
2901  return true;
2902 
2903  bool bRTL = false;
2904 
2905  if( nUIMirroring == -1 )
2906  {
2907  nUIMirroring = 0; // ask configuration only once
2910  "org.openoffice.Office.Common/I18N/CTL" ); // note: case sensitive !
2911  if ( aNode.isValid() )
2912  {
2913  bool bTmp = bool();
2914  css::uno::Any aValue = aNode.getNodeValue( "UIMirroring" );
2915  if( aValue >>= bTmp )
2916  {
2917  // found true or false; if it was nil, nothing is changed
2918  nUIMirroring = bTmp ? 1 : 2;
2919  }
2920  }
2921  }
2922 
2923  if( nUIMirroring == 0 ) // no config found (eg, setup) or default (nil) was set: check language
2924  {
2926  if (bMath)
2927  bRTL = MsLangId::isRightToLeftMath( aLang );
2928  else
2929  bRTL = MsLangId::isRightToLeft( aLang );
2930  }
2931  else
2932  bRTL = (nUIMirroring == 1);
2933 
2934  return bRTL;
2935  }
2936 }
2937 
2939 {
2941  return false;
2942  return GetConfigLayoutRTL(false);
2943 }
2944 
2946 {
2948  return false;
2949  return GetConfigLayoutRTL(true);
2950 }
2951 
2953 {
2955  {
2956  static LanguageTag aRet("en-US");
2957  return aRet;
2958  }
2959 
2962 
2963  // SYSTEM locale means: use settings from SvtSysLocale that is resolved
2964  if ( mxData->maLocale.isSystemLocale() )
2965  mxData->maLocale = mxData->maSysLocale.GetLanguageTag();
2966 
2967  return mxData->maLocale;
2968 }
2969 
2971 {
2973  {
2974  static LanguageTag aRet("en-US");
2975  return aRet;
2976  }
2977 
2980 
2981  // the UILocale is never changed
2982  if ( mxData->maUILocale.isSystemLocale() )
2983  mxData->maUILocale = mxData->maSysLocale.GetUILanguageTag();
2984 
2985  return mxData->maUILocale;
2986 }
2987 
2989 {
2990  if ( !mxData->mpLocaleDataWrapper )
2991  const_cast<AllSettings*>(this)->mxData->mpLocaleDataWrapper.reset( new LocaleDataWrapper(
2993  return *mxData->mpLocaleDataWrapper;
2994 }
2995 
2997 {
2998  if ( !mxData->mpUILocaleDataWrapper )
2999  const_cast<AllSettings*>(this)->mxData->mpUILocaleDataWrapper.reset( new LocaleDataWrapper(
3001  return *mxData->mpUILocaleDataWrapper;
3002 }
3003 
3005 {
3006  if ( !mxData->mpNeutralLocaleDataWrapper )
3007  const_cast<AllSettings*>(this)->mxData->mpNeutralLocaleDataWrapper.reset( new LocaleDataWrapper(
3009  return *mxData->mpNeutralLocaleDataWrapper;
3010 }
3011 
3013 {
3014  if ( !mxData->mpI18nHelper ) {
3015  const_cast<AllSettings*>(this)->mxData->mpI18nHelper.reset( new vcl::I18nHelper(
3017  }
3018  return *mxData->mpI18nHelper;
3019 }
3020 
3022 {
3023  if ( !mxData->mpUII18nHelper ) {
3024  const_cast<AllSettings*>(this)->mxData->mpUII18nHelper.reset( new vcl::I18nHelper(
3026  }
3027  return *mxData->mpUII18nHelper;
3028 }
3029 
3031 {
3032  AllSettings aAllSettings( Application::GetSettings() );
3033  if ( nHint & ConfigurationHints::DecSep )
3034  {
3035  MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
3036  bool bIsDecSepAsLocale = aAllSettings.mxData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale();
3037  if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale )
3038  {
3039  aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale );
3040  aAllSettings.SetMiscSettings( aMiscSettings );
3041  }
3042  }
3043 
3044  if ( nHint & ConfigurationHints::Locale )
3045  aAllSettings.SetLanguageTag( aAllSettings.mxData->maSysLocale.GetOptions().GetLanguageTag() );
3046 
3047  Application::SetSettings( aAllSettings );
3048 }
3049 
3050 const StyleSettings&
3052 {
3053  return mxData->maStyleSettings;
3054 }
3055 
3058 {
3059  return mxData->mnOptions;
3060 }
3061 
3062 std::vector<vcl::IconThemeInfo> const &
3064 {
3065  if (!mxData->mIconThemeScanner) {
3067  }
3068  return mxData->mIconThemeScanner->GetFoundIconThemes();
3069 }
3070 
3071 /*static*/ OUString
3073 {
3074  OUString desktopEnvironment = Application::GetDesktopEnvironment();
3075  if (!mxData->mIconThemeScanner) {
3077  }
3078  OUString themeName = mxData->mIconThemeSelector->SelectIconThemeForDesktopEnvironment(
3079  mxData->mIconThemeScanner->GetFoundIconThemes(),
3080  desktopEnvironment
3081  );
3082  return themeName;
3083 }
3084 
3085 void
3086 StyleSettings::SetIconTheme(const OUString& theme)
3087 {
3088  CopyData();
3089  mxData->mIconTheme = theme;
3090 }
3091 
3092 OUString
3094 {
3095  OUString sTheme(mxData->mIconTheme);
3096  if (sTheme.isEmpty())
3097  {
3099  sTheme = "colibre";
3100  else
3101  {
3102  // read from the configuration, or fallback to what the desktop wants
3103  uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
3104  if (xContext.is())
3105  {
3106  sTheme = officecfg::Office::Common::Misc::SymbolStyle::get(xContext);
3107 
3108  if (sTheme.isEmpty() || sTheme == "auto")
3110  }
3111  }
3112  }
3113 
3114  if (!mxData->mIconThemeScanner) {
3116  }
3117  OUString r = mxData->mIconThemeSelector->SelectIconTheme(
3118  mxData->mIconThemeScanner->GetFoundIconThemes(),
3119  sTheme);
3120  return r;
3121 }
3122 
3123 void
3125 {
3126  if (mxData->mbHighContrast == bHighContrast) {
3127  return;
3128  }
3129 
3130  CopyData();
3131  mxData->mbHighContrast = bHighContrast;
3132  mxData->mIconThemeSelector->SetUseHighContrastTheme(bHighContrast);
3133 }
3134 
3135 bool
3137 {
3138  return mxData->mbHighContrast;
3139 }
3140 
3141 void
3142 StyleSettings::SetPreferredIconTheme(const OUString& theme, bool bDarkIconTheme)
3143 {
3144  mxData->mIconThemeSelector->SetPreferredIconTheme(theme, bDarkIconTheme);
3145 }
3146 
3147 void
3149 {
3150  CopyData();
3151  mxData->maMouseSettings = rSet;
3152 }
3153 
3154 const MouseSettings&
3156 {
3157  return mxData->maMouseSettings;
3158 }
3159 
3160 void
3162 {
3163  CopyData();
3164  mxData->maStyleSettings = rSet;
3165 }
3166 
3167 void
3169 {
3170  CopyData();
3171  mxData->maMiscSettings = rSet;
3172 }
3173 
3174 const MiscSettings&
3176 {
3177  return mxData->maMiscSettings;
3178 }
3179 
3180 void
3182 {
3183  CopyData();
3184  mxData->maHelpSettings = rSet;
3185 }
3186 
3187 const HelpSettings&
3189 {
3190  return mxData->maHelpSettings;
3191 }
3192 
3193 bool
3195 {
3196  return !(*this == rSet);
3197 }
3198 
3199 SvtSysLocale&
3201 {
3202  return mxData->maSysLocale;
3203 }
3204 
3205 
3207  bool bCheckedColorSpecialCase )
3208 {
3209  Set3DColors( aBackColor );
3210  SetFaceColor( aBackColor );
3211  SetDialogColor( aBackColor );
3212  SetWorkspaceColor( aBackColor );
3213 
3214  if (bCheckedColorSpecialCase)
3216 }
3217 
3219  const vcl::Font& aLabelFont )
3220 {
3221  SetAppFont( aAppFont );
3222  SetPushButtonFont( aAppFont );
3223  SetToolFont( aAppFont );
3224  SetHelpFont( aAppFont );
3225 
3226  SetMenuFont( aLabelFont );
3227  SetTabFont( aLabelFont );
3228  SetLabelFont( aLabelFont );
3229  SetRadioCheckFont( aLabelFont );
3230  SetFieldFont( aLabelFont );
3231  SetGroupFont( aLabelFont );
3232  SetIconFont( aLabelFont );
3233 }
3234 
3235 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool GetEnableLocalizedDecimalSep() const
void SetCheckedColor(const Color &rColor)
void SetMenuFont(const vcl::Font &rFont)
RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey, rtl_uString *keyName, RegValueType valueType, RegValue pData, sal_uInt32 valueSize)
tools::Long GetStartDragWidth() const
bool mbPreferredUseImagesInMenus
MouseWheelBehaviour mnWheelBehavior
const Color & GetActiveColor() const
void SetTabRolloverTextColor(const Color &rColor)
tools::Long mnStartDragHeight
const Color & GetShadowColor() const
ConfigurationHints
const Color & GetToolTextColor() const
vcl::Font maMenuFont
void SetHighlightColor(const Color &rColor)
bool mbSkipDisabledInMenus
vcl::Font maFieldFont
Color maEdgeBlendingBottomRightColor
Color maActiveTabColor
void SetHelpFont(const vcl::Font &rFont)
std::shared_ptr< ImplMouseData > mxData
Definition: settings.hxx:89
const LocaleDataWrapper & GetLocaleDataWrapper() const
bool GetContextMenuShortcuts() const
sal_Int32 nIndex
Color maHighlightTextColor
bool GetAutoMnemonic() const
const Color & GetDeactiveColor() const
const Color & GetDialogColor() const
Color maDefaultButtonRolloverTextColor
void SetCheckedColorSpecialCase()
bool mbPreferredContextMenuShortcuts
const Color & GetActionButtonTextColor() const
void SetHideDisabledMenuItems(bool bHideDisabledMenuItems)
sal_uInt64 GetDoubleClickTime() const
void SetOptions(MouseSettingsOptions nOptions)
const Color & GetMenuBarRolloverColor() const
const Color & GetMenuBarTextColor() const
Color maDeactiveTextColor
OUString DetermineIconTheme() const
Determine which icon theme should be used.
sal_uLong mnTipTimeout
void SetFontColor(const Color &rColor)
bool operator==(const HelpSettings &rSet) const
void SetStartDragWidth(tools::Long nDragWidth)
void SetDragFullOptions(DragFullOptions nOptions)
void SetFieldFont(const vcl::Font &rFont)
void SetMenuBorderColor(const Color &rColor)
const vcl::Font & GetMenuFont() const
const Color & GetHighlightTextColor() const
const LanguageTag & GetUILanguageTag() const
void SetMenuTextColor(const Color &rColor)
bool IsDecimalSeparatorAsLocale() const
void SetStyleSettings(const StyleSettings &rSet)
void SetPreviewUsesCheckeredBackground(bool bNew)
Color maActionButtonTextColor
TriState mnEnableATT
void SetMonoColor(const Color &rColor)
tools::Long mnDoubleClkWidth
LanguageType getLanguageType(bool bResolveSystem=true) const
StyleSettingsOptions
Definition: settings.hxx:155
void SetLightColor(const Color &rColor)
void SetMenuBarRolloverTextColor(const Color &rColor)
SelectionOptions GetSelectionOptions() const
void SetActionButtonTextColor(const Color &rColor)
bool operator==(const MouseSettings &rSet) const
const Color & GetInactiveTabColor() const
Color maWindowTextColor
SelectionOptions
Definition: settings.hxx:181
tools::Long mnFloatTitleHeight
void SetIconFont(const vcl::Font &rFont)
std::optional< Color > maPersonaMenuBarTextColor
Cache the menubar color.
sal_uInt16 mnListBoxMaximumLineCount
sal_uIntPtr sal_uLong
void SetMiscSettings(const MiscSettings &rSet)
void SetRadioCheckFont(const vcl::Font &rFont)
void SetFieldRolloverTextColor(const Color &rColor)
const Color & GetDefaultButtonTextColor() const
bool GetPreferredUseImagesInMenus() const
long Long
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
Gets the application's settings.
Definition: svapp.cxx:707
Color maWorkspaceColor
const Color & GetFaceColor() const
std::vector< vcl::IconThemeInfo > const & GetInstalledIconThemes() const
Obtain the list of icon themes which were found in the config folder.
vcl::Font maRadioCheckFont
BitmapEx const & GetPersonaHeader() const
const vcl::Font & GetRadioCheckFont() const
ImplSVNWFData maNWFData
Definition: svdata.hxx:395
bool mbHideDisabledMenuItems
const Color & GetGroupTextColor() const
StyleSettingsOptions mnOptions
const Color & GetDefaultButtonPressedRolloverTextColor() const
void SetUseFlatBorders(bool bUseFlatBorders)
void SetWindowColor(const Color &rColor)
const Color & GetWorkspaceColor() const
void SetWeight(FontWeight)
Definition: font/font.cxx:215
Color GetSeparatorColor() const
const ContentProperties & rData
const Color & GetActiveBorderColor() const
Color maDefaultButtonPressedRolloverTextColor
Color maTabHighlightTextColor
const Color & GetFieldRolloverTextColor() const
bool GetPreviewUsesCheckeredBackground() const
tools::Long mnScrollBarSize
bool operator!=(const StyleSettings &rSet) const
void SetHighContrastMode(bool bHighContrast)
void SetDoubleClickWidth(tools::Long nDoubleClkWidth)
const Color & GetLabelTextColor() const
void SetCharSet(rtl_TextEncoding)
Definition: font/font.cxx:129
void SetDoubleClickTime(sal_uInt64 nDoubleClkTime)
std::shared_ptr< vcl::IconThemeSelector > mIconThemeSelector
constexpr::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
void SetMenuHighlightColor(const Color &rColor)
const Color & GetDeactiveTextColor() const
static BitmapEx readBitmapEx(const OUString &rPath)
DragFullOptions mnDragFullOptions
std::shared_ptr< T > make_shared(Args &&...args)
static std::shared_ptr< IconThemeScanner > Create(const OUString &path)
Factory method to create the object.
ToolbarIconSize mnToolbarIconSize
const Color & GetMenuHighlightColor() const
void SetFlatButtonTextColor(const Color &rColor)
void SetDefaultActionButtonTextColor(const Color &rColor)
void SetPrimaryButtonWarpsSlider(bool bPrimaryButtonWarpsSlider)
const Color & GetHelpTextColor() const
Color maDarkShadowColor
tools::Long mnDoubleClkHeight
void SetButtonTextColor(const Color &rColor)
tools::Long mnMinThumbSize
const Size & GetListBoxPreviewDefaultPixelSize() const
TRISTATE_TRUE
const ::Color maShadowColor
const vcl::I18nHelper & GetUILocaleI18nHelper() const
const vcl::Font & GetFieldFont() const
void SetDialogColor(const Color &rColor)
void SetActiveTabColor(const Color &rColor)
static sal_uLong GetTipDelay()
const Color & GetFieldTextColor() const
const Color & GetLightBorderColor() const
Unknown
sal_uLong GetMenuDelay() const
static const OUString & GetDesktopEnvironment()
Get the desktop environment the process is currently running in.
Definition: svapp.cxx:1585
const Color & GetHighlightColor() const
MouseFollowFlags GetFollow() const
bool GetPreferredContextMenuShortcuts() const
void SetLinkColor(const Color &rColor)
const Color & GetActiveTabColor() const
NONE
const Color & GetMenuHighlightTextColor() const
void SetDeactiveBorderColor(const Color &rColor)
void SetDeactiveColor(const Color &rColor)
AllSettingsFlags
Definition: settings.hxx:669
void SetSpinSize(tools::Long nSize)
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
Definition: svapp.cxx:1047
WEIGHT_BOLD
std::unique_ptr< LocaleDataWrapper > mpUILocaleDataWrapper
const Color & GetRadioCheckTextColor() const
sal_uInt16 GetEdgeBlending() const
sal_uInt16 GetColorValueSetColumnCount() const
Color maLightBorderColor
void SetEnableLocalizedDecimalSep(bool bEnable)
Color maActionButtonRolloverTextColor
const Color & GetDefaultButtonRolloverTextColor() const
Color maActiveBorderColor
const vcl::Font & GetLabelFont() const
MouseFollowFlags mnFollow
void SetTitleHeight(tools::Long nSize)
void SetMenuBarRolloverColor(const Color &rColor)
sal_uLong GetButtonRepeat() const
bool mbPrimaryButtonWarpsSlider
bool GetUseFlatMenus() const
void SetMenuHighlightTextColor(const Color &rColor)
static bool IsFuzzing()
MouseSettingsOptions GetOptions() const
SvtSysLocale & GetSysLocale()
void SetDialogTextColor(const Color &rColor)
const Color & GetLightColor() const
void SetOptions(StyleSettingsOptions nOptions)
bool GetHighContrastMode() const
void SetMenuColor(const Color &rColor)
const Color & GetActiveTextColor() const
void SetToolbarIconSize(ToolbarIconSize nSize)
const LocaleDataWrapper & GetUILocaleDataWrapper() const
static OUString GetStandardIconThemePath()
This method will return the standard path where icon themes are located.
MiscSettings maMiscSettings
void SetMenuBarTextColor(const Color &rColor)
void SetDoubleClickHeight(tools::Long nDoubleClkHeight)
SvtSysLocale maSysLocale
vcl::Font maFloatTitleFont
static std::shared_ptr< ConfigurationChanges > create(css::uno::Reference< css::uno::XComponentContext > const &context=comphelper::getProcessComponentContext())
DragFullOptions GetDragFullOptions() const
OUString GetAutomaticallyChosenIconTheme() const
Obtain the name of the icon theme which will be chosen automatically for the desktop environment...
Color maButtonPressedRolloverTextColor
#define STYLE_CURSOR_NOBLINKTIME
Definition: settings.hxx:211
Color maMenuBarTextColor
void IncreaseLuminance(sal_uInt8 cLumInc)
static sal_uInt16 GetStartDragCode()
static Color HSBtoRGB(sal_uInt16 nHue, sal_uInt16 nSaturation, sal_uInt16 nBrightness)
vcl::Font maHelpFont
const HelpSettings & GetHelpSettings() const
MouseSettingsOptions
Definition: settings.hxx:53
const Color & GetMenuTextColor() const
TRISTATE_INDET
void SetMinThumbSize(tools::Long nSize)
const Color & GetEdgeBlendingBottomRightColor() const
sal_uLong mnMenuDelay
BitmapEx const & GetPersonaFooter() const
bool mbUseFontAAFromSystem
Disabling AA doesn't actually disable AA of fonts, instead it is taken from system settings...
#define MOUSE_LEFT
Definition: event.hxx:99
std::unique_ptr< LocaleDataWrapper > mpLocaleDataWrapper
ToolbarIconSize GetToolbarIconSize() const
bool operator!=(const MouseSettings &rSet) const
const Color & GetMenuColor() const
sal_uLong mnButtonRepeat
const LanguageTag & GetLanguageTag() const
void SetAlternatingRowColor(const Color &rColor)
vcl::Font maPushButtonFont
void SetFlatButtonPressedRolloverTextColor(const Color &rColor)
OUString maPersonaHeaderFooter
Cache the settings to detect changes.
Color maDefaultActionButtonTextColor
static ErrCode LoadGraphic(const OUString &rPath, const OUString &rFilter, Graphic &rGraphic, GraphicFilter *pFilter=nullptr, sal_uInt16 *pDeterminedFormat=nullptr)
MouseFollowFlags
Definition: settings.hxx:65
void SetCursorBlinkTime(sal_uInt64 nBlinkTime)
Color maFieldTextColor
bool mbEnableLocalizedDecimalSep
void SetPreferredUseImagesInMenus(bool bPreferredUseImagesInMenus)
const Color & GetDarkShadowColor() const
const DialogStyle & GetDialogStyle() const
bool IsEmpty() const
Definition: bitmapex.cxx:199
MouseWheelBehaviour GetWheelBehavior() const
ImplSVData * ImplGetSVData()
Definition: svdata.cxx:76
#define SAL_CONFIGFILE(name)
Color maAlternatingRowColor
const Color & GetActionButtonRolloverTextColor() const
const vcl::Font & GetPushButtonFont() const
vcl::Font maGroupFont
void SetActionButtonRolloverTextColor(const Color &rColor)
const Color & GetDisableColor() const
static bool isRightToLeft(LanguageType nLang)
tools::Long GetStartDragHeight() const
void SetFamilyName(const OUString &rFamilyName)
Definition: font/font.cxx:107
const vcl::Font & GetGroupFont() const
void SetIconTheme(const OUString &)
Set the icon theme to use.
tools::Long mnAntialiasedMin
std::shared_ptr< ImplStyleData > mxData
Definition: settings.hxx:218
tools::Long mnSpinSize
bool GetUseSystemUIFonts() const
const Color & GetActionButtonPressedRolloverTextColor() const
void SetScrollBarSize(tools::Long nSize)
const Color & GetMenuBarColor() const
MouseMiddleButtonAction GetMiddleButtonAction() const
const vcl::Font & GetToolFont() const
void SetListBoxMaximumLineCount(sal_uInt16 nCount)
void SetEdgeBlending(sal_uInt16 nCount)
const std::optional< Color > & GetPersonaMenuBarTextColor() const
#define LANGUAGE_SYSTEM
DialogStyle maDialogStyle
static void SetSettings(const AllSettings &rSettings)
Sets the application's settings and notifies all windows of the change.
Definition: svapp.cxx:613
Color maCheckedColor
DisplayOptions GetDisplayOptions() const
void SetLanguageTag(const OUString &rLanguage, bool bCanonicalize)
void SetMenuBarColor(const Color &rColor)
const vcl::Font & GetTabFont() const
void SetMouseSettings(const MouseSettings &rSet)
sal_uInt16 mnColorValueSetColumnCount
Color maMenuHighlightTextColor
void SetButtonRolloverTextColor(const Color &rColor)
TRISTATE_FALSE
const Color & GetMenuBarHighlightTextColor() const
void SetGroupTextColor(const Color &rColor)
void SetMenuBarHighlightTextColor(const Color &rColor)
vcl::Font maTitleFont
void SetDisableColor(const Color &rColor)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_GRAY
const Color & GetFontColor() const
const Color & GetFieldColor() const
WEIGHT_NORMAL
bool GetHideDisabledMenuItems() const
std::unique_ptr< LocaleDataWrapper > mpNeutralLocaleDataWrapper
sal_uLong GetTipTimeout() const
BitmapEx maPersonaFooterBitmap
Cache the footer bitmap.
const vcl::Font & GetHelpFont() const
void SetContextMenuShortcuts(TriState eContextMenuShortcuts)
void SetSkipDisabledInMenus(bool bSkipDisabledInMenus)
void SetStandardStyles()
static bool GetLayoutRTL()
bool mbCanDetermineWindowPosition
Definition: svdata.hxx:337
tools::Long GetMinThumbSize() const
exports com.sun.star. gallery
static OConfigurationTreeRoot tryCreateWithComponentContext(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const OUString &_rPath, sal_Int32 _nDepth=-1, CREATION_MODE _eMode=CM_UPDATABLE)
tools::Long GetDoubleClickHeight() const
void SetFieldColor(const Color &rColor)
static void LocaleSettingsChanged(ConfigurationHints nHint)
Color maInactiveTabColor
void SetAppFont(const vcl::Font &rFont)
void SetActionButtonPressedRolloverTextColor(const Color &rColor)
void SetDefaultButtonPressedRolloverTextColor(const Color &rColor)
const Color & GetAlternatingRowColor() const
const LanguageTag & getLanguageTag()
tools::Long GetScrollBarSize() const
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
Definition: graph.cxx:325
void SetRadioCheckTextColor(const Color &rColor)
void SetUseSystemUIFonts(bool bUseSystemUIFonts)
css::beans::Optional< css::uno::Any > getValue(std::u16string_view id)
void SetVisitedLinkColor(const Color &rColor)
std::shared_ptr< ImplAllSettingsData > mxData
Definition: settings.hxx:686
void SetLabelTextColor(const Color &rColor)
const Color & GetCheckedColor() const
Color maDefaultActionButtonPressedRolloverTextColor
LanguageTag maUILocale
void SetDefaultActionButtonPressedRolloverTextColor(const Color &rColor)
Color maMenuBarHighlightTextColor
const Color & GetDefaultActionButtonPressedRolloverTextColor() const
void SetDefaultButtonTextColor(const Color &rColor)
void SetUseImagesInMenus(TriState eUseImagesInMenus)
MouseSettingsOptions mnOptions
Color maHighlightColor
void SetInactiveTabColor(const Color &rColor)
void SetToolFont(const vcl::Font &rFont)
const Color & GetLinkColor() const
WhichPersona
void SetPreferredContextMenuShortcuts(bool bContextMenuShortcuts)
void SetFloatTitleFont(const vcl::Font &rFont)
const Color & GetButtonRolloverTextColor() const
const Color & GetDefaultActionButtonRolloverTextColor() const
static sal_uInt16 GetColorValueSetMaximumRowCount()
StyleSettingsOptions GetOptions() const
Color maFlatButtonRolloverTextColor
Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:828
static sal_uLong GetActionDelay()
const LocaleDataWrapper & GetNeutralLocaleDataWrapper() const
static DefaultFontConfiguration & get()
SelectionOptions mnSelectionOptions
const vcl::I18nHelper & GetLocaleI18nHelper() const
static bool GetMathLayoutRTL()
void SetFloatTitleHeight(tools::Long nSize)
Color maDefaultActionButtonRolloverTextColor
Color maHighlightLinkColor
bool GetUseFontAAFromSystem() const
void SetTabTextColor(const Color &rColor)
vcl::Font maToolFont
const Color & GetVisitedLinkColor() const
static sal_uInt16 GetContextMenuCode()
const Color & GetMenuBorderColor() const
sal_uInt16 mnEdgeBlending
Color maMenuHighlightColor
void SetToolTextColor(const Color &rColor)
void SetSelectionOptions(SelectionOptions nOptions)
void SetPreferredIconTheme(const OUString &, bool bDarkIconTheme=false)
Set a preferred icon theme.
TriState meUseImagesInMenus
TriState mnDisablePrinting
void SetGroupFont(const vcl::Font &rFont)
void SetPushButtonFont(const vcl::Font &rFont)
Color maDeactiveBorderColor
Color maMenuBarRolloverColor
void SetFaceColor(const Color &rColor)
Color maDefaultButtonTextColor
StyleSettings maStyleSettings
Color maFlatButtonTextColor
Color maButtonTextColor
static tools::Long GetSplitSize()
bool operator==(const MiscSettings &rSet) const
void SetLightBorderColor(const Color &rColor)
void SetCursorSize(tools::Long nSize)
void SetStartDragHeight(tools::Long nDragHeight)
void SetTitleFont(const vcl::Font &rFont)
std::shared_ptr< vcl::IconThemeScanner > mIconThemeScanner
void SetFlatButtonRolloverTextColor(const Color &rColor)
Color GetFaceGradientColor() const
vcl::Font maTabFont
static bool IsHeadlessModeEnabled()
Determines if headless mode is enabled.
Definition: svapp.cxx:1529
sal_uInt64 GetCursorBlinkTime() const
static bool GetDockingFloatsSupported()
tools::Long mnStartDragWidth
DisplayOptions mnDisplayOptions
Color maActiveTextColor
const vcl::Font & GetTitleFont() const
const Color & GetButtonTextColor() const
bool GetUseImagesInMenus() const
#define ERRCODE_NONE
Definition: errcode.hxx:198
void SetLabelFont(const vcl::Font &rFont)
unsigned char sal_uInt8
MouseMiddleButtonAction mnMiddleButtonAction
const Color & GetDefaultActionButtonTextColor() const
Color maGroupTextColor
void SetWorkspaceColor(const Color &rColor)
void SetDisplayOptions(DisplayOptions nOptions)
void BatchSetFonts(const vcl::Font &aAppFont, const vcl::Font &aLabelFont)
void SetAutoMnemonic(bool bAutoMnemonic)
OUString mIconTheme
const Color & GetFlatButtonRolloverTextColor() const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
OUString aName
FAMILY_SWISS
const vcl::Font & GetIconFont() const
const Color & GetFlatButtonPressedRolloverTextColor() const
ToolbarIconSize
Definition: settings.hxx:203
const Color & GetTabHighlightTextColor() const
Size maListBoxPreviewDefaultPixelSize
bool GetPrimaryButtonWarpsSlider() const
tools::Long GetCursorSize() const
sal_uInt16 GetListBoxMaximumLineCount() const
void SetButtonPressedRolloverTextColor(const Color &rColor)
tools::Long mnTitleHeight
const Color & GetHelpColor() const
bool mbPreviewUsesCheckeredBackground
void SetWheelBehavior(MouseWheelBehaviour nBehavior)
void SetFollow(MouseFollowFlags nFollow)
css::uno::Any getNodeValue(const OUString &_rPath) const
Reference< XComponentContext > getProcessComponentContext()
const MouseSettings & GetMouseSettings() const
tools::Long GetFloatTitleHeight() const
const vcl::Font & GetFloatTitleFont() const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
Size maListBoxPreviewDefaultLogicSize
const Color & GetWindowColor() const
bool GetSkipDisabledInMenus() const
tools::Long GetTitleHeight() const
Color maFieldRolloverTextColor
void SetHelpColor(const Color &rColor)
static sal_uLong GetBalloonDelay()
void SetActiveBorderColor(const Color &rColor)
vcl::Font maLabelFont
Color maLabelTextColor
const vcl::Font & GetAppFont() const
Color maFlatButtonPressedRolloverTextColor
void Set3DColors(const Color &rColor)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_LIGHTBLUE
tools::Long mnCursorSize
AllSettingsFlags Update(AllSettingsFlags nFlags, const AllSettings &rSettings)
tools::Long GetSpinSize() const
void SetHelpSettings(const HelpSettings &rSet)
void SetListBoxPreviewDefaultLogicSize(Size const &rSize)
TriState meContextMenuShortcuts
static sal_uInt16 GetListBoxPreviewDefaultLineWidth()
void SetMenuDelay(sal_uLong nDelay)
DisplayOptions
Definition: settings.hxx:193
void SetTabFont(const vcl::Font &rFont)
const MiscSettings & GetMiscSettings() const
Color maDialogTextColor
BitmapEx maPersonaHeaderBitmap
Cache the header bitmap.
const Color & GetButtonPressedRolloverTextColor() const
bool operator==(const AllSettings &rSet) const
const Color & GetTabRolloverTextColor() const
MouseWheelBehaviour
Definition: settings.hxx:80
void SetDeactiveTextColor(const Color &rColor)
void SetFieldTextColor(const Color &rColor)
constexpr::Color COL_BLUE(0x00, 0x00, 0x80)
bool operator!=(const HelpSettings &rSet) const
void SetStandardStyles()
void SetShadowColor(const Color &rColor)
void RGBtoHSB(sal_uInt16 &nHue, sal_uInt16 &nSaturation, sal_uInt16 &nBrightness) const
const Color & GetDeactiveBorderColor() const
void SetColorValueSetColumnCount(sal_uInt16 nCount)
Color maRadioCheckTextColor
bool GetEnableATToolSupport() const
void SetAntialiasingMinPixelHeight(tools::Long nMinPixel)
std::unique_ptr< vcl::I18nHelper > mpI18nHelper
const Color & GetHighlightLinkColor() const
std::shared_ptr< ImplHelpData > mxData
Definition: settings.hxx:654
DragFullOptions
Definition: settings.hxx:166
const LanguageTag & GetRealUILanguageTag() const
void SetActiveTextColor(const Color &rColor)
bool GetDisablePrinting() const
void SetTabHighlightTextColor(const Color &rColor)
Color maButtonRolloverTextColor
static SettingsConfigItem * get()
Color maMenuBarRolloverTextColor
void SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
sal_uInt64 mnDoubleClkTime
void SetDefaultButtonRolloverTextColor(const Color &rColor)
static bool isRightToLeftMath(LanguageType nLang)
bool operator!=(const AllSettings &rSet) const
HelpSettings maHelpSettings
const Color & GetMenuBarRolloverTextColor() const
void SetHelpTextColor(const Color &rColor)
void SetButtonRepeat(sal_uLong nRepeat)
sal_uInt64 mnCursorBlinkTime
void SetWindowTextColor(const Color &rColor)
void SetUseFlatMenus(bool bUseFlatMenus)
static void setupPersonaHeaderFooter(WhichPersona eWhich, OUString &rHeaderFooter, BitmapEx &rHeaderFooterBitmap, std::optional< Color > &rMenuBarTextColor)
Update the setting of the Persona header / footer in ImplStyleData.
static sal_uInt16 GetContextMenuClicks()
const Color & GetDialogTextColor() const
TriState
static sal_uLong GetScrollRepeat()
void SetHighlightTextColor(const Color &rColor)
const Color & GetEdgeBlendingTopLeftColor() const
MouseSettings maMouseSettings
Color maActionButtonPressedRolloverTextColor
const Color & GetFlatButtonTextColor() const
SvtSysLocaleOptions & GetOptions() const
static tools::Long GetBorderSize()
void SetDefaultActionButtonRolloverTextColor(const Color &rColor)
#define MOUSE_RIGHT
Definition: event.hxx:101
AllSettingsFlags GetChangeFlags(const AllSettings &rSettings) const
sal_Int32 h
const Color & GetTabTextColor() const
void SetTipTimeout(sal_uLong nTipTimeout)
bool operator!=(const MiscSettings &rSet) const
void BatchSetBackgrounds(const Color &aBackColor, bool bCheckedColorSpecialCase=true)
sal_uLong GetAntialiasingMinPixelHeight() const
const Color & GetWindowTextColor() const
vcl::Font maIconFont
void SetDarkShadowColor(const Color &rColor)
Color maTabRolloverTextColor
const Color & GetMonoColor() const
bool operator==(const StyleSettings &rSet) const
void SetMiddleButtonAction(MouseMiddleButtonAction nAction)
Color maMenuBorderColor
std::shared_ptr< ImplMiscData > mxData
Definition: settings.hxx:634
bool GetUseFlatBorders() const
tools::Long GetDoubleClickWidth() const
MouseMiddleButtonAction
Definition: settings.hxx:75
Color maVisitedLinkColor
std::unique_ptr< vcl::I18nHelper > mpUII18nHelper
static sal_uLong GetButtonStartRepeat()
vcl::Font maAppFont
void SetActiveColor(const Color &rColor)
Color maEdgeBlendingTopLeftColor