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 -*- */
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 <vcl/IconThemeScanner.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 <vcl/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;
62  long mnDoubleClkWidth = 2;
64  long mnStartDragWidth = 2 ;
71 };
72 
74 {
75  ImplStyleData();
76  ImplStyleData( const ImplStyleData& rData );
77 
78  void SetStandardStyles();
79 
152  sal_uInt64 mnCursorBlinkTime;
171  std::shared_ptr<vcl::IconThemeScanner>
173  std::shared_ptr<vcl::IconThemeSelector>
175 
176  OUString mIconTheme;
181  //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise
182  //primary means scroll by single page. Secondary button takes the alternative behaviour
186 
187  sal_uInt16 mnEdgeBlending;
195 
197 
201 };
202 
204 {
205  ImplMiscData();
209 };
210 
212 {
214 };
215 
217 {
221 
228  std::unique_ptr<LocaleDataWrapper> mpLocaleDataWrapper;
229  std::unique_ptr<LocaleDataWrapper> mpUILocaleDataWrapper;
230  std::unique_ptr<vcl::I18nHelper> mpI18nHelper;
231  std::unique_ptr<vcl::I18nHelper> mpUII18nHelper;
233 };
234 
235 void
237 {
238  CopyData();
239  mxData->mnOptions = nOptions;
240 }
241 
244 {
245  return mxData->mnOptions;
246 }
247 
248 void
249 MouseSettings::SetDoubleClickTime( sal_uInt64 nDoubleClkTime )
250 {
251  CopyData();
252  mxData->mnDoubleClkTime = nDoubleClkTime;
253 }
254 
255 sal_uInt64
257 {
258  return mxData->mnDoubleClkTime;
259 }
260 
261 void
262 MouseSettings::SetDoubleClickWidth( long nDoubleClkWidth )
263 {
264  CopyData();
265  mxData->mnDoubleClkWidth = nDoubleClkWidth;
266 }
267 
268 long
270 {
271  return mxData->mnDoubleClkWidth;
272 }
273 
274 void
275 MouseSettings::SetDoubleClickHeight( long nDoubleClkHeight )
276 {
277  CopyData();
278  mxData->mnDoubleClkHeight = nDoubleClkHeight;
279 }
280 
281 long
283 {
284  return mxData->mnDoubleClkHeight;
285 }
286 
287 void
289 {
290  CopyData();
291  mxData->mnStartDragWidth = nDragWidth;
292 }
293 
294 long
296 {
297  return mxData->mnStartDragWidth;
298 }
299 
300 void
302 {
303  CopyData();
304  mxData->mnStartDragHeight = nDragHeight;
305 }
306 
307 long
309 {
310  return mxData->mnStartDragHeight;
311 }
312 
313 sal_uInt16
315 {
316  return MOUSE_LEFT;
317 }
318 
319 sal_uInt16
321 {
322  return MOUSE_RIGHT;
323 }
324 
325 sal_uInt16
327 {
328  return 1;
329 }
330 
331 sal_uLong
333 {
334  return 100;
335 }
336 
337 sal_uLong
339 {
340  return 370;
341 }
342 
343 void
345 {
346  CopyData();
347  mxData->mnButtonRepeat = nRepeat;
348 }
349 
350 sal_uLong
352 {
353  return mxData->mnButtonRepeat;
354 }
355 
356 sal_uLong
358 {
359  return 250;
360 }
361 
362 void
364 {
365  CopyData();
366  mxData->mnMenuDelay = nDelay;
367 }
368 
369 sal_uLong
371 {
372  return mxData->mnMenuDelay;
373 }
374 
375 void
377 {
378  CopyData();
379  mxData->mnFollow = nFollow;
380 }
381 
384 {
385  return mxData->mnFollow;
386 }
387 
388 void
390 {
391  CopyData();
392  mxData->mnMiddleButtonAction = nAction;
393 }
394 
397 {
398  return mxData->mnMiddleButtonAction;
399 }
400 
401 void
403 {
404  CopyData();
405  mxData->mnWheelBehavior = nBehavior;
406 }
407 
410 {
411  return mxData->mnWheelBehavior;
412 }
413 
414 bool
416 {
417  return !(*this == rSet);
418 }
419 
421  : mxData(std::make_shared<ImplMouseData>())
422 {
423 }
424 
426 {
427  // copy if other references exist
428  if (mxData.use_count() > 1)
429  {
430  mxData = std::make_shared<ImplMouseData>(*mxData);
431  }
432 }
433 
434 bool MouseSettings::operator ==( const MouseSettings& rSet ) const
435 {
436  if ( mxData == rSet.mxData )
437  return true;
438 
439  return
440  (mxData->mnOptions == rSet.mxData->mnOptions) &&
441  (mxData->mnDoubleClkTime == rSet.mxData->mnDoubleClkTime) &&
442  (mxData->mnDoubleClkWidth == rSet.mxData->mnDoubleClkWidth) &&
443  (mxData->mnDoubleClkHeight == rSet.mxData->mnDoubleClkHeight) &&
444  (mxData->mnStartDragWidth == rSet.mxData->mnStartDragWidth) &&
445  (mxData->mnStartDragHeight == rSet.mxData->mnStartDragHeight) &&
446  (mxData->mnMiddleButtonAction == rSet.mxData->mnMiddleButtonAction) &&
447  (mxData->mnButtonRepeat == rSet.mxData->mnButtonRepeat) &&
448  (mxData->mnMenuDelay == rSet.mxData->mnMenuDelay) &&
449  (mxData->mnFollow == rSet.mxData->mnFollow) &&
450  (mxData->mnWheelBehavior == rSet.mxData->mnWheelBehavior );
451 }
452 
454  mnScrollBarSize(16),
455  mnSpinSize(16),
456  mnCursorSize(2),
457  mnAntialiasedMin(0),
458  mnCursorBlinkTime(STYLE_CURSOR_NOBLINKTIME),
459  mnDragFullOptions(DragFullOptions::All),
460  mnSelectionOptions(SelectionOptions::NONE),
461  mnDisplayOptions(DisplayOptions::NONE),
462  mnToolbarIconSize(ToolbarIconSize::Unknown),
463  mnOptions(StyleSettingsOptions::NONE),
464  mbAutoMnemonic(true),
465  meUseImagesInMenus(TRISTATE_INDET),
466  mnMinThumbSize(16),
467  mIconThemeSelector(new vcl::IconThemeSelector()),
468  meContextMenuShortcuts(TRISTATE_INDET),
469  mnEdgeBlending(35),
470  maEdgeBlendingTopLeftColor(Color(0xC0, 0xC0, 0xC0)),
471  maEdgeBlendingBottomRightColor(Color(0x40, 0x40, 0x40)),
472  mnListBoxMaximumLineCount(25),
473  mnColorValueSetColumnCount(12),
474  maListBoxPreviewDefaultLogicSize(Size(15, 7)),
475  maListBoxPreviewDefaultPixelSize(Size(0, 0)), // on-demand calculated in GetListBoxPreviewDefaultPixelSize(),
476  mbPreviewUsesCheckeredBackground(true)
477 {
479 }
480 
482  maActiveBorderColor( rData.maActiveBorderColor ),
483  maActiveColor( rData.maActiveColor ),
484  maActiveTextColor( rData.maActiveTextColor ),
485  maAlternatingRowColor( rData.maAlternatingRowColor ),
486  maButtonTextColor( rData.maButtonTextColor ),
487  maButtonRolloverTextColor( rData.maButtonRolloverTextColor ),
488  maButtonPressedRolloverTextColor( rData.maButtonPressedRolloverTextColor ),
489  maCheckedColor( rData.maCheckedColor ),
490  maDarkShadowColor( rData.maDarkShadowColor ),
491  maDeactiveBorderColor( rData.maDeactiveBorderColor ),
492  maDeactiveColor( rData.maDeactiveColor ),
493  maDeactiveTextColor( rData.maDeactiveTextColor ),
494  maDialogColor( rData.maDialogColor ),
495  maDialogTextColor( rData.maDialogTextColor ),
496  maDisableColor( rData.maDisableColor ),
497  maFaceColor( rData.maFaceColor ),
498  maFieldColor( rData.maFieldColor ),
499  maFieldTextColor( rData.maFieldTextColor ),
500  maFieldRolloverTextColor( rData.maFieldRolloverTextColor ),
501  maFontColor( rData.maFontColor ),
502  maGroupTextColor( rData.maGroupTextColor ),
503  maHelpColor( rData.maHelpColor ),
504  maHelpTextColor( rData.maHelpTextColor ),
505  maHighlightColor( rData.maHighlightColor ),
506  maHighlightLinkColor( rData.maHighlightLinkColor ),
507  maHighlightTextColor( rData.maHighlightTextColor ),
508  maLabelTextColor( rData.maLabelTextColor ),
509  maLightBorderColor( rData.maLightBorderColor ),
510  maLightColor( rData.maLightColor ),
511  maLinkColor( rData.maLinkColor ),
512  maMenuBarColor( rData.maMenuBarColor ),
513  maMenuBarRolloverColor( rData.maMenuBarRolloverColor ),
514  maMenuBorderColor( rData.maMenuBorderColor ),
515  maMenuColor( rData.maMenuColor ),
516  maMenuHighlightColor( rData.maMenuHighlightColor ),
517  maMenuHighlightTextColor( rData.maMenuHighlightTextColor ),
518  maMenuTextColor( rData.maMenuTextColor ),
519  maMenuBarTextColor( rData.maMenuBarTextColor ),
520  maMenuBarRolloverTextColor( rData.maMenuBarRolloverTextColor ),
521  maMenuBarHighlightTextColor( rData.maMenuBarHighlightTextColor ),
522  maMonoColor( rData.maMonoColor ),
523  maRadioCheckTextColor( rData.maRadioCheckTextColor ),
524  maShadowColor( rData.maShadowColor ),
525  maVisitedLinkColor( rData.maVisitedLinkColor ),
526  maToolTextColor( rData.maToolTextColor ),
527  maWindowColor( rData.maWindowColor ),
528  maWindowTextColor( rData.maWindowTextColor ),
529  maWorkspaceColor( rData.maWorkspaceColor ),
530  maActiveTabColor( rData.maActiveTabColor ),
531  maInactiveTabColor( rData.maInactiveTabColor ),
532  maTabTextColor( rData.maTabTextColor ),
533  maTabRolloverTextColor( rData.maTabRolloverTextColor ),
534  maTabHighlightTextColor( rData.maTabHighlightTextColor ),
535  maAppFont( rData.maAppFont ),
536  maHelpFont( rData.maAppFont ),
537  maTitleFont( rData.maTitleFont ),
538  maFloatTitleFont( rData.maFloatTitleFont ),
539  maMenuFont( rData.maMenuFont ),
540  maToolFont( rData.maToolFont ),
541  maLabelFont( rData.maLabelFont ),
542  maRadioCheckFont( rData.maRadioCheckFont ),
543  maPushButtonFont( rData.maPushButtonFont ),
544  maFieldFont( rData.maFieldFont ),
545  maIconFont( rData.maIconFont ),
546  maTabFont( rData.maTabFont ),
547  maGroupFont( rData.maGroupFont ),
548  mnTitleHeight(rData.mnTitleHeight),
549  mnFloatTitleHeight(rData.mnFloatTitleHeight),
550  mnScrollBarSize(rData.mnScrollBarSize),
551  mnSpinSize(rData.mnSpinSize),
552  mnCursorSize(rData.mnCursorSize),
553  mnAntialiasedMin(rData.mnAntialiasedMin),
554  mnCursorBlinkTime(rData.mnCursorBlinkTime),
555  mnDragFullOptions(rData.mnDragFullOptions),
556  mnSelectionOptions(rData.mnSelectionOptions),
557  mnDisplayOptions(rData.mnDisplayOptions),
558  mnToolbarIconSize(rData.mnToolbarIconSize),
559  mnUseFlatMenus(rData.mnUseFlatMenus),
560  mnOptions(rData.mnOptions),
561  mbHighContrast(rData.mbHighContrast),
562  mbUseSystemUIFonts(rData.mbUseSystemUIFonts),
563  mbUseFontAAFromSystem(rData.mbUseFontAAFromSystem),
564  mbAutoMnemonic(rData.mbAutoMnemonic),
565  meUseImagesInMenus(rData.meUseImagesInMenus),
566  mnUseFlatBorders(rData.mnUseFlatBorders),
567  mbPreferredUseImagesInMenus(rData.mbPreferredUseImagesInMenus),
568  mnMinThumbSize(rData.mnMinThumbSize),
569  mIconThemeScanner(rData.mIconThemeScanner?new vcl::IconThemeScanner(*rData.mIconThemeScanner):nullptr),
570  mIconThemeSelector(new vcl::IconThemeSelector(*rData.mIconThemeSelector)),
571  mIconTheme(rData.mIconTheme),
572  mbSkipDisabledInMenus(rData.mbSkipDisabledInMenus),
573  mbHideDisabledMenuItems(rData.mbHideDisabledMenuItems),
574  mbPreferredContextMenuShortcuts(rData.mbPreferredContextMenuShortcuts),
575  meContextMenuShortcuts(rData.meContextMenuShortcuts),
576  mbPrimaryButtonWarpsSlider(rData.mbPrimaryButtonWarpsSlider),
577  maDialogStyle( rData.maDialogStyle ),
578  maFrameStyle( rData.maFrameStyle ),
579  mnEdgeBlending(rData.mnEdgeBlending),
580  maEdgeBlendingTopLeftColor(rData.maEdgeBlendingTopLeftColor),
581  maEdgeBlendingBottomRightColor(rData.maEdgeBlendingBottomRightColor),
582  mnListBoxMaximumLineCount(rData.mnListBoxMaximumLineCount),
583  mnColorValueSetColumnCount(rData.mnColorValueSetColumnCount),
584  maListBoxPreviewDefaultLogicSize(rData.maListBoxPreviewDefaultLogicSize),
585  maListBoxPreviewDefaultPixelSize(rData.maListBoxPreviewDefaultPixelSize),
586  mbPreviewUsesCheckeredBackground(rData.mbPreviewUsesCheckeredBackground),
587  maPersonaHeaderFooter( rData.maPersonaHeaderFooter ),
588  maPersonaHeaderBitmap( rData.maPersonaHeaderBitmap ),
589  maPersonaFooterBitmap( rData.maPersonaFooterBitmap ),
590  maPersonaMenuBarTextColor( rData.maPersonaMenuBarTextColor )
591 {
592 }
593 
595 {
596  vcl::Font aStdFont( FAMILY_SWISS, Size( 0, 8 ) );
597  aStdFont.SetCharSet( osl_getThreadTextEncoding() );
598  aStdFont.SetWeight( WEIGHT_NORMAL );
600  aStdFont.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en")));
601  else
602  aStdFont.SetFamilyName("Liberation Sans");
603  maAppFont = aStdFont;
604  maHelpFont = aStdFont;
605  maMenuFont = aStdFont;
606  maToolFont = aStdFont;
607  maGroupFont = aStdFont;
608  maLabelFont = aStdFont;
609  maRadioCheckFont = aStdFont;
610  maPushButtonFont = aStdFont;
611  maFieldFont = aStdFont;
612  maIconFont = aStdFont;
613  maTabFont = aStdFont;
614  aStdFont.SetWeight( WEIGHT_BOLD );
615  maFloatTitleFont = aStdFont;
616  maTitleFont = aStdFont;
617 
619  maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
634  maWorkspaceColor = Color( 0xDF, 0xDF, 0xDE );
663  maHelpColor = Color( 0xFF, 0xFF, 0xE0 );
666  maVisitedLinkColor = Color( 0x00, 0x00, 0xCC );
670  maAlternatingRowColor = Color( 0xEE, 0xEE, 0xEE );
671 
672  mnTitleHeight = 18;
673  mnFloatTitleHeight = 13;
674  mbHighContrast = false;
675  mbUseSystemUIFonts = true;
676  mbUseFontAAFromSystem = true;
677  mnUseFlatBorders = false;
678  mnUseFlatMenus = false;
680  mbSkipDisabledInMenus = false;
681  mbHideDisabledMenuItems = false;
684 }
685 
687  : mxData(std::make_shared<ImplStyleData>())
688 {
689 }
690 
691 void
693 {
694  CopyData();
695  mxData->maFaceColor = rColor;
696 }
697 
698 const Color&
700 {
701  return mxData->maFaceColor;
702 }
703 
704 void
706 {
707  CopyData();
708  mxData->maCheckedColor = rColor;
709 }
710 
711 const Color&
713 {
714  return mxData->maCheckedColor;
715 }
716 
717 void
719 {
720  CopyData();
721  mxData->maLightColor = rColor;
722 }
723 
724 const Color&
726 {
727  return mxData->maLightColor;
728 }
729 
730 void
732 {
733  CopyData();
734  mxData->maLightBorderColor = rColor;
735 }
736 
737 const Color&
739 {
740  return mxData->maLightBorderColor;
741 }
742 
743 void
745 {
746  CopyData();
747  mxData->maShadowColor = rColor;
748 }
749 
750 const Color&
752 {
753  return mxData->maShadowColor;
754 }
755 
756 void
758 {
759  CopyData();
760  mxData->maDarkShadowColor = rColor;
761 }
762 
763 const Color&
765 {
766  return mxData->maDarkShadowColor;
767 }
768 
769 void
771 {
772  CopyData();
773  mxData->maButtonTextColor = rColor;
774 }
775 
776 const Color&
778 {
779  return mxData->maButtonTextColor;
780 }
781 
782 void
784 {
785  CopyData();
786  mxData->maButtonRolloverTextColor = rColor;
787 }
788 
789 const Color&
791 {
792  return mxData->maButtonRolloverTextColor;
793 }
794 
795 void
797 {
798  CopyData();
799  mxData->maButtonPressedRolloverTextColor = rColor;
800 }
801 
802 const Color&
804 {
805  return mxData->maButtonPressedRolloverTextColor;
806 }
807 
808 void
810 {
811  CopyData();
812  mxData->maRadioCheckTextColor = rColor;
813 }
814 
815 const Color&
817 {
818  return mxData->maRadioCheckTextColor;
819 }
820 
821 void
823 {
824  CopyData();
825  mxData->maGroupTextColor = rColor;
826 }
827 
828 const Color&
830 {
831  return mxData->maGroupTextColor;
832 }
833 
834 void
836 {
837  CopyData();
838  mxData->maLabelTextColor = rColor;
839 }
840 
841 const Color&
843 {
844  return mxData->maLabelTextColor;
845 }
846 
847 void
849 {
850  CopyData();
851  mxData->maWindowColor = rColor;
852 }
853 
854 const Color&
856 {
857  return mxData->maWindowColor;
858 }
859 
860 void
862 {
863  CopyData();
864  mxData->maWindowTextColor = rColor;
865 }
866 
867 const Color&
869 {
870  return mxData->maWindowTextColor;
871 }
872 
873 void
875 {
876  CopyData();
877  mxData->maDialogColor = rColor;
878 }
879 
880 const Color&
882 {
883  return mxData->maDialogColor;
884 }
885 
886 void
888 {
889  CopyData();
890  mxData->maDialogTextColor = rColor;
891 }
892 
893 const Color&
895 {
896  return mxData->maDialogTextColor;
897 }
898 
899 void
901 {
902  CopyData();
903  mxData->maWorkspaceColor = rColor;
904 }
905 
906 const Color&
908 {
909  return mxData->maWorkspaceColor;
910 }
911 
912 void
914 {
915  CopyData();
916  mxData->maFieldColor = rColor;
917 }
918 
919 const Color&
921 {
922  return mxData->maFieldColor;
923 }
924 
925 void
927 {
928  CopyData();
929  mxData->maFieldTextColor = rColor;
930 }
931 
932 const Color&
934 {
935  return mxData->maFieldTextColor;
936 }
937 
938 void
940 {
941  CopyData();
942  mxData->maFieldRolloverTextColor = rColor;
943 }
944 
945 const Color&
947 {
948  return mxData->maFieldRolloverTextColor;
949 }
950 
951 void
953 {
954  CopyData();
955  mxData->maActiveColor = rColor;
956 }
957 
958 const Color&
960 {
961  return mxData->maActiveColor;
962 }
963 
964 void
966 {
967  CopyData();
968  mxData->maActiveTextColor = rColor;
969 }
970 
971 const Color&
973 {
974  return mxData->maActiveTextColor;
975 }
976 
977 void
979 {
980  CopyData();
981  mxData->maActiveBorderColor = rColor;
982 }
983 
984 const Color&
986 {
987  return mxData->maActiveBorderColor;
988 }
989 
990 void
992 {
993  CopyData();
994  mxData->maDeactiveColor = rColor;
995 }
996 
997 const Color&
999 {
1000  return mxData->maDeactiveColor;
1001 }
1002 
1003 void
1005 {
1006  CopyData();
1007  mxData->maDeactiveTextColor = rColor;
1008 }
1009 
1010 const Color&
1012 {
1013  return mxData->maDeactiveTextColor;
1014 }
1015 
1016 void
1018 {
1019  CopyData();
1020  mxData->maDeactiveBorderColor = rColor;
1021 }
1022 
1023 const Color&
1025 {
1026  return mxData->maDeactiveBorderColor;
1027 }
1028 
1029 void
1031 {
1032  CopyData();
1033  mxData->maHighlightColor = rColor;
1034 }
1035 
1036 const Color&
1038 {
1039  return mxData->maHighlightColor;
1040 }
1041 
1042 void
1044 {
1045  CopyData();
1046  mxData->maHighlightTextColor = rColor;
1047 }
1048 
1049 const Color&
1051 {
1052  return mxData->maHighlightTextColor;
1053 }
1054 
1055 void
1057 {
1058  CopyData();
1059  mxData->maDisableColor = rColor;
1060 }
1061 
1062 const Color&
1064 {
1065  return mxData->maDisableColor;
1066 }
1067 
1068 void
1070 {
1071  CopyData();
1072  mxData->maHelpColor = rColor;
1073 }
1074 
1075 const Color&
1077 {
1078  return mxData->maHelpColor;
1079 }
1080 
1081 void
1083 {
1084  CopyData();
1085  mxData->maHelpTextColor = rColor;
1086 }
1087 
1088 const Color&
1090 {
1091  return mxData->maHelpTextColor;
1092 }
1093 
1094 void
1096 {
1097  CopyData();
1098  mxData->maMenuColor = rColor;
1099 }
1100 
1101 const Color&
1103 {
1104  return mxData->maMenuColor;
1105 }
1106 
1107 void
1109 {
1110  CopyData();
1111  mxData->maMenuBarColor = rColor;
1112 }
1113 
1114 const Color&
1116 {
1117  return mxData->maMenuBarColor;
1118 }
1119 
1120 void
1122 {
1123  CopyData();
1124  mxData->maMenuBarRolloverColor = rColor;
1125 }
1126 
1127 const Color&
1129 {
1130  return mxData->maMenuBarRolloverColor;
1131 }
1132 
1133 void
1135 {
1136  CopyData();
1137  mxData->maMenuBorderColor = rColor;
1138 }
1139 
1140 const Color&
1142 {
1143  return mxData->maMenuBorderColor;
1144 }
1145 
1146 void
1148 {
1149  CopyData();
1150  mxData->maMenuTextColor = rColor;
1151 }
1152 
1153 const Color&
1155 {
1156  return mxData->maMenuTextColor;
1157 }
1158 
1159 void
1161 {
1162  CopyData();
1163  mxData->maMenuBarTextColor = rColor;
1164 }
1165 
1166 const Color&
1168 {
1169  return mxData->maMenuBarTextColor;
1170 }
1171 
1172 void
1174 {
1175  CopyData();
1176  mxData->maMenuBarRolloverTextColor = rColor;
1177 }
1178 
1179 const Color&
1181 {
1182  return mxData->maMenuBarRolloverTextColor;
1183 }
1184 
1185 void
1187 {
1188  CopyData();
1189  mxData->maMenuBarHighlightTextColor = rColor;
1190 }
1191 
1192 const Color&
1194 {
1195  return mxData->maMenuBarHighlightTextColor;
1196 }
1197 
1198 void
1200 {
1201  CopyData();
1202  mxData->maMenuHighlightColor = rColor;
1203 }
1204 
1205 const Color&
1207 {
1208  return mxData->maMenuHighlightColor;
1209 }
1210 
1211 void
1213 {
1214  CopyData();
1215  mxData->maMenuHighlightTextColor = rColor;
1216 }
1217 
1218 const Color&
1220 {
1221  return mxData->maMenuHighlightTextColor;
1222 }
1223 
1224 void
1226 {
1227  CopyData();
1228  mxData->maTabTextColor = rColor;
1229 }
1230 
1231 const Color&
1233 {
1234  return mxData->maTabTextColor;
1235 }
1236 
1237 void
1239 {
1240  CopyData();
1241  mxData->maTabRolloverTextColor = rColor;
1242 }
1243 
1244 const Color&
1246 {
1247  return mxData->maTabRolloverTextColor;
1248 }
1249 
1250 void
1252 {
1253  CopyData();
1254  mxData->maTabHighlightTextColor = rColor;
1255 }
1256 
1257 const Color&
1259 {
1260  return mxData->maTabHighlightTextColor;
1261 }
1262 
1263 void
1265 {
1266  CopyData();
1267  mxData->maLinkColor = rColor;
1268 }
1269 
1270 const Color&
1272 {
1273  return mxData->maLinkColor;
1274 }
1275 
1276 void
1278 {
1279  CopyData();
1280  mxData->maVisitedLinkColor = rColor;
1281 }
1282 
1283 const Color&
1285 {
1286  return mxData->maVisitedLinkColor;
1287 }
1288 
1289 void
1291 {
1292  CopyData();
1293  mxData->maToolTextColor = rColor;
1294 }
1295 
1296 const Color&
1298 {
1299  return mxData->maToolTextColor;
1300 }
1301 
1302 const Color&
1304 {
1305  return mxData->maHighlightLinkColor;
1306 }
1307 
1308 void
1310 {
1311  CopyData();
1312  mxData->maMonoColor = rColor;
1313 }
1314 
1315 const Color&
1317 {
1318  return mxData->maMonoColor;
1319 }
1320 
1321 void
1323 {
1324  CopyData();
1325  mxData->maActiveTabColor = rColor;
1326 }
1327 
1328 const Color&
1330 {
1331  return mxData->maActiveTabColor;
1332 }
1333 
1334 void
1336 {
1337  CopyData();
1338  mxData->maInactiveTabColor = rColor;
1339 }
1340 
1341 const Color&
1343 {
1344  return mxData->maInactiveTabColor;
1345 }
1346 
1347 const Color&
1349 {
1350  return mxData->maAlternatingRowColor;
1351 }
1352 
1353 void
1354 StyleSettings::SetUseSystemUIFonts( bool bUseSystemUIFonts )
1355 {
1356  CopyData();
1357  mxData->mbUseSystemUIFonts = bUseSystemUIFonts;
1358 }
1359 
1360 bool
1362 {
1363  return mxData->mbUseSystemUIFonts;
1364 }
1365 
1366 void StyleSettings::SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
1367 {
1368  CopyData();
1369  mxData->mbUseFontAAFromSystem = bUseFontAAFromSystem;
1370 }
1371 
1373 {
1374  return mxData->mbUseFontAAFromSystem;
1375 }
1376 
1377 void
1378 StyleSettings::SetUseFlatBorders( bool bUseFlatBorders )
1379 {
1380  CopyData();
1381  mxData->mnUseFlatBorders = bUseFlatBorders;
1382 }
1383 
1384 bool
1386 {
1387  return mxData->mnUseFlatBorders;
1388 }
1389 
1390 void
1391 StyleSettings::SetUseFlatMenus( bool bUseFlatMenus )
1392 {
1393  CopyData();
1394  mxData->mnUseFlatMenus = bUseFlatMenus;
1395 }
1396 
1397 bool
1399 {
1400  return mxData->mnUseFlatMenus;
1401 }
1402 
1403 void
1405 {
1406  CopyData();
1407  mxData->meUseImagesInMenus = eUseImagesInMenus;
1408 }
1409 
1410 void
1411 StyleSettings::SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus )
1412 {
1413  CopyData();
1414  mxData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus;
1415 }
1416 
1417 bool
1419 {
1420  return mxData->mbPreferredUseImagesInMenus;
1421 }
1422 
1423 void
1424 StyleSettings::SetSkipDisabledInMenus( bool bSkipDisabledInMenus )
1425 {
1426  CopyData();
1427  mxData->mbSkipDisabledInMenus = bSkipDisabledInMenus;
1428 }
1429 
1430 bool
1432 {
1433  return mxData->mbSkipDisabledInMenus;
1434 }
1435 
1436 void
1437 StyleSettings::SetHideDisabledMenuItems( bool bHideDisabledMenuItems )
1438 {
1439  CopyData();
1440  mxData->mbHideDisabledMenuItems = bHideDisabledMenuItems;
1441 }
1442 
1443 bool
1445 {
1446  return mxData->mbHideDisabledMenuItems;
1447 }
1448 
1449 void
1451 {
1452  CopyData();
1453  mxData->meContextMenuShortcuts = eContextMenuShortcuts;
1454 }
1455 
1456 bool
1458 {
1459  switch (mxData->meContextMenuShortcuts)
1460  {
1461  case TRISTATE_FALSE:
1462  return false;
1463  case TRISTATE_TRUE:
1464  return true;
1465  default: // TRISTATE_INDET:
1467  }
1468 }
1469 
1470 void
1472 {
1473  CopyData();
1474  mxData->mbPreferredContextMenuShortcuts = bContextMenuShortcuts;
1475 }
1476 
1477 bool
1479 {
1480  return mxData->mbPreferredContextMenuShortcuts;
1481 }
1482 
1483 void
1484 StyleSettings::SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider )
1485 {
1486  CopyData();
1487  mxData->mbPrimaryButtonWarpsSlider = bPrimaryButtonWarpsSlider;
1488 }
1489 
1490 bool
1492 {
1493  return mxData->mbPrimaryButtonWarpsSlider;
1494 }
1495 
1496 void
1498 {
1499  CopyData();
1500  mxData->maAppFont = rFont;
1501 }
1502 
1503 const vcl::Font&
1505 {
1506  return mxData->maAppFont;
1507 }
1508 
1509 void
1511 {
1512  CopyData();
1513  mxData->maHelpFont = rFont;
1514 }
1515 
1516 const vcl::Font&
1518 {
1519  return mxData->maHelpFont;
1520 }
1521 
1522 void
1524 {
1525  CopyData();
1526  mxData->maTitleFont = rFont;
1527 }
1528 
1529 const vcl::Font&
1531 {
1532  return mxData->maTitleFont;
1533 }
1534 
1535 void
1537 {
1538  CopyData();
1539  mxData->maFloatTitleFont = rFont;
1540 }
1541 
1542 const vcl::Font&
1544 {
1545  return mxData->maFloatTitleFont;
1546 }
1547 
1548 void
1550 {
1551  CopyData();
1552  mxData->maMenuFont = rFont;
1553 }
1554 
1555 const vcl::Font&
1557 {
1558  return mxData->maMenuFont;
1559 }
1560 
1561 void
1563 {
1564  CopyData();
1565  mxData->maToolFont = rFont;
1566 }
1567 
1568 const vcl::Font&
1570 {
1571  return mxData->maToolFont;
1572 }
1573 
1574 void
1576 {
1577  CopyData();
1578  mxData->maGroupFont = rFont;
1579 }
1580 
1581 const vcl::Font&
1583 {
1584  return mxData->maGroupFont;
1585 }
1586 
1587 void
1589 {
1590  CopyData();
1591  mxData->maLabelFont = rFont;
1592 }
1593 
1594 const vcl::Font&
1596 {
1597  return mxData->maLabelFont;
1598 }
1599 
1600 void
1602 {
1603  CopyData();
1604  mxData->maRadioCheckFont = rFont;
1605 }
1606 
1607 const vcl::Font&
1609 {
1610  return mxData->maRadioCheckFont;
1611 }
1612 
1613 void
1615 {
1616  CopyData();
1617  mxData->maPushButtonFont = rFont;
1618 }
1619 
1620 const vcl::Font&
1622 {
1623  return mxData->maPushButtonFont;
1624 }
1625 
1626 void
1628 {
1629  CopyData();
1630  mxData->maFieldFont = rFont;
1631 }
1632 
1633 const vcl::Font&
1635 {
1636  return mxData->maFieldFont;
1637 }
1638 
1639 void
1641 {
1642  CopyData();
1643  mxData->maIconFont = rFont;
1644 }
1645 
1646 const vcl::Font&
1648 {
1649  return mxData->maIconFont;
1650 }
1651 
1652 void
1654 {
1655  CopyData();
1656  mxData->maTabFont = rFont;
1657 }
1658 
1659 const vcl::Font&
1661 {
1662  return mxData->maTabFont;
1663 }
1664 
1665 long
1667 {
1668  return 1;
1669 }
1670 
1671 void
1673 {
1674  CopyData();
1675  mxData->mnTitleHeight = nSize;
1676 }
1677 
1678 long
1680 {
1681  return mxData->mnTitleHeight;
1682 }
1683 
1684 void
1686 {
1687  CopyData();
1688  mxData->mnFloatTitleHeight = nSize;
1689 }
1690 
1691 long
1693 {
1694  return mxData->mnFloatTitleHeight;
1695 }
1696 
1697 void
1699 {
1700  CopyData();
1701  mxData->mnScrollBarSize = nSize;
1702 }
1703 
1704 long
1706 {
1707  return mxData->mnScrollBarSize;
1708 }
1709 
1710 void
1712 {
1713  CopyData();
1714  mxData->mnMinThumbSize = nSize;
1715 }
1716 
1717 long
1719 {
1720  return mxData->mnMinThumbSize;
1721 }
1722 
1723 void
1725 {
1726  CopyData();
1727  mxData->mnSpinSize = nSize;
1728 }
1729 
1730 long
1732 {
1733  return mxData->mnSpinSize;
1734 }
1735 
1736 long
1738 {
1739  return 3;
1740 }
1741 
1742 void
1744 {
1745  CopyData();
1746  mxData->mnCursorSize = nSize;
1747 }
1748 
1749 long
1751 {
1752  return mxData->mnCursorSize;
1753 }
1754 
1755 void
1756 StyleSettings::SetCursorBlinkTime( sal_uInt64 nBlinkTime )
1757 {
1758  CopyData();
1759  mxData->mnCursorBlinkTime = nBlinkTime;
1760 }
1761 
1762 sal_uInt64
1764 {
1765  return static_cast<long>(mxData->mnCursorBlinkTime);
1766 }
1767 
1768 void
1770 {
1771  CopyData();
1772  mxData->mnDragFullOptions = nOptions;
1773 }
1774 
1777 {
1778  return mxData->mnDragFullOptions;
1779 }
1780 
1781 void
1783 {
1784  CopyData();
1785  mxData->mnSelectionOptions = nOptions;
1786 }
1787 
1790 {
1791  return mxData->mnSelectionOptions;
1792 }
1793 
1794 void
1796 {
1797  CopyData();
1798  mxData->mnDisplayOptions = nOptions;
1799 }
1800 
1803 {
1804  return mxData->mnDisplayOptions;
1805 }
1806 
1807 void
1809 {
1810  CopyData();
1811  mxData->mnAntialiasedMin = nMinPixel;
1812 }
1813 
1814 sal_uLong
1816 {
1817  return mxData->mnAntialiasedMin;
1818 }
1819 
1820 void
1822 {
1823  CopyData();
1824  mxData->mnOptions = nOptions;
1825 }
1826 
1827 void
1828 StyleSettings::SetAutoMnemonic( bool bAutoMnemonic )
1829 {
1830  CopyData();
1831  mxData->mbAutoMnemonic = bAutoMnemonic;
1832 }
1833 
1834 bool
1836 {
1837  return mxData->mbAutoMnemonic;
1838 }
1839 
1840 bool
1842 {
1843  ImplSVData* pSVData = ImplGetSVData();
1844  return pSVData->maNWFData.mbCanDetermineWindowPosition;
1845 }
1846 
1847 void
1849 {
1850  CopyData();
1851  mxData->maFontColor = rColor;
1852 }
1853 
1854 const Color&
1856 {
1857  return mxData->maFontColor;
1858 }
1859 
1860 void
1862 {
1863  CopyData();
1864  mxData->mnToolbarIconSize = nSize;
1865 }
1866 
1869 {
1870  return mxData->mnToolbarIconSize;
1871 }
1872 
1873 const DialogStyle&
1875 {
1876  return mxData->maDialogStyle;
1877 }
1878 
1879 void
1881 {
1882  CopyData();
1883  mxData->maDialogStyle = rStyle;
1884 }
1885 
1886 const FrameStyle&
1888 {
1889  return mxData->maFrameStyle;
1890 }
1891 
1892 void
1894 {
1895  CopyData();
1896  mxData->maFrameStyle = rStyle;
1897 }
1898 
1899 void
1901 {
1902  CopyData();
1903  mxData->mnEdgeBlending = nCount;
1904 }
1905 
1906 sal_uInt16
1908 {
1909  return mxData->mnEdgeBlending;
1910 }
1911 
1912 const Color&
1914 {
1915  return mxData->maEdgeBlendingTopLeftColor;
1916 }
1917 
1918 const Color&
1920 {
1921  return mxData->maEdgeBlendingBottomRightColor;
1922 }
1923 
1924 void
1926 {
1927  CopyData();
1928  mxData->mnListBoxMaximumLineCount = nCount;
1929 }
1930 
1931 sal_uInt16
1933 {
1934  return mxData->mnListBoxMaximumLineCount;
1935 }
1936 
1937 void
1939 {
1940  CopyData();
1941  mxData->mnColorValueSetColumnCount = nCount;
1942 }
1943 
1944 sal_uInt16
1946 {
1947  return mxData->mnColorValueSetColumnCount;
1948 }
1949 
1950 sal_uInt16
1952 {
1953  return 10;
1954 }
1955 
1956 sal_uInt16
1958 {
1959  return 1;
1960 }
1961 
1962 void
1964 {
1965  CopyData();
1966  mxData->mbPreviewUsesCheckeredBackground = bNew;
1967 }
1968 
1969 bool
1971 {
1972  return mxData->mbPreviewUsesCheckeredBackground;
1973 }
1974 
1975 bool
1977 {
1978  return !(*this == rSet);
1979 }
1980 
1982 {
1983  mxData->maListBoxPreviewDefaultLogicSize = rSize;
1984 }
1985 
1987 {
1988  if(0 == mxData->maListBoxPreviewDefaultPixelSize.Width() || 0 == mxData->maListBoxPreviewDefaultPixelSize.Height())
1989  {
1990  const_cast< StyleSettings* >(this)->mxData->maListBoxPreviewDefaultPixelSize =
1991  Application::GetDefaultDevice()->LogicToPixel(mxData->maListBoxPreviewDefaultLogicSize, MapMode(MapUnit::MapAppFont));
1992  }
1993 
1994  return mxData->maListBoxPreviewDefaultPixelSize;
1995 }
1996 
1997 void StyleSettings::Set3DColors( const Color& rColor )
1998 {
1999  CopyData();
2000  mxData->maFaceColor = rColor;
2001  mxData->maLightBorderColor = rColor;
2002  mxData->maMenuBorderColor = rColor;
2003  mxData->maDarkShadowColor = COL_BLACK;
2004  if ( rColor != COL_LIGHTGRAY )
2005  {
2006  mxData->maLightColor = rColor;
2007  mxData->maShadowColor = rColor;
2008  mxData->maDarkShadowColor=rColor;
2009  mxData->maLightColor.IncreaseLuminance( 64 );
2010  mxData->maShadowColor.DecreaseLuminance( 64 );
2011  mxData->maDarkShadowColor.DecreaseLuminance( 100 );
2012  sal_uLong nRed = mxData->maLightColor.GetRed();
2013  sal_uLong nGreen = mxData->maLightColor.GetGreen();
2014  sal_uLong nBlue = mxData->maLightColor.GetBlue();
2015  nRed += static_cast<sal_uLong>(mxData->maShadowColor.GetRed());
2016  nGreen += static_cast<sal_uLong>(mxData->maShadowColor.GetGreen());
2017  nBlue += static_cast<sal_uLong>(mxData->maShadowColor.GetBlue());
2018  mxData->maCheckedColor = Color( static_cast<sal_uInt8>(nRed/2), static_cast<sal_uInt8>(nGreen/2), static_cast<sal_uInt8>(nBlue/2) );
2019  }
2020  else
2021  {
2022  mxData->maCheckedColor = Color( 0x99, 0x99, 0x99 );
2023  mxData->maLightColor = COL_WHITE;
2024  mxData->maShadowColor = COL_GRAY;
2025  }
2026 }
2027 
2029 {
2030  CopyData();
2031  // Light gray checked color special case
2032  if ( GetFaceColor() == COL_LIGHTGRAY )
2033  mxData->maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
2034  else
2035  {
2036  sal_uInt8 nRed = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetRed()) + static_cast<sal_uInt16>(mxData->maLightColor.GetRed()))/2);
2037  sal_uInt8 nGreen = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetGreen()) + static_cast<sal_uInt16>(mxData->maLightColor.GetGreen()))/2);
2038  sal_uInt8 nBlue = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetBlue()) + static_cast<sal_uInt16>(mxData->maLightColor.GetBlue()))/2);
2039  mxData->maCheckedColor = Color( nRed, nGreen, nBlue );
2040  }
2041 }
2042 
2044 {
2045  // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
2046  switch (mxData->meUseImagesInMenus) {
2047  case TRISTATE_FALSE:
2048  return false;
2049  case TRISTATE_TRUE:
2050  return true;
2051  default: // TRISTATE_INDET:
2053  }
2054 }
2055 
2056 static BitmapEx readBitmapEx( const OUString& rPath )
2057 {
2058  OUString aPath( rPath );
2059  rtl::Bootstrap::expandMacros( aPath );
2060 
2061  // import the image
2062  Graphic aGraphic;
2063  if ( GraphicFilter::LoadGraphic( aPath, OUString(), aGraphic ) != ERRCODE_NONE )
2064  return BitmapEx();
2065  return aGraphic.GetBitmapEx();
2066 }
2067 
2069 
2071 static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, boost::optional<Color>& rMenuBarTextColor )
2072 {
2073  uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
2074  if ( !xContext.is() )
2075  return;
2076 
2077  // don't burn time loading images we don't need.
2079  return;
2080 
2081  // read from the configuration
2082  OUString aPersona( officecfg::Office::Common::Misc::Persona::get( xContext ) );
2083  OUString aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get( xContext ) );
2084 
2085  // have the settings changed? marks if header /footer prepared before
2086  //should maybe extended to a flag that marks if header /footer /both are loaded
2087  OUString aOldValue= eWhich==PERSONA_HEADER?OUString(aPersona + ";" + aPersonaSettings+";h" ):OUString(aPersona + ";" + aPersonaSettings+";f" );
2088  if ( rHeaderFooter == aOldValue )
2089  return;
2090 
2091  rHeaderFooter = aOldValue;
2092  rHeaderFooterBitmap = BitmapEx();
2093  rMenuBarTextColor.reset();
2094 
2095  // now read the new values and setup bitmaps
2096  OUString aHeader, aFooter;
2097  if ( aPersona == "own" || aPersona == "default" )
2098  {
2099  sal_Int32 nIndex = 0;
2100 
2101  // Skip the persona slug, name, and preview
2102  aHeader = aPersonaSettings.getToken( 3, ';', nIndex );
2103 
2104  if ( nIndex > 0 )
2105  aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
2106 
2107  // change menu text color, advance nIndex to skip the '#'
2108  if ( nIndex > 0 )
2109  {
2110  OUString aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
2111  rMenuBarTextColor = Color( aColor.toUInt32( 16 ) );
2112  }
2113  }
2114 
2115  OUString aName;
2116  switch ( eWhich ) {
2117  case PERSONA_HEADER: aName = aHeader; break;
2118  case PERSONA_FOOTER: aName = aFooter; break;
2119  }
2120 
2121  if ( !aName.isEmpty() )
2122  {
2123  OUString gallery("");
2124  // try the gallery first, then the program path:
2125  if ( aPersona == "own" && !aPersonaSettings.startsWith( "vnd.sun.star.expand" ) )
2126  {
2127  gallery = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
2128  rtl::Bootstrap::expandMacros( gallery );
2129  gallery += "/user/gallery/personas/";
2130  }
2131  else if ( aPersona == "default" )
2132  {
2133  gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER;
2134  gallery += "/gallery/personas/";
2135  }
2136  rHeaderFooterBitmap = readBitmapEx( gallery + aName );
2137 
2138  if ( rHeaderFooterBitmap.IsEmpty() )
2139  rHeaderFooterBitmap = readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" + aName );
2140  }
2141 
2142  // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
2143 
2144  if( rHeaderFooterBitmap.IsEmpty() )
2145  {
2146  std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
2147  officecfg::Office::Common::Misc::Persona::set( "no", batch );
2148  officecfg::Office::Common::Misc::PersonaSettings::set( "", batch );
2149  batch->commit();
2150  }
2151 }
2152 
2154 {
2155  setupPersonaHeaderFooter( PERSONA_HEADER, mxData->maPersonaHeaderFooter, mxData->maPersonaHeaderBitmap, mxData->maPersonaMenuBarTextColor );
2156  return mxData->maPersonaHeaderBitmap;
2157 }
2158 
2160 {
2161  setupPersonaHeaderFooter( PERSONA_FOOTER, mxData->maPersonaHeaderFooter, mxData->maPersonaFooterBitmap, mxData->maPersonaMenuBarTextColor );
2162  return mxData->maPersonaFooterBitmap;
2163 }
2164 
2166 {
2167  GetPersonaHeader();
2168  return mxData->maPersonaMenuBarTextColor;
2169 }
2170 
2172 {
2173  CopyData();
2174  mxData->SetStandardStyles();
2175 }
2176 
2178 {
2179  // compute a brighter face color that can be used in gradients
2180  // for a convex look (eg toolbars)
2181 
2182  sal_uInt16 h, s, b;
2183  GetFaceColor().RGBtoHSB( h, s, b );
2184  if( s > 1) s=1;
2185  if( b < 98) b=98;
2186  return Color::HSBtoRGB( h, s, b );
2187 }
2188 
2190 {
2191  // compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
2192  sal_uInt16 h, s, b;
2193  GetShadowColor().RGBtoHSB( h, s, b );
2194  b += b/4;
2195  s -= s/4;
2196  return Color::HSBtoRGB( h, s, b );
2197 }
2198 
2200 {
2201  // copy if other references exist
2202  if (mxData.use_count() > 1)
2203  {
2204  mxData = std::make_shared<ImplStyleData>(*mxData);
2205  }
2206 }
2207 
2209 {
2210  if ( mxData == rSet.mxData )
2211  return true;
2212 
2213  if (mxData->mIconTheme != rSet.mxData->mIconTheme) {
2214  return false;
2215  }
2216 
2217  if (*mxData->mIconThemeSelector != *rSet.mxData->mIconThemeSelector) {
2218  return false;
2219  }
2220 
2221  return (mxData->mnOptions == rSet.mxData->mnOptions) &&
2222  (mxData->mbAutoMnemonic == rSet.mxData->mbAutoMnemonic) &&
2223  (mxData->mnDragFullOptions == rSet.mxData->mnDragFullOptions) &&
2224  (mxData->mnSelectionOptions == rSet.mxData->mnSelectionOptions) &&
2225  (mxData->mnDisplayOptions == rSet.mxData->mnDisplayOptions) &&
2226  (mxData->mnCursorSize == rSet.mxData->mnCursorSize) &&
2227  (mxData->mnCursorBlinkTime == rSet.mxData->mnCursorBlinkTime) &&
2228  (mxData->mnTitleHeight == rSet.mxData->mnTitleHeight) &&
2229  (mxData->mnFloatTitleHeight == rSet.mxData->mnFloatTitleHeight) &&
2230  (mxData->mnScrollBarSize == rSet.mxData->mnScrollBarSize) &&
2231  (mxData->mnMinThumbSize == rSet.mxData->mnMinThumbSize) &&
2232  (mxData->mnSpinSize == rSet.mxData->mnSpinSize) &&
2233  (mxData->mnAntialiasedMin == rSet.mxData->mnAntialiasedMin) &&
2234  (mxData->mbHighContrast == rSet.mxData->mbHighContrast) &&
2235  (mxData->mbUseSystemUIFonts == rSet.mxData->mbUseSystemUIFonts) &&
2236  (mxData->mbUseFontAAFromSystem == rSet.mxData->mbUseFontAAFromSystem) &&
2237  (mxData->mnUseFlatBorders == rSet.mxData->mnUseFlatBorders) &&
2238  (mxData->mnUseFlatMenus == rSet.mxData->mnUseFlatMenus) &&
2239  (mxData->maFaceColor == rSet.mxData->maFaceColor) &&
2240  (mxData->maCheckedColor == rSet.mxData->maCheckedColor) &&
2241  (mxData->maLightColor == rSet.mxData->maLightColor) &&
2242  (mxData->maLightBorderColor == rSet.mxData->maLightBorderColor) &&
2243  (mxData->maShadowColor == rSet.mxData->maShadowColor) &&
2244  (mxData->maDarkShadowColor == rSet.mxData->maDarkShadowColor) &&
2245  (mxData->maButtonTextColor == rSet.mxData->maButtonTextColor) &&
2246  (mxData->maRadioCheckTextColor == rSet.mxData->maRadioCheckTextColor) &&
2247  (mxData->maGroupTextColor == rSet.mxData->maGroupTextColor) &&
2248  (mxData->maLabelTextColor == rSet.mxData->maLabelTextColor) &&
2249  (mxData->maWindowColor == rSet.mxData->maWindowColor) &&
2250  (mxData->maWindowTextColor == rSet.mxData->maWindowTextColor) &&
2251  (mxData->maDialogColor == rSet.mxData->maDialogColor) &&
2252  (mxData->maDialogTextColor == rSet.mxData->maDialogTextColor) &&
2253  (mxData->maWorkspaceColor == rSet.mxData->maWorkspaceColor) &&
2254  (mxData->maMonoColor == rSet.mxData->maMonoColor) &&
2255  (mxData->maFieldColor == rSet.mxData->maFieldColor) &&
2256  (mxData->maFieldTextColor == rSet.mxData->maFieldTextColor) &&
2257  (mxData->maActiveColor == rSet.mxData->maActiveColor) &&
2258  (mxData->maActiveTextColor == rSet.mxData->maActiveTextColor) &&
2259  (mxData->maActiveBorderColor == rSet.mxData->maActiveBorderColor) &&
2260  (mxData->maDeactiveColor == rSet.mxData->maDeactiveColor) &&
2261  (mxData->maDeactiveTextColor == rSet.mxData->maDeactiveTextColor) &&
2262  (mxData->maDeactiveBorderColor == rSet.mxData->maDeactiveBorderColor) &&
2263  (mxData->maMenuColor == rSet.mxData->maMenuColor) &&
2264  (mxData->maMenuBarColor == rSet.mxData->maMenuBarColor) &&
2265  (mxData->maMenuBarRolloverColor == rSet.mxData->maMenuBarRolloverColor) &&
2266  (mxData->maMenuBorderColor == rSet.mxData->maMenuBorderColor) &&
2267  (mxData->maMenuTextColor == rSet.mxData->maMenuTextColor) &&
2268  (mxData->maMenuBarTextColor == rSet.mxData->maMenuBarTextColor) &&
2269  (mxData->maMenuBarRolloverTextColor == rSet.mxData->maMenuBarRolloverTextColor) &&
2270  (mxData->maMenuHighlightColor == rSet.mxData->maMenuHighlightColor) &&
2271  (mxData->maMenuHighlightTextColor == rSet.mxData->maMenuHighlightTextColor) &&
2272  (mxData->maHighlightColor == rSet.mxData->maHighlightColor) &&
2273  (mxData->maHighlightTextColor == rSet.mxData->maHighlightTextColor) &&
2274  (mxData->maTabTextColor == rSet.mxData->maTabTextColor) &&
2275  (mxData->maTabRolloverTextColor == rSet.mxData->maTabRolloverTextColor) &&
2276  (mxData->maTabHighlightTextColor == rSet.mxData->maTabHighlightTextColor) &&
2277  (mxData->maActiveTabColor == rSet.mxData->maActiveTabColor) &&
2278  (mxData->maInactiveTabColor == rSet.mxData->maInactiveTabColor) &&
2279  (mxData->maDisableColor == rSet.mxData->maDisableColor) &&
2280  (mxData->maHelpColor == rSet.mxData->maHelpColor) &&
2281  (mxData->maHelpTextColor == rSet.mxData->maHelpTextColor) &&
2282  (mxData->maLinkColor == rSet.mxData->maLinkColor) &&
2283  (mxData->maVisitedLinkColor == rSet.mxData->maVisitedLinkColor) &&
2284  (mxData->maToolTextColor == rSet.mxData->maToolTextColor) &&
2285  (mxData->maHighlightLinkColor == rSet.mxData->maHighlightLinkColor) &&
2286  (mxData->maAppFont == rSet.mxData->maAppFont) &&
2287  (mxData->maHelpFont == rSet.mxData->maHelpFont) &&
2288  (mxData->maTitleFont == rSet.mxData->maTitleFont) &&
2289  (mxData->maFloatTitleFont == rSet.mxData->maFloatTitleFont) &&
2290  (mxData->maMenuFont == rSet.mxData->maMenuFont) &&
2291  (mxData->maToolFont == rSet.mxData->maToolFont) &&
2292  (mxData->maGroupFont == rSet.mxData->maGroupFont) &&
2293  (mxData->maLabelFont == rSet.mxData->maLabelFont) &&
2294  (mxData->maRadioCheckFont == rSet.mxData->maRadioCheckFont) &&
2295  (mxData->maPushButtonFont == rSet.mxData->maPushButtonFont) &&
2296  (mxData->maFieldFont == rSet.mxData->maFieldFont) &&
2297  (mxData->maIconFont == rSet.mxData->maIconFont) &&
2298  (mxData->maTabFont == rSet.mxData->maTabFont) &&
2299  (mxData->meUseImagesInMenus == rSet.mxData->meUseImagesInMenus) &&
2300  (mxData->mbPreferredUseImagesInMenus == rSet.mxData->mbPreferredUseImagesInMenus) &&
2301  (mxData->mbSkipDisabledInMenus == rSet.mxData->mbSkipDisabledInMenus) &&
2302  (mxData->mbHideDisabledMenuItems == rSet.mxData->mbHideDisabledMenuItems) &&
2303  (mxData->mbPreferredContextMenuShortcuts == rSet.mxData->mbPreferredContextMenuShortcuts)&&
2304  (mxData->meContextMenuShortcuts == rSet.mxData->meContextMenuShortcuts) &&
2305  (mxData->mbPrimaryButtonWarpsSlider == rSet.mxData->mbPrimaryButtonWarpsSlider) &&
2306  (mxData->maFontColor == rSet.mxData->maFontColor) &&
2307  (mxData->mnEdgeBlending == rSet.mxData->mnEdgeBlending) &&
2308  (mxData->maEdgeBlendingTopLeftColor == rSet.mxData->maEdgeBlendingTopLeftColor) &&
2309  (mxData->maEdgeBlendingBottomRightColor == rSet.mxData->maEdgeBlendingBottomRightColor) &&
2310  (mxData->mnListBoxMaximumLineCount == rSet.mxData->mnListBoxMaximumLineCount) &&
2311  (mxData->mnColorValueSetColumnCount == rSet.mxData->mnColorValueSetColumnCount) &&
2312  (mxData->maListBoxPreviewDefaultLogicSize == rSet.mxData->maListBoxPreviewDefaultLogicSize) &&
2313  (mxData->maListBoxPreviewDefaultPixelSize == rSet.mxData->maListBoxPreviewDefaultPixelSize) &&
2314  (mxData->mbPreviewUsesCheckeredBackground == rSet.mxData->mbPreviewUsesCheckeredBackground);
2315 }
2316 
2318  mnEnableATT(TRISTATE_INDET),
2319  mnDisablePrinting(TRISTATE_INDET)
2320 {
2321  static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
2322  mbEnableLocalizedDecimalSep = (pEnv != nullptr);
2323 }
2324 
2326  : mxData(std::make_shared<ImplMiscData>())
2327 {
2328 }
2329 
2330 bool MiscSettings::operator ==( const MiscSettings& rSet ) const
2331 {
2332  if ( mxData == rSet.mxData )
2333  return true;
2334 
2335  return (mxData->mnEnableATT == rSet.mxData->mnEnableATT ) &&
2336  (mxData->mnDisablePrinting == rSet.mxData->mnDisablePrinting ) &&
2337  (mxData->mbEnableLocalizedDecimalSep == rSet.mxData->mbEnableLocalizedDecimalSep );
2338 }
2339 
2340 bool
2342 {
2343  return !(*this == rSet);
2344 }
2345 
2347 {
2348  if( mxData->mnDisablePrinting == TRISTATE_INDET )
2349  {
2350  OUString aEnable =
2352  getValue( "DesktopManagement",
2353  "DisablePrinting" );
2354  mxData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2355  }
2356 
2357  return mxData->mnDisablePrinting != TRISTATE_FALSE;
2358 }
2359 
2361 {
2362 
2363 #ifdef _WIN32
2364  if( mxData->mnEnableATT == TRISTATE_INDET )
2365  {
2366  // Check in the Windows registry if an AT tool wants Accessibility support to
2367  // be activated ..
2368  HKEY hkey;
2369 
2370  if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2371  L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2372  &hkey) )
2373  {
2374  DWORD dwType;
2375  wchar_t Data[6]; // possible values: "true", "false", "1", "0", DWORD
2376  DWORD cbData = sizeof(Data);
2377 
2378  if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2379  nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2380  {
2381  switch (dwType)
2382  {
2383  case REG_SZ:
2384  mxData->mnEnableATT = ((0 == wcsicmp(Data, L"1")) || (0 == wcsicmp(Data, L"true"))) ? TRISTATE_TRUE : TRISTATE_FALSE;
2385  break;
2386  case REG_DWORD:
2387  switch (reinterpret_cast<DWORD *>(Data)[0]) {
2388  case 0:
2389  mxData->mnEnableATT = TRISTATE_FALSE;
2390  break;
2391  case 1:
2392  mxData->mnEnableATT = TRISTATE_TRUE;
2393  break;
2394  default:
2395  mxData->mnEnableATT = TRISTATE_INDET;
2396  //TODO: or TRISTATE_TRUE?
2397  break;
2398  }
2399  break;
2400  default:
2401  // Unsupported registry type
2402  break;
2403  }
2404  }
2405 
2406  RegCloseKey(hkey);
2407  }
2408  }
2409 #endif
2410 
2411  if( mxData->mnEnableATT == TRISTATE_INDET )
2412  {
2413  static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
2414  if( !pEnv || !*pEnv )
2415  {
2416  OUString aEnable =
2418  getValue( "Accessibility",
2419  "EnableATToolSupport" );
2420  mxData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2421  }
2422  else
2423  {
2424  mxData->mnEnableATT = TRISTATE_TRUE;
2425  }
2426  }
2427 
2428  return mxData->mnEnableATT != TRISTATE_FALSE;
2429 }
2430 
2431 #ifdef _WIN32
2432 void MiscSettings::SetEnableATToolSupport( bool bEnable )
2433 {
2434  if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mxData->mnEnableATT )
2435  {
2436  if( bEnable && !ImplInitAccessBridge() )
2437  return;
2438 
2439  HKEY hkey;
2440 
2441  // If the accessibility key in the Windows registry exists, change it synchronously
2442  if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2443  L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2444  &hkey) )
2445  {
2446  DWORD dwType;
2447  wchar_t Data[6]; // possible values: "true", "false", 1, 0
2448  DWORD cbData = sizeof(Data);
2449 
2450  if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2451  nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2452  {
2453  switch (dwType)
2454  {
2455  case REG_SZ:
2456  RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2457  0, dwType,
2458  reinterpret_cast<const BYTE*>(bEnable ? L"true" : L"false"),
2459  bEnable ? sizeof(L"true") : sizeof(L"false"));
2460  break;
2461  case REG_DWORD:
2462  reinterpret_cast<DWORD *>(Data)[0] = bEnable ? 1 : 0;
2463  RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2464  0, dwType, reinterpret_cast<const BYTE*>(Data), sizeof(DWORD));
2465  break;
2466  default:
2467  // Unsupported registry type
2468  break;
2469  }
2470  }
2471 
2472  RegCloseKey(hkey);
2473  }
2474 
2476  setValue( "Accessibility",
2477  "EnableATToolSupport",
2478  bEnable ? OUString("true") : OUString("false" ) );
2479  mxData->mnEnableATT = bEnable ? TRISTATE_TRUE : TRISTATE_FALSE;
2480  }
2481 }
2482 #endif
2483 
2485 {
2486  // copy if other references exist
2487  if (mxData.use_count() > 1)
2488  {
2489  mxData = std::make_shared<ImplMiscData>(*mxData);
2490  }
2491  mxData->mbEnableLocalizedDecimalSep = bEnable;
2492 }
2493 
2495 {
2496  return mxData->mbEnableLocalizedDecimalSep;
2497 }
2498 
2500  : mxData(std::make_shared<ImplHelpData>())
2501 {
2502 }
2503 
2504 bool HelpSettings::operator ==( const HelpSettings& rSet ) const
2505 {
2506  if ( mxData == rSet.mxData )
2507  return true;
2508 
2509  return (mxData->mnTipTimeout == rSet.mxData->mnTipTimeout );
2510 }
2511 
2512 sal_uLong
2514 {
2515  return 500;
2516 }
2517 
2518 void
2520 {
2521  // copy if other references exist
2522  if (mxData.use_count() > 1)
2523  {
2524  mxData = std::make_shared<ImplHelpData>(*mxData);
2525  }
2526  mxData->mnTipTimeout = nTipTimeout;
2527 }
2528 
2529 sal_uLong
2531 {
2532  return mxData->mnTipTimeout;
2533 }
2534 
2535 sal_uLong
2537 {
2538  return 1500;
2539 }
2540 
2541 bool
2543 {
2544  return !(*this == rSet);
2545 }
2546 
2548  :
2549  maLocale( LANGUAGE_SYSTEM ),
2550  maUILocale( LANGUAGE_SYSTEM )
2551 {
2554 }
2555 
2557  maMouseSettings( rData.maMouseSettings ),
2558  maStyleSettings( rData.maStyleSettings ),
2559  maMiscSettings( rData.maMiscSettings ),
2560  maHelpSettings( rData.maHelpSettings ),
2561  maLocale( rData.maLocale ),
2562  maUILocale( rData.maUILocale )
2563 {
2564  // Create the cache objects new when their getter is called.
2565 }
2566 
2568 {
2569  mpLocaleDataWrapper.reset();
2570  mpUILocaleDataWrapper.reset();
2571  mpI18nHelper.reset();
2572  mpUII18nHelper.reset();
2573 }
2574 
2576  : mxData(std::make_shared<ImplAllSettingsData>())
2577 {
2578 }
2579 
2581 {
2582  // copy if other references exist
2583  if (mxData.use_count() > 1)
2584  {
2585  mxData = std::make_shared<ImplAllSettingsData>(*mxData);
2586  }
2587 
2588 }
2589 
2591 {
2592 
2594 
2595  if ( nFlags & AllSettingsFlags::MOUSE )
2596  {
2597  if ( mxData->maMouseSettings != rSet.mxData->maMouseSettings )
2598  {
2599  CopyData();
2600  mxData->maMouseSettings = rSet.mxData->maMouseSettings;
2601  nChangeFlags |= AllSettingsFlags::MOUSE;
2602  }
2603  }
2604 
2605  if ( nFlags & AllSettingsFlags::STYLE )
2606  {
2607  if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2608  {
2609  CopyData();
2610  mxData->maStyleSettings = rSet.mxData->maStyleSettings;
2611  nChangeFlags |= AllSettingsFlags::STYLE;
2612  }
2613  }
2614 
2615  if ( nFlags & AllSettingsFlags::MISC )
2616  {
2617  if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2618  {
2619  CopyData();
2620  mxData->maMiscSettings = rSet.mxData->maMiscSettings;
2621  nChangeFlags |= AllSettingsFlags::MISC;
2622  }
2623  }
2624 
2625  if ( nFlags & AllSettingsFlags::LOCALE )
2626  {
2627  if ( mxData->maLocale != rSet.mxData->maLocale )
2628  {
2629  SetLanguageTag( rSet.mxData->maLocale );
2630  nChangeFlags |= AllSettingsFlags::LOCALE;
2631  }
2632  }
2633 
2634  return nChangeFlags;
2635 }
2636 
2638 {
2639 
2641 
2642  if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2643  nChangeFlags |= AllSettingsFlags::STYLE;
2644 
2645  if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2646  nChangeFlags |= AllSettingsFlags::MISC;
2647 
2648  if ( mxData->maLocale != rSet.mxData->maLocale )
2649  nChangeFlags |= AllSettingsFlags::LOCALE;
2650 
2651  return nChangeFlags;
2652 }
2653 
2654 bool AllSettings::operator ==( const AllSettings& rSet ) const
2655 {
2656  if ( mxData == rSet.mxData )
2657  return true;
2658 
2659  if ( (mxData->maMouseSettings == rSet.mxData->maMouseSettings) &&
2660  (mxData->maStyleSettings == rSet.mxData->maStyleSettings) &&
2661  (mxData->maMiscSettings == rSet.mxData->maMiscSettings) &&
2662  (mxData->maHelpSettings == rSet.mxData->maHelpSettings) &&
2663  (mxData->maLocale == rSet.mxData->maLocale) )
2664  {
2665  return true;
2666  }
2667 
2668  return false;
2669 }
2670 
2671 void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag )
2672 {
2673  if (mxData->maLocale != rLanguageTag)
2674  {
2675  CopyData();
2676 
2677  mxData->maLocale = rLanguageTag;
2678 
2679  if ( mxData->mpLocaleDataWrapper )
2680  {
2681  mxData->mpLocaleDataWrapper.reset();
2682  }
2683  if ( mxData->mpI18nHelper )
2684  {
2685  mxData->mpI18nHelper.reset();
2686  }
2687  }
2688 }
2689 
2690 namespace
2691 {
2692  bool GetConfigLayoutRTL(bool bMath)
2693  {
2694  static const char* pEnv = getenv("SAL_RTL_ENABLED" );
2695  static int nUIMirroring = -1; // -1: undef, 0: auto, 1: on 2: off
2696 
2697  // environment always overrides
2698  if( pEnv )
2699  return true;
2700 
2701  bool bRTL = false;
2702 
2703  if( nUIMirroring == -1 )
2704  {
2705  nUIMirroring = 0; // ask configuration only once
2708  "org.openoffice.Office.Common/I18N/CTL" ); // note: case sensitive !
2709  if ( aNode.isValid() )
2710  {
2711  bool bTmp = bool();
2712  css::uno::Any aValue = aNode.getNodeValue( "UIMirroring" );
2713  if( aValue >>= bTmp )
2714  {
2715  // found true or false; if it was nil, nothing is changed
2716  nUIMirroring = bTmp ? 1 : 2;
2717  }
2718  }
2719  }
2720 
2721  if( nUIMirroring == 0 ) // no config found (eg, setup) or default (nil) was set: check language
2722  {
2724  if (bMath)
2725  bRTL = MsLangId::isRightToLeftMath( aLang );
2726  else
2727  bRTL = MsLangId::isRightToLeft( aLang );
2728  }
2729  else
2730  bRTL = (nUIMirroring == 1);
2731 
2732  return bRTL;
2733  }
2734 }
2735 
2737 {
2739  return false;
2740  return GetConfigLayoutRTL(false);
2741 }
2742 
2744 {
2746  return false;
2747  return GetConfigLayoutRTL(true);
2748 }
2749 
2751 {
2753  {
2754  static LanguageTag aRet("en-US");
2755  return aRet;
2756  }
2757 
2760 
2761  // SYSTEM locale means: use settings from SvtSysLocale that is resolved
2762  if ( mxData->maLocale.isSystemLocale() )
2763  mxData->maLocale = mxData->maSysLocale.GetLanguageTag();
2764 
2765  return mxData->maLocale;
2766 }
2767 
2769 {
2771  {
2772  static LanguageTag aRet("en-US");
2773  return aRet;
2774  }
2775 
2778 
2779  // the UILocale is never changed
2780  if ( mxData->maUILocale.isSystemLocale() )
2781  mxData->maUILocale = mxData->maSysLocale.GetUILanguageTag();
2782 
2783  return mxData->maUILocale;
2784 }
2785 
2787 {
2788  if ( !mxData->mpLocaleDataWrapper )
2789  const_cast<AllSettings*>(this)->mxData->mpLocaleDataWrapper.reset( new LocaleDataWrapper(
2791  return *mxData->mpLocaleDataWrapper;
2792 }
2793 
2795 {
2796  if ( !mxData->mpUILocaleDataWrapper )
2797  const_cast<AllSettings*>(this)->mxData->mpUILocaleDataWrapper.reset( new LocaleDataWrapper(
2799  return *mxData->mpUILocaleDataWrapper;
2800 }
2801 
2803 {
2804  if ( !mxData->mpI18nHelper ) {
2805  const_cast<AllSettings*>(this)->mxData->mpI18nHelper.reset( new vcl::I18nHelper(
2807  }
2808  return *mxData->mpI18nHelper;
2809 }
2810 
2812 {
2813  if ( !mxData->mpUII18nHelper ) {
2814  const_cast<AllSettings*>(this)->mxData->mpUII18nHelper.reset( new vcl::I18nHelper(
2816  }
2817  return *mxData->mpUII18nHelper;
2818 }
2819 
2821 {
2822  AllSettings aAllSettings( Application::GetSettings() );
2823  if ( nHint & ConfigurationHints::DecSep )
2824  {
2825  MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
2826  bool bIsDecSepAsLocale = aAllSettings.mxData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale();
2827  if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale )
2828  {
2829  aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale );
2830  aAllSettings.SetMiscSettings( aMiscSettings );
2831  }
2832  }
2833 
2834  if ( nHint & ConfigurationHints::Locale )
2835  aAllSettings.SetLanguageTag( aAllSettings.mxData->maSysLocale.GetOptions().GetLanguageTag() );
2836 
2837  Application::SetSettings( aAllSettings );
2838 }
2839 
2840 const StyleSettings&
2842 {
2843  return mxData->maStyleSettings;
2844 }
2845 
2848 {
2849  return mxData->mnOptions;
2850 }
2851 
2852 std::vector<vcl::IconThemeInfo> const &
2854 {
2855  if (!mxData->mIconThemeScanner) {
2857  }
2858  return mxData->mIconThemeScanner->GetFoundIconThemes();
2859 }
2860 
2861 /*static*/ OUString
2863 {
2864  OUString desktopEnvironment = Application::GetDesktopEnvironment();
2865  if (!mxData->mIconThemeScanner) {
2867  }
2868  OUString themeName = mxData->mIconThemeSelector->SelectIconThemeForDesktopEnvironment(
2869  mxData->mIconThemeScanner->GetFoundIconThemes(),
2870  desktopEnvironment
2871  );
2872  return themeName;
2873 }
2874 
2875 void
2876 StyleSettings::SetIconTheme(const OUString& theme)
2877 {
2878  CopyData();
2879  mxData->mIconTheme = theme;
2880 }
2881 
2882 OUString
2884 {
2885  OUString sTheme(mxData->mIconTheme);
2886  if (sTheme.isEmpty())
2887  {
2889  sTheme = "colibre";
2890  else
2891  {
2892  // read from the configuration, or fallback to what the desktop wants
2893  uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
2894  if (xContext.is())
2895  {
2896  sTheme = officecfg::Office::Common::Misc::SymbolStyle::get(xContext);
2897 
2898  if (sTheme.isEmpty() || sTheme == "auto")
2900  }
2901  }
2902  }
2903 
2904  if (!mxData->mIconThemeScanner) {
2906  }
2907  OUString r = mxData->mIconThemeSelector->SelectIconTheme(
2908  mxData->mIconThemeScanner->GetFoundIconThemes(),
2909  sTheme);
2910  return r;
2911 }
2912 
2913 void
2915 {
2916  if (mxData->mbHighContrast == bHighContrast) {
2917  return;
2918  }
2919 
2920  CopyData();
2921  mxData->mbHighContrast = bHighContrast;
2922  mxData->mIconThemeSelector->SetUseHighContrastTheme(bHighContrast);
2923 }
2924 
2925 bool
2927 {
2928  return mxData->mbHighContrast;
2929 }
2930 
2931 void
2932 StyleSettings::SetPreferredIconTheme(const OUString& theme, bool bDarkIconTheme)
2933 {
2934  mxData->mIconThemeSelector->SetPreferredIconTheme(theme, bDarkIconTheme);
2935 }
2936 
2937 void
2939 {
2940  CopyData();
2941  mxData->maMouseSettings = rSet;
2942 }
2943 
2944 const MouseSettings&
2946 {
2947  return mxData->maMouseSettings;
2948 }
2949 
2950 void
2952 {
2953  CopyData();
2954  mxData->maStyleSettings = rSet;
2955 }
2956 
2957 void
2959 {
2960  CopyData();
2961  mxData->maMiscSettings = rSet;
2962 }
2963 
2964 const MiscSettings&
2966 {
2967  return mxData->maMiscSettings;
2968 }
2969 
2970 void
2972 {
2973  CopyData();
2974  mxData->maHelpSettings = rSet;
2975 }
2976 
2977 const HelpSettings&
2979 {
2980  return mxData->maHelpSettings;
2981 }
2982 
2983 bool
2985 {
2986  return !(*this == rSet);
2987 }
2988 
2989 SvtSysLocale&
2991 {
2992  return mxData->maSysLocale;
2993 }
2994 
2995 
2997  bool bCheckedColorSpecialCase )
2998 {
2999  Set3DColors( aBackColor );
3000  SetFaceColor( aBackColor );
3001  SetDialogColor( aBackColor );
3002  SetWorkspaceColor( aBackColor );
3003 
3004  if (bCheckedColorSpecialCase)
3006 }
3007 
3009  const vcl::Font& aLabelFont )
3010 {
3011  SetAppFont( aAppFont );
3012  SetPushButtonFont( aAppFont );
3013  SetToolFont( aAppFont );
3014  SetHelpFont( aAppFont );
3015 
3016  SetMenuFont( aLabelFont );
3017  SetTabFont( aLabelFont );
3018  SetLabelFont( aLabelFont );
3019  SetRadioCheckFont( aLabelFont );
3020  SetFieldFont( aLabelFont );
3021  SetGroupFont( aLabelFont );
3022  SetIconFont( aLabelFont );
3023 }
3024 
3025 /* 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)
bool mbPreferredUseImagesInMenus
MouseWheelBehaviour mnWheelBehavior
const Color & GetActiveColor() const
void SetTabRolloverTextColor(const Color &rColor)
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:92
const LocaleDataWrapper & GetLocaleDataWrapper() const
bool GetContextMenuShortcuts() const
Color maHighlightTextColor
bool GetAutoMnemonic() const
const Color & GetDeactiveColor() const
const Color & GetDialogColor() const
constexpr::Color COL_BLACK(0x00, 0x00, 0x00)
void SetCheckedColorSpecialCase()
bool mbPreferredContextMenuShortcuts
static long GetBorderSize()
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 SetDragFullOptions(DragFullOptions nOptions)
long GetTitleHeight() const
void SetFieldFont(const vcl::Font &rFont)
void SetMenuBorderColor(const Color &rColor)
Color maDisableColor
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)
TriState mnEnableATT
void SetMonoColor(const Color &rColor)
LanguageType getLanguageType(bool bResolveSystem=true) const
StyleSettingsOptions
Definition: settings.hxx:175
void SetLightColor(const Color &rColor)
void SetMenuBarRolloverTextColor(const Color &rColor)
SelectionOptions GetSelectionOptions() const
bool operator==(const MouseSettings &rSet) const
const Color & GetInactiveTabColor() const
Color maWindowTextColor
SelectionOptions
Definition: settings.hxx:201
long GetDoubleClickWidth() const
void SetIconFont(const vcl::Font &rFont)
sal_uInt16 mnListBoxMaximumLineCount
sal_uIntPtr sal_uLong
void SetMiscSettings(const MiscSettings &rSet)
void SetRadioCheckFont(const vcl::Font &rFont)
void SetFieldRolloverTextColor(const Color &rColor)
bool GetPreferredUseImagesInMenus() const
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
Gets the application's settings.
Definition: svapp.cxx:705
Color maWorkspaceColor
void SetDoubleClickHeight(long nDoubleClkHeight)
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:357
bool mbHideDisabledMenuItems
const Color & GetGroupTextColor() const
StyleSettingsOptions mnOptions
css::beans::Optional< css::uno::Any > getValue(OUString const &id)
void SetUseFlatBorders(bool bUseFlatBorders)
void SetWindowColor(const Color &rColor)
const Color & GetWorkspaceColor() const
void SetWeight(FontWeight)
Definition: font/font.cxx:214
Color GetSeparatorColor() const
void SetStartDragWidth(long nDragWidth)
const Color & GetActiveBorderColor() const
Color maTabHighlightTextColor
constexpr::Color COL_GRAY(0x80, 0x80, 0x80)
const Color & GetFieldRolloverTextColor() const
bool GetPreviewUsesCheckeredBackground() const
boost::optional< Color > maPersonaMenuBarTextColor
Cache the menubar color.
bool operator!=(const StyleSettings &rSet) const
void SetHighContrastMode(bool bHighContrast)
const Color & GetLabelTextColor() const
void SetCharSet(rtl_TextEncoding)
Definition: font/font.cxx:128
void SetDoubleClickTime(sal_uInt64 nDoubleClkTime)
void SetMinThumbSize(long nSize)
std::shared_ptr< vcl::IconThemeSelector > mIconThemeSelector
constexpr::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
void SetMenuHighlightColor(const Color &rColor)
const FrameStyle & GetFrameStyle() const
const Color & GetDeactiveTextColor() const
static BitmapEx readBitmapEx(const OUString &rPath)
DragFullOptions mnDragFullOptions
static std::shared_ptr< IconThemeScanner > Create(const OUString &path)
Factory method to create the object.
ToolbarIconSize mnToolbarIconSize
const Color & GetMenuHighlightColor() const
void SetPrimaryButtonWarpsSlider(bool bPrimaryButtonWarpsSlider)
const Color & GetHelpTextColor() const
Color maDarkShadowColor
void SetButtonTextColor(const Color &rColor)
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:1555
const Color & GetHighlightColor() const
MouseFollowFlags GetFollow() const
bool GetPreferredContextMenuShortcuts() const
void SetLinkColor(const Color &rColor)
const Color & GetActiveTabColor() const
const Color & GetMenuHighlightTextColor() const
void SetDeactiveBorderColor(const Color &rColor)
void SetDeactiveColor(const Color &rColor)
AllSettingsFlags
Definition: settings.hxx:656
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
Definition: svapp.cxx:1055
WEIGHT_BOLD
std::unique_ptr< LocaleDataWrapper > mpUILocaleDataWrapper
const Color & GetRadioCheckTextColor() const
sal_uInt16 GetEdgeBlending() const
sal_uInt16 GetColorValueSetColumnCount() const
Color maLightBorderColor
void SetFrameStyle(const FrameStyle &rStyle)
void SetEnableLocalizedDecimalSep(bool bEnable)
long GetMinThumbSize() const
Color maActiveBorderColor
const vcl::Font & GetLabelFont() const
MouseFollowFlags mnFollow
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
const boost::optional< Color > & GetPersonaMenuBarTextColor() 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)
long GetFloatTitleHeight() const
SvtSysLocale maSysLocale
vcl::Font maFloatTitleFont
static std::shared_ptr< ConfigurationChanges > create(css::uno::Reference< css::uno::XComponentContext > const &context=comphelper::getProcessComponentContext())
DragFullOptions GetDragFullOptions() const
long mnStartDragHeight
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:231
Color maMenuBarTextColor
static sal_uInt16 GetStartDragCode()
static Color HSBtoRGB(sal_uInt16 nHue, sal_uInt16 nSaturation, sal_uInt16 nBrightness)
vcl::Font maHelpFont
void SetTitleHeight(long nSize)
const HelpSettings & GetHelpSettings() const
long GetStartDragHeight() const
MouseSettingsOptions
Definition: settings.hxx:56
const Color & GetMenuTextColor() const
TRISTATE_INDET
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:98
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 SetDialogStyle(const DialogStyle &rStyle)
vcl::Font maPushButtonFont
OUString maPersonaHeaderFooter
Cache the settings to detect changes.
static ErrCode LoadGraphic(const OUString &rPath, const OUString &rFilter, Graphic &rGraphic, GraphicFilter *pFilter=nullptr, sal_uInt16 *pDeterminedFormat=nullptr)
MouseFollowFlags
Definition: settings.hxx:68
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:203
MouseWheelBehaviour GetWheelBehavior() const
ImplSVData * ImplGetSVData()
Definition: svdata.cxx:66
#define SAL_CONFIGFILE(name)
Color maAlternatingRowColor
const vcl::Font & GetPushButtonFont() const
NONE
vcl::Font maGroupFont
const Color & GetDisableColor() const
void SetSpinSize(long nSize)
static bool isRightToLeft(LanguageType nLang)
void SetFamilyName(const OUString &rFamilyName)
Definition: font/font.cxx:106
const vcl::Font & GetGroupFont() const
void SetIconTheme(const OUString &)
Set the icon theme to use.
std::shared_ptr< ImplStyleData > mxData
Definition: settings.hxx:238
long GetCursorSize() const
bool GetUseSystemUIFonts() const
const Color & GetMenuBarColor() const
FrameStyle maFrameStyle
MouseMiddleButtonAction GetMiddleButtonAction() const
const vcl::Font & GetToolFont() const
static void setupPersonaHeaderFooter(WhichPersona eWhich, OUString &rHeaderFooter, BitmapEx &rHeaderFooterBitmap, boost::optional< Color > &rMenuBarTextColor)
Update the setting of the Persona header / footer in ImplStyleData.
void SetListBoxMaximumLineCount(sal_uInt16 nCount)
void SetEdgeBlending(sal_uInt16 nCount)
#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:611
Color maCheckedColor
DisplayOptions GetDisplayOptions() const
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)
long GetDoubleClickHeight() const
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 Color & GetFontColor() const
const Color & GetFieldColor() const
WEIGHT_NORMAL
bool GetHideDisabledMenuItems() const
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:298
static OConfigurationTreeRoot tryCreateWithComponentContext(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const OUString &_rPath, sal_Int32 _nDepth=-1, CREATION_MODE _eMode=CM_UPDATABLE)
void SetFieldColor(const Color &rColor)
static void LocaleSettingsChanged(ConfigurationHints nHint)
Color maInactiveTabColor
void SetAppFont(const vcl::Font &rFont)
const Color & GetAlternatingRowColor() const
const LanguageTag & getLanguageTag()
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
Definition: graph.cxx:341
void SetRadioCheckTextColor(const Color &rColor)
void SetUseSystemUIFonts(bool bUseSystemUIFonts)
static long GetSplitSize()
void SetCursorSize(long nSize)
void SetVisitedLinkColor(const Color &rColor)
std::shared_ptr< ImplAllSettingsData > mxData
Definition: settings.hxx:673
void SetLabelTextColor(const Color &rColor)
const Color & GetCheckedColor() const
LanguageTag maUILocale
Color maMenuBarHighlightTextColor
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
static sal_uInt16 GetColorValueSetMaximumRowCount()
StyleSettingsOptions GetOptions() const
void SetDoubleClickWidth(long nDoubleClkWidth)
Color maDeactiveColor
Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:940
static sal_uLong GetActionDelay()
static DefaultFontConfiguration & get()
SelectionOptions mnSelectionOptions
const vcl::I18nHelper & GetLocaleI18nHelper() const
static bool GetMathLayoutRTL()
long GetStartDragWidth() const
Color maHighlightLinkColor
bool GetUseFontAAFromSystem() const
void SetTabTextColor(const Color &rColor)
void SetStartDragHeight(long nDragHeight)
void SetScrollBarSize(long nSize)
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)
StyleSettings maStyleSettings
Color maButtonTextColor
bool operator==(const MiscSettings &rSet) const
void SetLightBorderColor(const Color &rColor)
void SetTitleFont(const vcl::Font &rFont)
std::shared_ptr< vcl::IconThemeScanner > mIconThemeScanner
Color GetFaceGradientColor() const
vcl::Font maTabFont
static bool IsHeadlessModeEnabled()
Determines if headless mode is enabled.
Definition: svapp.cxx:1499
sal_uInt64 GetCursorBlinkTime() const
static bool GetDockingFloatsSupported()
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
long mnDoubleClkHeight
MouseMiddleButtonAction mnMiddleButtonAction
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
FAMILY_SWISS
const vcl::Font & GetIconFont() const
ToolbarIconSize
Definition: settings.hxx:223
const Color & GetTabHighlightTextColor() const
Size maListBoxPreviewDefaultPixelSize
bool GetPrimaryButtonWarpsSlider() const
sal_uInt16 GetListBoxMaximumLineCount() const
void SetButtonPressedRolloverTextColor(const Color &rColor)
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
const vcl::Font & GetFloatTitleFont() const
long GetSpinSize() const
Size maListBoxPreviewDefaultLogicSize
const Color & GetWindowColor() const
bool GetSkipDisabledInMenus() const
constexpr::Color COL_WHITE(0xFF, 0xFF, 0xFF)
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
constexpr::Color COL_LIGHTBLUE(0x00, 0x00, 0xFF)
void Set3DColors(const Color &rColor)
AllSettingsFlags Update(AllSettingsFlags nFlags, const AllSettings &rSettings)
OString const aName
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:213
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:83
void SetLanguageTag(const LanguageTag &rLanguageTag)
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
std::unique_ptr< vcl::I18nHelper > mpI18nHelper
const Color & GetHighlightLinkColor() const
std::shared_ptr< ImplHelpData > mxData
Definition: settings.hxx:641
DragFullOptions
Definition: settings.hxx:186
const LanguageTag & GetRealUILanguageTag() const
void SetActiveTextColor(const Color &rColor)
bool GetDisablePrinting() const
void SetTabHighlightTextColor(const Color &rColor)
long GetScrollBarSize() const
Color maButtonRolloverTextColor
static SettingsConfigItem * get()
Color maMenuBarRolloverTextColor
void SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
sal_uInt64 mnDoubleClkTime
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 sal_uInt16 GetContextMenuClicks()
const Color & GetDialogTextColor() const
TriState
static sal_uLong GetScrollRepeat()
void SetHighlightTextColor(const Color &rColor)
const Color & GetEdgeBlendingTopLeftColor() const
MouseSettings maMouseSettings
SvtSysLocaleOptions & GetOptions() const
#define MOUSE_RIGHT
Definition: event.hxx:100
AllSettingsFlags GetChangeFlags(const AllSettings &rSettings) const
void SetAntialiasingMinPixelHeight(long nMinPixel)
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)
void SetFloatTitleHeight(long nSize)
Color maMenuBorderColor
std::shared_ptr< ImplMiscData > mxData
Definition: settings.hxx:621
bool GetUseFlatBorders() const
MouseMiddleButtonAction
Definition: settings.hxx:78
Color maVisitedLinkColor
std::unique_ptr< vcl::I18nHelper > mpUII18nHelper
static sal_uLong GetButtonStartRepeat()
vcl::Font maAppFont
void SetActiveColor(const Color &rColor)
Color maEdgeBlendingTopLeftColor