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 
155  sal_uInt64 mnCursorBlinkTime;
174  std::shared_ptr<vcl::IconThemeScanner>
176  std::shared_ptr<vcl::IconThemeSelector>
178 
179  OUString mIconTheme;
184  //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise
185  //primary means scroll by single page. Secondary button takes the alternative behaviour
188 
189  sal_uInt16 mnEdgeBlending;
197 
199 
203 };
204 
206 {
207  ImplMiscData();
211 };
212 
214 {
216 };
217 
219 {
223 
230  std::unique_ptr<LocaleDataWrapper> mpLocaleDataWrapper;
231  std::unique_ptr<LocaleDataWrapper> mpUILocaleDataWrapper;
232  std::unique_ptr<vcl::I18nHelper> mpI18nHelper;
233  std::unique_ptr<vcl::I18nHelper> mpUII18nHelper;
235 };
236 
237 void
239 {
240  CopyData();
241  mxData->mnOptions = nOptions;
242 }
243 
246 {
247  return mxData->mnOptions;
248 }
249 
250 void
251 MouseSettings::SetDoubleClickTime( sal_uInt64 nDoubleClkTime )
252 {
253  CopyData();
254  mxData->mnDoubleClkTime = nDoubleClkTime;
255 }
256 
257 sal_uInt64
259 {
260  return mxData->mnDoubleClkTime;
261 }
262 
263 void
264 MouseSettings::SetDoubleClickWidth( long nDoubleClkWidth )
265 {
266  CopyData();
267  mxData->mnDoubleClkWidth = nDoubleClkWidth;
268 }
269 
270 long
272 {
273  return mxData->mnDoubleClkWidth;
274 }
275 
276 void
277 MouseSettings::SetDoubleClickHeight( long nDoubleClkHeight )
278 {
279  CopyData();
280  mxData->mnDoubleClkHeight = nDoubleClkHeight;
281 }
282 
283 long
285 {
286  return mxData->mnDoubleClkHeight;
287 }
288 
289 void
291 {
292  CopyData();
293  mxData->mnStartDragWidth = nDragWidth;
294 }
295 
296 long
298 {
299  return mxData->mnStartDragWidth;
300 }
301 
302 void
304 {
305  CopyData();
306  mxData->mnStartDragHeight = nDragHeight;
307 }
308 
309 long
311 {
312  return mxData->mnStartDragHeight;
313 }
314 
315 sal_uInt16
317 {
318  return MOUSE_LEFT;
319 }
320 
321 sal_uInt16
323 {
324  return MOUSE_RIGHT;
325 }
326 
327 sal_uInt16
329 {
330  return 1;
331 }
332 
333 sal_uLong
335 {
336  return 100;
337 }
338 
339 sal_uLong
341 {
342  return 370;
343 }
344 
345 void
347 {
348  CopyData();
349  mxData->mnButtonRepeat = nRepeat;
350 }
351 
352 sal_uLong
354 {
355  return mxData->mnButtonRepeat;
356 }
357 
358 sal_uLong
360 {
361  return 250;
362 }
363 
364 void
366 {
367  CopyData();
368  mxData->mnMenuDelay = nDelay;
369 }
370 
371 sal_uLong
373 {
374  return mxData->mnMenuDelay;
375 }
376 
377 void
379 {
380  CopyData();
381  mxData->mnFollow = nFollow;
382 }
383 
386 {
387  return mxData->mnFollow;
388 }
389 
390 void
392 {
393  CopyData();
394  mxData->mnMiddleButtonAction = nAction;
395 }
396 
399 {
400  return mxData->mnMiddleButtonAction;
401 }
402 
403 void
405 {
406  CopyData();
407  mxData->mnWheelBehavior = nBehavior;
408 }
409 
412 {
413  return mxData->mnWheelBehavior;
414 }
415 
416 bool
418 {
419  return !(*this == rSet);
420 }
421 
423  : mxData(std::make_shared<ImplMouseData>())
424 {
425 }
426 
428 {
429  // copy if other references exist
430  if (mxData.use_count() > 1)
431  {
432  mxData = std::make_shared<ImplMouseData>(*mxData);
433  }
434 }
435 
436 bool MouseSettings::operator ==( const MouseSettings& rSet ) const
437 {
438  if ( mxData == rSet.mxData )
439  return true;
440 
441  return
442  (mxData->mnOptions == rSet.mxData->mnOptions) &&
443  (mxData->mnDoubleClkTime == rSet.mxData->mnDoubleClkTime) &&
444  (mxData->mnDoubleClkWidth == rSet.mxData->mnDoubleClkWidth) &&
445  (mxData->mnDoubleClkHeight == rSet.mxData->mnDoubleClkHeight) &&
446  (mxData->mnStartDragWidth == rSet.mxData->mnStartDragWidth) &&
447  (mxData->mnStartDragHeight == rSet.mxData->mnStartDragHeight) &&
448  (mxData->mnMiddleButtonAction == rSet.mxData->mnMiddleButtonAction) &&
449  (mxData->mnButtonRepeat == rSet.mxData->mnButtonRepeat) &&
450  (mxData->mnMenuDelay == rSet.mxData->mnMenuDelay) &&
451  (mxData->mnFollow == rSet.mxData->mnFollow) &&
452  (mxData->mnWheelBehavior == rSet.mxData->mnWheelBehavior );
453 }
454 
456  mnScrollBarSize(16),
457  mnSpinSize(16),
458  mnCursorSize(2),
459  mnAntialiasedMin(0),
460  mnCursorBlinkTime(STYLE_CURSOR_NOBLINKTIME),
461  mnDragFullOptions(DragFullOptions::All),
462  mnSelectionOptions(SelectionOptions::NONE),
463  mnDisplayOptions(DisplayOptions::NONE),
464  mnToolbarIconSize(ToolbarIconSize::Unknown),
465  mnOptions(StyleSettingsOptions::NONE),
466  mbAutoMnemonic(true),
467  meUseImagesInMenus(TRISTATE_INDET),
468  mnMinThumbSize(16),
469  mIconThemeSelector(new vcl::IconThemeSelector()),
470  meContextMenuShortcuts(TRISTATE_INDET),
471  mnEdgeBlending(35),
472  maEdgeBlendingTopLeftColor(Color(0xC0, 0xC0, 0xC0)),
473  maEdgeBlendingBottomRightColor(Color(0x40, 0x40, 0x40)),
474  mnListBoxMaximumLineCount(25),
475  mnColorValueSetColumnCount(12),
476  maListBoxPreviewDefaultLogicSize(Size(15, 7)),
477  maListBoxPreviewDefaultPixelSize(Size(0, 0)), // on-demand calculated in GetListBoxPreviewDefaultPixelSize(),
478  mbPreviewUsesCheckeredBackground(true)
479 {
481 }
482 
484  maActiveBorderColor( rData.maActiveBorderColor ),
485  maActiveColor( rData.maActiveColor ),
486  maActiveTextColor( rData.maActiveTextColor ),
487  maAlternatingRowColor( rData.maAlternatingRowColor ),
488  maButtonTextColor( rData.maButtonTextColor ),
489  maDefaultActionButtonTextColor( rData.maDefaultActionButtonTextColor ),
490  maActionButtonTextColor( rData.maActionButtonTextColor ),
491  maActionButtonRolloverTextColor( rData.maActionButtonRolloverTextColor ),
492  maButtonRolloverTextColor( rData.maButtonRolloverTextColor ),
493  maButtonPressedRolloverTextColor( rData.maButtonPressedRolloverTextColor ),
494  maCheckedColor( rData.maCheckedColor ),
495  maDarkShadowColor( rData.maDarkShadowColor ),
496  maDeactiveBorderColor( rData.maDeactiveBorderColor ),
497  maDeactiveColor( rData.maDeactiveColor ),
498  maDeactiveTextColor( rData.maDeactiveTextColor ),
499  maDialogColor( rData.maDialogColor ),
500  maDialogTextColor( rData.maDialogTextColor ),
501  maDisableColor( rData.maDisableColor ),
502  maFaceColor( rData.maFaceColor ),
503  maFieldColor( rData.maFieldColor ),
504  maFieldTextColor( rData.maFieldTextColor ),
505  maFieldRolloverTextColor( rData.maFieldRolloverTextColor ),
506  maFontColor( rData.maFontColor ),
507  maGroupTextColor( rData.maGroupTextColor ),
508  maHelpColor( rData.maHelpColor ),
509  maHelpTextColor( rData.maHelpTextColor ),
510  maHighlightColor( rData.maHighlightColor ),
511  maHighlightLinkColor( rData.maHighlightLinkColor ),
512  maHighlightTextColor( rData.maHighlightTextColor ),
513  maLabelTextColor( rData.maLabelTextColor ),
514  maLightBorderColor( rData.maLightBorderColor ),
515  maLightColor( rData.maLightColor ),
516  maLinkColor( rData.maLinkColor ),
517  maMenuBarColor( rData.maMenuBarColor ),
518  maMenuBarRolloverColor( rData.maMenuBarRolloverColor ),
519  maMenuBorderColor( rData.maMenuBorderColor ),
520  maMenuColor( rData.maMenuColor ),
521  maMenuHighlightColor( rData.maMenuHighlightColor ),
522  maMenuHighlightTextColor( rData.maMenuHighlightTextColor ),
523  maMenuTextColor( rData.maMenuTextColor ),
524  maMenuBarTextColor( rData.maMenuBarTextColor ),
525  maMenuBarRolloverTextColor( rData.maMenuBarRolloverTextColor ),
526  maMenuBarHighlightTextColor( rData.maMenuBarHighlightTextColor ),
527  maMonoColor( rData.maMonoColor ),
528  maRadioCheckTextColor( rData.maRadioCheckTextColor ),
529  maShadowColor( rData.maShadowColor ),
530  maVisitedLinkColor( rData.maVisitedLinkColor ),
531  maToolTextColor( rData.maToolTextColor ),
532  maWindowColor( rData.maWindowColor ),
533  maWindowTextColor( rData.maWindowTextColor ),
534  maWorkspaceColor( rData.maWorkspaceColor ),
535  maActiveTabColor( rData.maActiveTabColor ),
536  maInactiveTabColor( rData.maInactiveTabColor ),
537  maTabTextColor( rData.maTabTextColor ),
538  maTabRolloverTextColor( rData.maTabRolloverTextColor ),
539  maTabHighlightTextColor( rData.maTabHighlightTextColor ),
540  maAppFont( rData.maAppFont ),
541  maHelpFont( rData.maAppFont ),
542  maTitleFont( rData.maTitleFont ),
543  maFloatTitleFont( rData.maFloatTitleFont ),
544  maMenuFont( rData.maMenuFont ),
545  maToolFont( rData.maToolFont ),
546  maLabelFont( rData.maLabelFont ),
547  maRadioCheckFont( rData.maRadioCheckFont ),
548  maPushButtonFont( rData.maPushButtonFont ),
549  maFieldFont( rData.maFieldFont ),
550  maIconFont( rData.maIconFont ),
551  maTabFont( rData.maTabFont ),
552  maGroupFont( rData.maGroupFont ),
553  mnTitleHeight(rData.mnTitleHeight),
554  mnFloatTitleHeight(rData.mnFloatTitleHeight),
555  mnScrollBarSize(rData.mnScrollBarSize),
556  mnSpinSize(rData.mnSpinSize),
557  mnCursorSize(rData.mnCursorSize),
558  mnAntialiasedMin(rData.mnAntialiasedMin),
559  mnCursorBlinkTime(rData.mnCursorBlinkTime),
560  mnDragFullOptions(rData.mnDragFullOptions),
561  mnSelectionOptions(rData.mnSelectionOptions),
562  mnDisplayOptions(rData.mnDisplayOptions),
563  mnToolbarIconSize(rData.mnToolbarIconSize),
564  mnUseFlatMenus(rData.mnUseFlatMenus),
565  mnOptions(rData.mnOptions),
566  mbHighContrast(rData.mbHighContrast),
567  mbUseSystemUIFonts(rData.mbUseSystemUIFonts),
568  mbUseFontAAFromSystem(rData.mbUseFontAAFromSystem),
569  mbAutoMnemonic(rData.mbAutoMnemonic),
570  meUseImagesInMenus(rData.meUseImagesInMenus),
571  mnUseFlatBorders(rData.mnUseFlatBorders),
572  mbPreferredUseImagesInMenus(rData.mbPreferredUseImagesInMenus),
573  mnMinThumbSize(rData.mnMinThumbSize),
574  mIconThemeScanner(rData.mIconThemeScanner?new vcl::IconThemeScanner(*rData.mIconThemeScanner):nullptr),
575  mIconThemeSelector(new vcl::IconThemeSelector(*rData.mIconThemeSelector)),
576  mIconTheme(rData.mIconTheme),
577  mbSkipDisabledInMenus(rData.mbSkipDisabledInMenus),
578  mbHideDisabledMenuItems(rData.mbHideDisabledMenuItems),
579  mbPreferredContextMenuShortcuts(rData.mbPreferredContextMenuShortcuts),
580  meContextMenuShortcuts(rData.meContextMenuShortcuts),
581  mbPrimaryButtonWarpsSlider(rData.mbPrimaryButtonWarpsSlider),
582  maDialogStyle( rData.maDialogStyle ),
583  mnEdgeBlending(rData.mnEdgeBlending),
584  maEdgeBlendingTopLeftColor(rData.maEdgeBlendingTopLeftColor),
585  maEdgeBlendingBottomRightColor(rData.maEdgeBlendingBottomRightColor),
586  mnListBoxMaximumLineCount(rData.mnListBoxMaximumLineCount),
587  mnColorValueSetColumnCount(rData.mnColorValueSetColumnCount),
588  maListBoxPreviewDefaultLogicSize(rData.maListBoxPreviewDefaultLogicSize),
589  maListBoxPreviewDefaultPixelSize(rData.maListBoxPreviewDefaultPixelSize),
590  mbPreviewUsesCheckeredBackground(rData.mbPreviewUsesCheckeredBackground),
591  maPersonaHeaderFooter( rData.maPersonaHeaderFooter ),
592  maPersonaHeaderBitmap( rData.maPersonaHeaderBitmap ),
593  maPersonaFooterBitmap( rData.maPersonaFooterBitmap ),
594  maPersonaMenuBarTextColor( rData.maPersonaMenuBarTextColor )
595 {
596 }
597 
599 {
600  vcl::Font aStdFont( FAMILY_SWISS, Size( 0, 8 ) );
601  aStdFont.SetCharSet( osl_getThreadTextEncoding() );
602  aStdFont.SetWeight( WEIGHT_NORMAL );
604  aStdFont.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en")));
605  else
606  aStdFont.SetFamilyName("Liberation Sans");
607  maAppFont = aStdFont;
608  maHelpFont = aStdFont;
609  maMenuFont = aStdFont;
610  maToolFont = aStdFont;
611  maGroupFont = aStdFont;
612  maLabelFont = aStdFont;
613  maRadioCheckFont = aStdFont;
614  maPushButtonFont = aStdFont;
615  maFieldFont = aStdFont;
616  maIconFont = aStdFont;
617  maTabFont = aStdFont;
618  aStdFont.SetWeight( WEIGHT_BOLD );
619  maFloatTitleFont = aStdFont;
620  maTitleFont = aStdFont;
621 
623  maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
641  maWorkspaceColor = Color( 0xDF, 0xDF, 0xDE );
670  maHelpColor = Color( 0xFF, 0xFF, 0xE0 );
673  maVisitedLinkColor = Color( 0x00, 0x00, 0xCC );
677  maAlternatingRowColor = Color( 0xEE, 0xEE, 0xEE );
678 
679  mnTitleHeight = 18;
680  mnFloatTitleHeight = 13;
681  mbHighContrast = false;
682  mbUseSystemUIFonts = true;
683  mbUseFontAAFromSystem = true;
684  mnUseFlatBorders = false;
685  mnUseFlatMenus = false;
687  mbSkipDisabledInMenus = false;
688  mbHideDisabledMenuItems = false;
691 }
692 
694  : mxData(std::make_shared<ImplStyleData>())
695 {
696 }
697 
698 void
700 {
701  CopyData();
702  mxData->maFaceColor = rColor;
703 }
704 
705 const Color&
707 {
708  return mxData->maFaceColor;
709 }
710 
711 void
713 {
714  CopyData();
715  mxData->maCheckedColor = rColor;
716 }
717 
718 const Color&
720 {
721  return mxData->maCheckedColor;
722 }
723 
724 void
726 {
727  CopyData();
728  mxData->maLightColor = rColor;
729 }
730 
731 const Color&
733 {
734  return mxData->maLightColor;
735 }
736 
737 void
739 {
740  CopyData();
741  mxData->maLightBorderColor = rColor;
742 }
743 
744 const Color&
746 {
747  return mxData->maLightBorderColor;
748 }
749 
750 void
752 {
753  CopyData();
754  mxData->maShadowColor = rColor;
755 }
756 
757 const Color&
759 {
760  return mxData->maShadowColor;
761 }
762 
763 void
765 {
766  CopyData();
767  mxData->maDarkShadowColor = rColor;
768 }
769 
770 const Color&
772 {
773  return mxData->maDarkShadowColor;
774 }
775 
776 void
778 {
779  CopyData();
780  mxData->maButtonTextColor = rColor;
781 }
782 
783 const Color&
785 {
786  return mxData->maButtonTextColor;
787 }
788 
789 void
791 {
792  CopyData();
793  mxData->maDefaultActionButtonTextColor = rColor;
794 }
795 
796 const Color&
798 {
799  return mxData->maDefaultActionButtonTextColor;
800 }
801 
802 void
804 {
805  CopyData();
806  mxData->maActionButtonTextColor = rColor;
807 }
808 
809 const Color&
811 {
812  return mxData->maActionButtonTextColor;
813 }
814 
815 void
817 {
818  CopyData();
819  mxData->maActionButtonRolloverTextColor = rColor;
820 }
821 
822 const Color&
824 {
825  return mxData->maActionButtonRolloverTextColor;
826 }
827 
828 void
830 {
831  CopyData();
832  mxData->maButtonRolloverTextColor = rColor;
833 }
834 
835 const Color&
837 {
838  return mxData->maButtonRolloverTextColor;
839 }
840 
841 void
843 {
844  CopyData();
845  mxData->maButtonPressedRolloverTextColor = rColor;
846 }
847 
848 const Color&
850 {
851  return mxData->maButtonPressedRolloverTextColor;
852 }
853 
854 void
856 {
857  CopyData();
858  mxData->maRadioCheckTextColor = rColor;
859 }
860 
861 const Color&
863 {
864  return mxData->maRadioCheckTextColor;
865 }
866 
867 void
869 {
870  CopyData();
871  mxData->maGroupTextColor = rColor;
872 }
873 
874 const Color&
876 {
877  return mxData->maGroupTextColor;
878 }
879 
880 void
882 {
883  CopyData();
884  mxData->maLabelTextColor = rColor;
885 }
886 
887 const Color&
889 {
890  return mxData->maLabelTextColor;
891 }
892 
893 void
895 {
896  CopyData();
897  mxData->maWindowColor = rColor;
898 }
899 
900 const Color&
902 {
903  return mxData->maWindowColor;
904 }
905 
906 void
908 {
909  CopyData();
910  mxData->maWindowTextColor = rColor;
911 }
912 
913 const Color&
915 {
916  return mxData->maWindowTextColor;
917 }
918 
919 void
921 {
922  CopyData();
923  mxData->maDialogColor = rColor;
924 }
925 
926 const Color&
928 {
929  return mxData->maDialogColor;
930 }
931 
932 void
934 {
935  CopyData();
936  mxData->maDialogTextColor = rColor;
937 }
938 
939 const Color&
941 {
942  return mxData->maDialogTextColor;
943 }
944 
945 void
947 {
948  CopyData();
949  mxData->maWorkspaceColor = rColor;
950 }
951 
952 const Color&
954 {
955  return mxData->maWorkspaceColor;
956 }
957 
958 void
960 {
961  CopyData();
962  mxData->maFieldColor = rColor;
963 }
964 
965 const Color&
967 {
968  return mxData->maFieldColor;
969 }
970 
971 void
973 {
974  CopyData();
975  mxData->maFieldTextColor = rColor;
976 }
977 
978 const Color&
980 {
981  return mxData->maFieldTextColor;
982 }
983 
984 void
986 {
987  CopyData();
988  mxData->maFieldRolloverTextColor = rColor;
989 }
990 
991 const Color&
993 {
994  return mxData->maFieldRolloverTextColor;
995 }
996 
997 void
999 {
1000  CopyData();
1001  mxData->maActiveColor = rColor;
1002 }
1003 
1004 const Color&
1006 {
1007  return mxData->maActiveColor;
1008 }
1009 
1010 void
1012 {
1013  CopyData();
1014  mxData->maActiveTextColor = rColor;
1015 }
1016 
1017 const Color&
1019 {
1020  return mxData->maActiveTextColor;
1021 }
1022 
1023 void
1025 {
1026  CopyData();
1027  mxData->maActiveBorderColor = rColor;
1028 }
1029 
1030 const Color&
1032 {
1033  return mxData->maActiveBorderColor;
1034 }
1035 
1036 void
1038 {
1039  CopyData();
1040  mxData->maDeactiveColor = rColor;
1041 }
1042 
1043 const Color&
1045 {
1046  return mxData->maDeactiveColor;
1047 }
1048 
1049 void
1051 {
1052  CopyData();
1053  mxData->maDeactiveTextColor = rColor;
1054 }
1055 
1056 const Color&
1058 {
1059  return mxData->maDeactiveTextColor;
1060 }
1061 
1062 void
1064 {
1065  CopyData();
1066  mxData->maDeactiveBorderColor = rColor;
1067 }
1068 
1069 const Color&
1071 {
1072  return mxData->maDeactiveBorderColor;
1073 }
1074 
1075 void
1077 {
1078  CopyData();
1079  mxData->maHighlightColor = rColor;
1080 }
1081 
1082 const Color&
1084 {
1085  return mxData->maHighlightColor;
1086 }
1087 
1088 void
1090 {
1091  CopyData();
1092  mxData->maHighlightTextColor = rColor;
1093 }
1094 
1095 const Color&
1097 {
1098  return mxData->maHighlightTextColor;
1099 }
1100 
1101 void
1103 {
1104  CopyData();
1105  mxData->maDisableColor = rColor;
1106 }
1107 
1108 const Color&
1110 {
1111  return mxData->maDisableColor;
1112 }
1113 
1114 void
1116 {
1117  CopyData();
1118  mxData->maHelpColor = rColor;
1119 }
1120 
1121 const Color&
1123 {
1124  return mxData->maHelpColor;
1125 }
1126 
1127 void
1129 {
1130  CopyData();
1131  mxData->maHelpTextColor = rColor;
1132 }
1133 
1134 const Color&
1136 {
1137  return mxData->maHelpTextColor;
1138 }
1139 
1140 void
1142 {
1143  CopyData();
1144  mxData->maMenuColor = rColor;
1145 }
1146 
1147 const Color&
1149 {
1150  return mxData->maMenuColor;
1151 }
1152 
1153 void
1155 {
1156  CopyData();
1157  mxData->maMenuBarColor = rColor;
1158 }
1159 
1160 const Color&
1162 {
1163  return mxData->maMenuBarColor;
1164 }
1165 
1166 void
1168 {
1169  CopyData();
1170  mxData->maMenuBarRolloverColor = rColor;
1171 }
1172 
1173 const Color&
1175 {
1176  return mxData->maMenuBarRolloverColor;
1177 }
1178 
1179 void
1181 {
1182  CopyData();
1183  mxData->maMenuBorderColor = rColor;
1184 }
1185 
1186 const Color&
1188 {
1189  return mxData->maMenuBorderColor;
1190 }
1191 
1192 void
1194 {
1195  CopyData();
1196  mxData->maMenuTextColor = rColor;
1197 }
1198 
1199 const Color&
1201 {
1202  return mxData->maMenuTextColor;
1203 }
1204 
1205 void
1207 {
1208  CopyData();
1209  mxData->maMenuBarTextColor = rColor;
1210 }
1211 
1212 const Color&
1214 {
1215  return mxData->maMenuBarTextColor;
1216 }
1217 
1218 void
1220 {
1221  CopyData();
1222  mxData->maMenuBarRolloverTextColor = rColor;
1223 }
1224 
1225 const Color&
1227 {
1228  return mxData->maMenuBarRolloverTextColor;
1229 }
1230 
1231 void
1233 {
1234  CopyData();
1235  mxData->maMenuBarHighlightTextColor = rColor;
1236 }
1237 
1238 const Color&
1240 {
1241  return mxData->maMenuBarHighlightTextColor;
1242 }
1243 
1244 void
1246 {
1247  CopyData();
1248  mxData->maMenuHighlightColor = rColor;
1249 }
1250 
1251 const Color&
1253 {
1254  return mxData->maMenuHighlightColor;
1255 }
1256 
1257 void
1259 {
1260  CopyData();
1261  mxData->maMenuHighlightTextColor = rColor;
1262 }
1263 
1264 const Color&
1266 {
1267  return mxData->maMenuHighlightTextColor;
1268 }
1269 
1270 void
1272 {
1273  CopyData();
1274  mxData->maTabTextColor = rColor;
1275 }
1276 
1277 const Color&
1279 {
1280  return mxData->maTabTextColor;
1281 }
1282 
1283 void
1285 {
1286  CopyData();
1287  mxData->maTabRolloverTextColor = rColor;
1288 }
1289 
1290 const Color&
1292 {
1293  return mxData->maTabRolloverTextColor;
1294 }
1295 
1296 void
1298 {
1299  CopyData();
1300  mxData->maTabHighlightTextColor = rColor;
1301 }
1302 
1303 const Color&
1305 {
1306  return mxData->maTabHighlightTextColor;
1307 }
1308 
1309 void
1311 {
1312  CopyData();
1313  mxData->maLinkColor = rColor;
1314 }
1315 
1316 const Color&
1318 {
1319  return mxData->maLinkColor;
1320 }
1321 
1322 void
1324 {
1325  CopyData();
1326  mxData->maVisitedLinkColor = rColor;
1327 }
1328 
1329 const Color&
1331 {
1332  return mxData->maVisitedLinkColor;
1333 }
1334 
1335 void
1337 {
1338  CopyData();
1339  mxData->maToolTextColor = rColor;
1340 }
1341 
1342 const Color&
1344 {
1345  return mxData->maToolTextColor;
1346 }
1347 
1348 const Color&
1350 {
1351  return mxData->maHighlightLinkColor;
1352 }
1353 
1354 void
1356 {
1357  CopyData();
1358  mxData->maMonoColor = rColor;
1359 }
1360 
1361 const Color&
1363 {
1364  return mxData->maMonoColor;
1365 }
1366 
1367 void
1369 {
1370  CopyData();
1371  mxData->maActiveTabColor = rColor;
1372 }
1373 
1374 const Color&
1376 {
1377  return mxData->maActiveTabColor;
1378 }
1379 
1380 void
1382 {
1383  CopyData();
1384  mxData->maInactiveTabColor = rColor;
1385 }
1386 
1387 const Color&
1389 {
1390  return mxData->maInactiveTabColor;
1391 }
1392 
1393 const Color&
1395 {
1396  return mxData->maAlternatingRowColor;
1397 }
1398 
1399 void
1400 StyleSettings::SetUseSystemUIFonts( bool bUseSystemUIFonts )
1401 {
1402  CopyData();
1403  mxData->mbUseSystemUIFonts = bUseSystemUIFonts;
1404 }
1405 
1406 bool
1408 {
1409  return mxData->mbUseSystemUIFonts;
1410 }
1411 
1412 void StyleSettings::SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
1413 {
1414  CopyData();
1415  mxData->mbUseFontAAFromSystem = bUseFontAAFromSystem;
1416 }
1417 
1419 {
1420  return mxData->mbUseFontAAFromSystem;
1421 }
1422 
1423 void
1424 StyleSettings::SetUseFlatBorders( bool bUseFlatBorders )
1425 {
1426  CopyData();
1427  mxData->mnUseFlatBorders = bUseFlatBorders;
1428 }
1429 
1430 bool
1432 {
1433  return mxData->mnUseFlatBorders;
1434 }
1435 
1436 void
1437 StyleSettings::SetUseFlatMenus( bool bUseFlatMenus )
1438 {
1439  CopyData();
1440  mxData->mnUseFlatMenus = bUseFlatMenus;
1441 }
1442 
1443 bool
1445 {
1446  return mxData->mnUseFlatMenus;
1447 }
1448 
1449 void
1451 {
1452  CopyData();
1453  mxData->meUseImagesInMenus = eUseImagesInMenus;
1454 }
1455 
1456 void
1457 StyleSettings::SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus )
1458 {
1459  CopyData();
1460  mxData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus;
1461 }
1462 
1463 bool
1465 {
1466  return mxData->mbPreferredUseImagesInMenus;
1467 }
1468 
1469 void
1470 StyleSettings::SetSkipDisabledInMenus( bool bSkipDisabledInMenus )
1471 {
1472  CopyData();
1473  mxData->mbSkipDisabledInMenus = bSkipDisabledInMenus;
1474 }
1475 
1476 bool
1478 {
1479  return mxData->mbSkipDisabledInMenus;
1480 }
1481 
1482 void
1483 StyleSettings::SetHideDisabledMenuItems( bool bHideDisabledMenuItems )
1484 {
1485  CopyData();
1486  mxData->mbHideDisabledMenuItems = bHideDisabledMenuItems;
1487 }
1488 
1489 bool
1491 {
1492  return mxData->mbHideDisabledMenuItems;
1493 }
1494 
1495 void
1497 {
1498  CopyData();
1499  mxData->meContextMenuShortcuts = eContextMenuShortcuts;
1500 }
1501 
1502 bool
1504 {
1505  switch (mxData->meContextMenuShortcuts)
1506  {
1507  case TRISTATE_FALSE:
1508  return false;
1509  case TRISTATE_TRUE:
1510  return true;
1511  default: // TRISTATE_INDET:
1513  }
1514 }
1515 
1516 void
1518 {
1519  CopyData();
1520  mxData->mbPreferredContextMenuShortcuts = bContextMenuShortcuts;
1521 }
1522 
1523 bool
1525 {
1526  return mxData->mbPreferredContextMenuShortcuts;
1527 }
1528 
1529 void
1530 StyleSettings::SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider )
1531 {
1532  CopyData();
1533  mxData->mbPrimaryButtonWarpsSlider = bPrimaryButtonWarpsSlider;
1534 }
1535 
1536 bool
1538 {
1539  return mxData->mbPrimaryButtonWarpsSlider;
1540 }
1541 
1542 void
1544 {
1545  CopyData();
1546  mxData->maAppFont = rFont;
1547 }
1548 
1549 const vcl::Font&
1551 {
1552  return mxData->maAppFont;
1553 }
1554 
1555 void
1557 {
1558  CopyData();
1559  mxData->maHelpFont = rFont;
1560 }
1561 
1562 const vcl::Font&
1564 {
1565  return mxData->maHelpFont;
1566 }
1567 
1568 void
1570 {
1571  CopyData();
1572  mxData->maTitleFont = rFont;
1573 }
1574 
1575 const vcl::Font&
1577 {
1578  return mxData->maTitleFont;
1579 }
1580 
1581 void
1583 {
1584  CopyData();
1585  mxData->maFloatTitleFont = rFont;
1586 }
1587 
1588 const vcl::Font&
1590 {
1591  return mxData->maFloatTitleFont;
1592 }
1593 
1594 void
1596 {
1597  CopyData();
1598  mxData->maMenuFont = rFont;
1599 }
1600 
1601 const vcl::Font&
1603 {
1604  return mxData->maMenuFont;
1605 }
1606 
1607 void
1609 {
1610  CopyData();
1611  mxData->maToolFont = rFont;
1612 }
1613 
1614 const vcl::Font&
1616 {
1617  return mxData->maToolFont;
1618 }
1619 
1620 void
1622 {
1623  CopyData();
1624  mxData->maGroupFont = rFont;
1625 }
1626 
1627 const vcl::Font&
1629 {
1630  return mxData->maGroupFont;
1631 }
1632 
1633 void
1635 {
1636  CopyData();
1637  mxData->maLabelFont = rFont;
1638 }
1639 
1640 const vcl::Font&
1642 {
1643  return mxData->maLabelFont;
1644 }
1645 
1646 void
1648 {
1649  CopyData();
1650  mxData->maRadioCheckFont = rFont;
1651 }
1652 
1653 const vcl::Font&
1655 {
1656  return mxData->maRadioCheckFont;
1657 }
1658 
1659 void
1661 {
1662  CopyData();
1663  mxData->maPushButtonFont = rFont;
1664 }
1665 
1666 const vcl::Font&
1668 {
1669  return mxData->maPushButtonFont;
1670 }
1671 
1672 void
1674 {
1675  CopyData();
1676  mxData->maFieldFont = rFont;
1677 }
1678 
1679 const vcl::Font&
1681 {
1682  return mxData->maFieldFont;
1683 }
1684 
1685 void
1687 {
1688  CopyData();
1689  mxData->maIconFont = rFont;
1690 }
1691 
1692 const vcl::Font&
1694 {
1695  return mxData->maIconFont;
1696 }
1697 
1698 void
1700 {
1701  CopyData();
1702  mxData->maTabFont = rFont;
1703 }
1704 
1705 const vcl::Font&
1707 {
1708  return mxData->maTabFont;
1709 }
1710 
1711 long
1713 {
1714  return 1;
1715 }
1716 
1717 void
1719 {
1720  CopyData();
1721  mxData->mnTitleHeight = nSize;
1722 }
1723 
1724 long
1726 {
1727  return mxData->mnTitleHeight;
1728 }
1729 
1730 void
1732 {
1733  CopyData();
1734  mxData->mnFloatTitleHeight = nSize;
1735 }
1736 
1737 long
1739 {
1740  return mxData->mnFloatTitleHeight;
1741 }
1742 
1743 void
1745 {
1746  CopyData();
1747  mxData->mnScrollBarSize = nSize;
1748 }
1749 
1750 long
1752 {
1753  return mxData->mnScrollBarSize;
1754 }
1755 
1756 void
1758 {
1759  CopyData();
1760  mxData->mnMinThumbSize = nSize;
1761 }
1762 
1763 long
1765 {
1766  return mxData->mnMinThumbSize;
1767 }
1768 
1769 void
1771 {
1772  CopyData();
1773  mxData->mnSpinSize = nSize;
1774 }
1775 
1776 long
1778 {
1779  return mxData->mnSpinSize;
1780 }
1781 
1782 long
1784 {
1785  return 3;
1786 }
1787 
1788 void
1790 {
1791  CopyData();
1792  mxData->mnCursorSize = nSize;
1793 }
1794 
1795 long
1797 {
1798  return mxData->mnCursorSize;
1799 }
1800 
1801 void
1802 StyleSettings::SetCursorBlinkTime( sal_uInt64 nBlinkTime )
1803 {
1804  CopyData();
1805  mxData->mnCursorBlinkTime = nBlinkTime;
1806 }
1807 
1808 sal_uInt64
1810 {
1811  return static_cast<long>(mxData->mnCursorBlinkTime);
1812 }
1813 
1814 void
1816 {
1817  CopyData();
1818  mxData->mnDragFullOptions = nOptions;
1819 }
1820 
1823 {
1824  return mxData->mnDragFullOptions;
1825 }
1826 
1827 void
1829 {
1830  CopyData();
1831  mxData->mnSelectionOptions = nOptions;
1832 }
1833 
1836 {
1837  return mxData->mnSelectionOptions;
1838 }
1839 
1840 void
1842 {
1843  CopyData();
1844  mxData->mnDisplayOptions = nOptions;
1845 }
1846 
1849 {
1850  return mxData->mnDisplayOptions;
1851 }
1852 
1853 void
1855 {
1856  CopyData();
1857  mxData->mnAntialiasedMin = nMinPixel;
1858 }
1859 
1860 sal_uLong
1862 {
1863  return mxData->mnAntialiasedMin;
1864 }
1865 
1866 void
1868 {
1869  CopyData();
1870  mxData->mnOptions = nOptions;
1871 }
1872 
1873 void
1874 StyleSettings::SetAutoMnemonic( bool bAutoMnemonic )
1875 {
1876  CopyData();
1877  mxData->mbAutoMnemonic = bAutoMnemonic;
1878 }
1879 
1880 bool
1882 {
1883  return mxData->mbAutoMnemonic;
1884 }
1885 
1886 bool
1888 {
1889  ImplSVData* pSVData = ImplGetSVData();
1890  return pSVData->maNWFData.mbCanDetermineWindowPosition;
1891 }
1892 
1893 void
1895 {
1896  CopyData();
1897  mxData->maFontColor = rColor;
1898 }
1899 
1900 const Color&
1902 {
1903  return mxData->maFontColor;
1904 }
1905 
1906 void
1908 {
1909  CopyData();
1910  mxData->mnToolbarIconSize = nSize;
1911 }
1912 
1915 {
1916  return mxData->mnToolbarIconSize;
1917 }
1918 
1919 const DialogStyle&
1921 {
1922  return mxData->maDialogStyle;
1923 }
1924 
1925 void
1927 {
1928  CopyData();
1929  mxData->mnEdgeBlending = nCount;
1930 }
1931 
1932 sal_uInt16
1934 {
1935  return mxData->mnEdgeBlending;
1936 }
1937 
1938 const Color&
1940 {
1941  return mxData->maEdgeBlendingTopLeftColor;
1942 }
1943 
1944 const Color&
1946 {
1947  return mxData->maEdgeBlendingBottomRightColor;
1948 }
1949 
1950 void
1952 {
1953  CopyData();
1954  mxData->mnListBoxMaximumLineCount = nCount;
1955 }
1956 
1957 sal_uInt16
1959 {
1960  return mxData->mnListBoxMaximumLineCount;
1961 }
1962 
1963 void
1965 {
1966  CopyData();
1967  mxData->mnColorValueSetColumnCount = nCount;
1968 }
1969 
1970 sal_uInt16
1972 {
1973  return mxData->mnColorValueSetColumnCount;
1974 }
1975 
1976 sal_uInt16
1978 {
1979  return 10;
1980 }
1981 
1982 sal_uInt16
1984 {
1985  return 1;
1986 }
1987 
1988 void
1990 {
1991  CopyData();
1992  mxData->mbPreviewUsesCheckeredBackground = bNew;
1993 }
1994 
1995 bool
1997 {
1998  return mxData->mbPreviewUsesCheckeredBackground;
1999 }
2000 
2001 bool
2003 {
2004  return !(*this == rSet);
2005 }
2006 
2008 {
2009  mxData->maListBoxPreviewDefaultLogicSize = rSize;
2010 }
2011 
2013 {
2014  if(0 == mxData->maListBoxPreviewDefaultPixelSize.Width() || 0 == mxData->maListBoxPreviewDefaultPixelSize.Height())
2015  {
2016  const_cast< StyleSettings* >(this)->mxData->maListBoxPreviewDefaultPixelSize =
2017  Application::GetDefaultDevice()->LogicToPixel(mxData->maListBoxPreviewDefaultLogicSize, MapMode(MapUnit::MapAppFont));
2018  }
2019 
2020  return mxData->maListBoxPreviewDefaultPixelSize;
2021 }
2022 
2023 void StyleSettings::Set3DColors( const Color& rColor )
2024 {
2025  CopyData();
2026  mxData->maFaceColor = rColor;
2027  mxData->maLightBorderColor = rColor;
2028  mxData->maMenuBorderColor = rColor;
2029  mxData->maDarkShadowColor = COL_BLACK;
2030  if ( rColor != COL_LIGHTGRAY )
2031  {
2032  mxData->maLightColor = rColor;
2033  mxData->maShadowColor = rColor;
2034  mxData->maDarkShadowColor=rColor;
2035  mxData->maLightColor.IncreaseLuminance( 64 );
2036  mxData->maShadowColor.DecreaseLuminance( 64 );
2037  mxData->maDarkShadowColor.DecreaseLuminance( 100 );
2038  sal_uLong nRed = mxData->maLightColor.GetRed();
2039  sal_uLong nGreen = mxData->maLightColor.GetGreen();
2040  sal_uLong nBlue = mxData->maLightColor.GetBlue();
2041  nRed += static_cast<sal_uLong>(mxData->maShadowColor.GetRed());
2042  nGreen += static_cast<sal_uLong>(mxData->maShadowColor.GetGreen());
2043  nBlue += static_cast<sal_uLong>(mxData->maShadowColor.GetBlue());
2044  mxData->maCheckedColor = Color( static_cast<sal_uInt8>(nRed/2), static_cast<sal_uInt8>(nGreen/2), static_cast<sal_uInt8>(nBlue/2) );
2045  }
2046  else
2047  {
2048  mxData->maCheckedColor = Color( 0x99, 0x99, 0x99 );
2049  mxData->maLightColor = COL_WHITE;
2050  mxData->maShadowColor = COL_GRAY;
2051  }
2052 }
2053 
2055 {
2056  CopyData();
2057  // Light gray checked color special case
2058  if ( GetFaceColor() == COL_LIGHTGRAY )
2059  mxData->maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
2060  else
2061  {
2062  sal_uInt8 nRed = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetRed()) + static_cast<sal_uInt16>(mxData->maLightColor.GetRed()))/2);
2063  sal_uInt8 nGreen = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetGreen()) + static_cast<sal_uInt16>(mxData->maLightColor.GetGreen()))/2);
2064  sal_uInt8 nBlue = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetBlue()) + static_cast<sal_uInt16>(mxData->maLightColor.GetBlue()))/2);
2065  mxData->maCheckedColor = Color( nRed, nGreen, nBlue );
2066  }
2067 }
2068 
2070 {
2071  // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
2072  switch (mxData->meUseImagesInMenus) {
2073  case TRISTATE_FALSE:
2074  return false;
2075  case TRISTATE_TRUE:
2076  return true;
2077  default: // TRISTATE_INDET:
2079  }
2080 }
2081 
2082 static BitmapEx readBitmapEx( const OUString& rPath )
2083 {
2084  OUString aPath( rPath );
2085  rtl::Bootstrap::expandMacros( aPath );
2086 
2087  // import the image
2088  Graphic aGraphic;
2089  if ( GraphicFilter::LoadGraphic( aPath, OUString(), aGraphic ) != ERRCODE_NONE )
2090  return BitmapEx();
2091  return aGraphic.GetBitmapEx();
2092 }
2093 
2095 
2097 static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, boost::optional<Color>& rMenuBarTextColor )
2098 {
2099  uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
2100  if ( !xContext.is() )
2101  return;
2102 
2103  // don't burn time loading images we don't need.
2105  return;
2106 
2107  // read from the configuration
2108  OUString aPersona( officecfg::Office::Common::Misc::Persona::get( xContext ) );
2109  OUString aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get( xContext ) );
2110 
2111  // have the settings changed? marks if header /footer prepared before
2112  //should maybe extended to a flag that marks if header /footer /both are loaded
2113  OUString aOldValue= eWhich==PERSONA_HEADER?OUString(aPersona + ";" + aPersonaSettings+";h" ):OUString(aPersona + ";" + aPersonaSettings+";f" );
2114  if ( rHeaderFooter == aOldValue )
2115  return;
2116 
2117  rHeaderFooter = aOldValue;
2118  rHeaderFooterBitmap = BitmapEx();
2119  rMenuBarTextColor.reset();
2120 
2121  // now read the new values and setup bitmaps
2122  OUString aHeader, aFooter;
2123  if ( aPersona == "own" || aPersona == "default" )
2124  {
2125  sal_Int32 nIndex = 0;
2126 
2127  // Skip the persona slug, name, and preview
2128  aHeader = aPersonaSettings.getToken( 3, ';', nIndex );
2129 
2130  if ( nIndex > 0 )
2131  aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
2132 
2133  // change menu text color, advance nIndex to skip the '#'
2134  if ( nIndex > 0 )
2135  {
2136  OUString aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
2137  rMenuBarTextColor = Color( aColor.toUInt32( 16 ) );
2138  }
2139  }
2140 
2141  OUString aName;
2142  switch ( eWhich ) {
2143  case PERSONA_HEADER: aName = aHeader; break;
2144  case PERSONA_FOOTER: aName = aFooter; break;
2145  }
2146 
2147  if ( !aName.isEmpty() )
2148  {
2149  OUString gallery("");
2150  // try the gallery first, then the program path:
2151  if ( aPersona == "own" && !aPersonaSettings.startsWith( "vnd.sun.star.expand" ) )
2152  {
2153  gallery = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
2154  rtl::Bootstrap::expandMacros( gallery );
2155  gallery += "/user/gallery/personas/";
2156  }
2157  else if ( aPersona == "default" )
2158  {
2159  gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/";
2160  }
2161  rHeaderFooterBitmap = readBitmapEx( gallery + aName );
2162 
2163  if ( rHeaderFooterBitmap.IsEmpty() )
2164  rHeaderFooterBitmap = readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" + aName );
2165  }
2166 
2167  // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
2168 
2169  if( rHeaderFooterBitmap.IsEmpty() )
2170  {
2171  std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
2172  officecfg::Office::Common::Misc::Persona::set( "no", batch );
2173  officecfg::Office::Common::Misc::PersonaSettings::set( "", batch );
2174  batch->commit();
2175  }
2176 }
2177 
2179 {
2180  setupPersonaHeaderFooter( PERSONA_HEADER, mxData->maPersonaHeaderFooter, mxData->maPersonaHeaderBitmap, mxData->maPersonaMenuBarTextColor );
2181  return mxData->maPersonaHeaderBitmap;
2182 }
2183 
2185 {
2186  setupPersonaHeaderFooter( PERSONA_FOOTER, mxData->maPersonaHeaderFooter, mxData->maPersonaFooterBitmap, mxData->maPersonaMenuBarTextColor );
2187  return mxData->maPersonaFooterBitmap;
2188 }
2189 
2191 {
2192  GetPersonaHeader();
2193  return mxData->maPersonaMenuBarTextColor;
2194 }
2195 
2197 {
2198  CopyData();
2199  mxData->SetStandardStyles();
2200 }
2201 
2203 {
2204  // compute a brighter face color that can be used in gradients
2205  // for a convex look (eg toolbars)
2206 
2207  sal_uInt16 h, s, b;
2208  GetFaceColor().RGBtoHSB( h, s, b );
2209  if( s > 1) s=1;
2210  if( b < 98) b=98;
2211  return Color::HSBtoRGB( h, s, b );
2212 }
2213 
2215 {
2216  // compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
2217  sal_uInt16 h, s, b;
2218  GetShadowColor().RGBtoHSB( h, s, b );
2219  b += b/4;
2220  s -= s/4;
2221  return Color::HSBtoRGB( h, s, b );
2222 }
2223 
2225 {
2226  // copy if other references exist
2227  if (mxData.use_count() > 1)
2228  {
2229  mxData = std::make_shared<ImplStyleData>(*mxData);
2230  }
2231 }
2232 
2234 {
2235  if ( mxData == rSet.mxData )
2236  return true;
2237 
2238  if (mxData->mIconTheme != rSet.mxData->mIconTheme) {
2239  return false;
2240  }
2241 
2242  if (*mxData->mIconThemeSelector != *rSet.mxData->mIconThemeSelector) {
2243  return false;
2244  }
2245 
2246  return (mxData->mnOptions == rSet.mxData->mnOptions) &&
2247  (mxData->mbAutoMnemonic == rSet.mxData->mbAutoMnemonic) &&
2248  (mxData->mnDragFullOptions == rSet.mxData->mnDragFullOptions) &&
2249  (mxData->mnSelectionOptions == rSet.mxData->mnSelectionOptions) &&
2250  (mxData->mnDisplayOptions == rSet.mxData->mnDisplayOptions) &&
2251  (mxData->mnCursorSize == rSet.mxData->mnCursorSize) &&
2252  (mxData->mnCursorBlinkTime == rSet.mxData->mnCursorBlinkTime) &&
2253  (mxData->mnTitleHeight == rSet.mxData->mnTitleHeight) &&
2254  (mxData->mnFloatTitleHeight == rSet.mxData->mnFloatTitleHeight) &&
2255  (mxData->mnScrollBarSize == rSet.mxData->mnScrollBarSize) &&
2256  (mxData->mnMinThumbSize == rSet.mxData->mnMinThumbSize) &&
2257  (mxData->mnSpinSize == rSet.mxData->mnSpinSize) &&
2258  (mxData->mnAntialiasedMin == rSet.mxData->mnAntialiasedMin) &&
2259  (mxData->mbHighContrast == rSet.mxData->mbHighContrast) &&
2260  (mxData->mbUseSystemUIFonts == rSet.mxData->mbUseSystemUIFonts) &&
2261  (mxData->mbUseFontAAFromSystem == rSet.mxData->mbUseFontAAFromSystem) &&
2262  (mxData->mnUseFlatBorders == rSet.mxData->mnUseFlatBorders) &&
2263  (mxData->mnUseFlatMenus == rSet.mxData->mnUseFlatMenus) &&
2264  (mxData->maFaceColor == rSet.mxData->maFaceColor) &&
2265  (mxData->maCheckedColor == rSet.mxData->maCheckedColor) &&
2266  (mxData->maLightColor == rSet.mxData->maLightColor) &&
2267  (mxData->maLightBorderColor == rSet.mxData->maLightBorderColor) &&
2268  (mxData->maShadowColor == rSet.mxData->maShadowColor) &&
2269  (mxData->maDarkShadowColor == rSet.mxData->maDarkShadowColor) &&
2270  (mxData->maButtonTextColor == rSet.mxData->maButtonTextColor) &&
2271  (mxData->maDefaultActionButtonTextColor == rSet.mxData->maDefaultActionButtonTextColor) &&
2272  (mxData->maActionButtonTextColor == rSet.mxData->maActionButtonTextColor) &&
2273  (mxData->maButtonRolloverTextColor == rSet.mxData->maButtonRolloverTextColor) &&
2274  (mxData->maActionButtonRolloverTextColor == rSet.mxData->maActionButtonRolloverTextColor) &&
2275  (mxData->maRadioCheckTextColor == rSet.mxData->maRadioCheckTextColor) &&
2276  (mxData->maGroupTextColor == rSet.mxData->maGroupTextColor) &&
2277  (mxData->maLabelTextColor == rSet.mxData->maLabelTextColor) &&
2278  (mxData->maWindowColor == rSet.mxData->maWindowColor) &&
2279  (mxData->maWindowTextColor == rSet.mxData->maWindowTextColor) &&
2280  (mxData->maDialogColor == rSet.mxData->maDialogColor) &&
2281  (mxData->maDialogTextColor == rSet.mxData->maDialogTextColor) &&
2282  (mxData->maWorkspaceColor == rSet.mxData->maWorkspaceColor) &&
2283  (mxData->maMonoColor == rSet.mxData->maMonoColor) &&
2284  (mxData->maFieldColor == rSet.mxData->maFieldColor) &&
2285  (mxData->maFieldTextColor == rSet.mxData->maFieldTextColor) &&
2286  (mxData->maActiveColor == rSet.mxData->maActiveColor) &&
2287  (mxData->maActiveTextColor == rSet.mxData->maActiveTextColor) &&
2288  (mxData->maActiveBorderColor == rSet.mxData->maActiveBorderColor) &&
2289  (mxData->maDeactiveColor == rSet.mxData->maDeactiveColor) &&
2290  (mxData->maDeactiveTextColor == rSet.mxData->maDeactiveTextColor) &&
2291  (mxData->maDeactiveBorderColor == rSet.mxData->maDeactiveBorderColor) &&
2292  (mxData->maMenuColor == rSet.mxData->maMenuColor) &&
2293  (mxData->maMenuBarColor == rSet.mxData->maMenuBarColor) &&
2294  (mxData->maMenuBarRolloverColor == rSet.mxData->maMenuBarRolloverColor) &&
2295  (mxData->maMenuBorderColor == rSet.mxData->maMenuBorderColor) &&
2296  (mxData->maMenuTextColor == rSet.mxData->maMenuTextColor) &&
2297  (mxData->maMenuBarTextColor == rSet.mxData->maMenuBarTextColor) &&
2298  (mxData->maMenuBarRolloverTextColor == rSet.mxData->maMenuBarRolloverTextColor) &&
2299  (mxData->maMenuHighlightColor == rSet.mxData->maMenuHighlightColor) &&
2300  (mxData->maMenuHighlightTextColor == rSet.mxData->maMenuHighlightTextColor) &&
2301  (mxData->maHighlightColor == rSet.mxData->maHighlightColor) &&
2302  (mxData->maHighlightTextColor == rSet.mxData->maHighlightTextColor) &&
2303  (mxData->maTabTextColor == rSet.mxData->maTabTextColor) &&
2304  (mxData->maTabRolloverTextColor == rSet.mxData->maTabRolloverTextColor) &&
2305  (mxData->maTabHighlightTextColor == rSet.mxData->maTabHighlightTextColor) &&
2306  (mxData->maActiveTabColor == rSet.mxData->maActiveTabColor) &&
2307  (mxData->maInactiveTabColor == rSet.mxData->maInactiveTabColor) &&
2308  (mxData->maDisableColor == rSet.mxData->maDisableColor) &&
2309  (mxData->maHelpColor == rSet.mxData->maHelpColor) &&
2310  (mxData->maHelpTextColor == rSet.mxData->maHelpTextColor) &&
2311  (mxData->maLinkColor == rSet.mxData->maLinkColor) &&
2312  (mxData->maVisitedLinkColor == rSet.mxData->maVisitedLinkColor) &&
2313  (mxData->maToolTextColor == rSet.mxData->maToolTextColor) &&
2314  (mxData->maHighlightLinkColor == rSet.mxData->maHighlightLinkColor) &&
2315  (mxData->maAppFont == rSet.mxData->maAppFont) &&
2316  (mxData->maHelpFont == rSet.mxData->maHelpFont) &&
2317  (mxData->maTitleFont == rSet.mxData->maTitleFont) &&
2318  (mxData->maFloatTitleFont == rSet.mxData->maFloatTitleFont) &&
2319  (mxData->maMenuFont == rSet.mxData->maMenuFont) &&
2320  (mxData->maToolFont == rSet.mxData->maToolFont) &&
2321  (mxData->maGroupFont == rSet.mxData->maGroupFont) &&
2322  (mxData->maLabelFont == rSet.mxData->maLabelFont) &&
2323  (mxData->maRadioCheckFont == rSet.mxData->maRadioCheckFont) &&
2324  (mxData->maPushButtonFont == rSet.mxData->maPushButtonFont) &&
2325  (mxData->maFieldFont == rSet.mxData->maFieldFont) &&
2326  (mxData->maIconFont == rSet.mxData->maIconFont) &&
2327  (mxData->maTabFont == rSet.mxData->maTabFont) &&
2328  (mxData->meUseImagesInMenus == rSet.mxData->meUseImagesInMenus) &&
2329  (mxData->mbPreferredUseImagesInMenus == rSet.mxData->mbPreferredUseImagesInMenus) &&
2330  (mxData->mbSkipDisabledInMenus == rSet.mxData->mbSkipDisabledInMenus) &&
2331  (mxData->mbHideDisabledMenuItems == rSet.mxData->mbHideDisabledMenuItems) &&
2332  (mxData->mbPreferredContextMenuShortcuts == rSet.mxData->mbPreferredContextMenuShortcuts)&&
2333  (mxData->meContextMenuShortcuts == rSet.mxData->meContextMenuShortcuts) &&
2334  (mxData->mbPrimaryButtonWarpsSlider == rSet.mxData->mbPrimaryButtonWarpsSlider) &&
2335  (mxData->maFontColor == rSet.mxData->maFontColor) &&
2336  (mxData->mnEdgeBlending == rSet.mxData->mnEdgeBlending) &&
2337  (mxData->maEdgeBlendingTopLeftColor == rSet.mxData->maEdgeBlendingTopLeftColor) &&
2338  (mxData->maEdgeBlendingBottomRightColor == rSet.mxData->maEdgeBlendingBottomRightColor) &&
2339  (mxData->mnListBoxMaximumLineCount == rSet.mxData->mnListBoxMaximumLineCount) &&
2340  (mxData->mnColorValueSetColumnCount == rSet.mxData->mnColorValueSetColumnCount) &&
2341  (mxData->maListBoxPreviewDefaultLogicSize == rSet.mxData->maListBoxPreviewDefaultLogicSize) &&
2342  (mxData->maListBoxPreviewDefaultPixelSize == rSet.mxData->maListBoxPreviewDefaultPixelSize) &&
2343  (mxData->mbPreviewUsesCheckeredBackground == rSet.mxData->mbPreviewUsesCheckeredBackground);
2344 }
2345 
2347  mnEnableATT(TRISTATE_INDET),
2348  mnDisablePrinting(TRISTATE_INDET)
2349 {
2350  static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
2351  mbEnableLocalizedDecimalSep = (pEnv != nullptr);
2352 }
2353 
2355  : mxData(std::make_shared<ImplMiscData>())
2356 {
2357 }
2358 
2359 bool MiscSettings::operator ==( const MiscSettings& rSet ) const
2360 {
2361  if ( mxData == rSet.mxData )
2362  return true;
2363 
2364  return (mxData->mnEnableATT == rSet.mxData->mnEnableATT ) &&
2365  (mxData->mnDisablePrinting == rSet.mxData->mnDisablePrinting ) &&
2366  (mxData->mbEnableLocalizedDecimalSep == rSet.mxData->mbEnableLocalizedDecimalSep );
2367 }
2368 
2369 bool
2371 {
2372  return !(*this == rSet);
2373 }
2374 
2376 {
2377  if( mxData->mnDisablePrinting == TRISTATE_INDET )
2378  {
2379  OUString aEnable =
2381  getValue( "DesktopManagement",
2382  "DisablePrinting" );
2383  mxData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2384  }
2385 
2386  return mxData->mnDisablePrinting != TRISTATE_FALSE;
2387 }
2388 
2390 {
2391 
2392 #ifdef _WIN32
2393  if( mxData->mnEnableATT == TRISTATE_INDET )
2394  {
2395  // Check in the Windows registry if an AT tool wants Accessibility support to
2396  // be activated ..
2397  HKEY hkey;
2398 
2399  if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2400  L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2401  &hkey) )
2402  {
2403  DWORD dwType;
2404  wchar_t Data[6]; // possible values: "true", "false", "1", "0", DWORD
2405  DWORD cbData = sizeof(Data);
2406 
2407  if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2408  nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2409  {
2410  switch (dwType)
2411  {
2412  case REG_SZ:
2413  mxData->mnEnableATT = ((0 == wcsicmp(Data, L"1")) || (0 == wcsicmp(Data, L"true"))) ? TRISTATE_TRUE : TRISTATE_FALSE;
2414  break;
2415  case REG_DWORD:
2416  switch (reinterpret_cast<DWORD *>(Data)[0]) {
2417  case 0:
2418  mxData->mnEnableATT = TRISTATE_FALSE;
2419  break;
2420  case 1:
2421  mxData->mnEnableATT = TRISTATE_TRUE;
2422  break;
2423  default:
2424  mxData->mnEnableATT = TRISTATE_INDET;
2425  //TODO: or TRISTATE_TRUE?
2426  break;
2427  }
2428  break;
2429  default:
2430  // Unsupported registry type
2431  break;
2432  }
2433  }
2434 
2435  RegCloseKey(hkey);
2436  }
2437  }
2438 #endif
2439 
2440  if( mxData->mnEnableATT == TRISTATE_INDET )
2441  {
2442  static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
2443  if( !pEnv || !*pEnv )
2444  {
2445  OUString aEnable =
2447  getValue( "Accessibility",
2448  "EnableATToolSupport" );
2449  mxData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2450  }
2451  else
2452  {
2453  mxData->mnEnableATT = TRISTATE_TRUE;
2454  }
2455  }
2456 
2457  return mxData->mnEnableATT != TRISTATE_FALSE;
2458 }
2459 
2460 #ifdef _WIN32
2461 void MiscSettings::SetEnableATToolSupport( bool bEnable )
2462 {
2463  if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mxData->mnEnableATT )
2464  {
2465  if( bEnable && !ImplInitAccessBridge() )
2466  return;
2467 
2468  HKEY hkey;
2469 
2470  // If the accessibility key in the Windows registry exists, change it synchronously
2471  if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2472  L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2473  &hkey) )
2474  {
2475  DWORD dwType;
2476  wchar_t Data[6]; // possible values: "true", "false", 1, 0
2477  DWORD cbData = sizeof(Data);
2478 
2479  if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2480  nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2481  {
2482  switch (dwType)
2483  {
2484  case REG_SZ:
2485  RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2486  0, dwType,
2487  reinterpret_cast<const BYTE*>(bEnable ? L"true" : L"false"),
2488  bEnable ? sizeof(L"true") : sizeof(L"false"));
2489  break;
2490  case REG_DWORD:
2491  reinterpret_cast<DWORD *>(Data)[0] = bEnable ? 1 : 0;
2492  RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2493  0, dwType, reinterpret_cast<const BYTE*>(Data), sizeof(DWORD));
2494  break;
2495  default:
2496  // Unsupported registry type
2497  break;
2498  }
2499  }
2500 
2501  RegCloseKey(hkey);
2502  }
2503 
2505  setValue( "Accessibility",
2506  "EnableATToolSupport",
2507  bEnable ? OUString("true") : OUString("false" ) );
2508  mxData->mnEnableATT = bEnable ? TRISTATE_TRUE : TRISTATE_FALSE;
2509  }
2510 }
2511 #endif
2512 
2514 {
2515  // copy if other references exist
2516  if (mxData.use_count() > 1)
2517  {
2518  mxData = std::make_shared<ImplMiscData>(*mxData);
2519  }
2520  mxData->mbEnableLocalizedDecimalSep = bEnable;
2521 }
2522 
2524 {
2525  return mxData->mbEnableLocalizedDecimalSep;
2526 }
2527 
2529  : mxData(std::make_shared<ImplHelpData>())
2530 {
2531 }
2532 
2533 bool HelpSettings::operator ==( const HelpSettings& rSet ) const
2534 {
2535  if ( mxData == rSet.mxData )
2536  return true;
2537 
2538  return (mxData->mnTipTimeout == rSet.mxData->mnTipTimeout );
2539 }
2540 
2541 sal_uLong
2543 {
2544  return 500;
2545 }
2546 
2547 void
2549 {
2550  // copy if other references exist
2551  if (mxData.use_count() > 1)
2552  {
2553  mxData = std::make_shared<ImplHelpData>(*mxData);
2554  }
2555  mxData->mnTipTimeout = nTipTimeout;
2556 }
2557 
2558 sal_uLong
2560 {
2561  return mxData->mnTipTimeout;
2562 }
2563 
2564 sal_uLong
2566 {
2567  return 1500;
2568 }
2569 
2570 bool
2572 {
2573  return !(*this == rSet);
2574 }
2575 
2577  :
2578  maLocale( LANGUAGE_SYSTEM ),
2579  maUILocale( LANGUAGE_SYSTEM )
2580 {
2583 }
2584 
2586  maMouseSettings( rData.maMouseSettings ),
2587  maStyleSettings( rData.maStyleSettings ),
2588  maMiscSettings( rData.maMiscSettings ),
2589  maHelpSettings( rData.maHelpSettings ),
2590  maLocale( rData.maLocale ),
2591  maUILocale( rData.maUILocale )
2592 {
2593  // Create the cache objects new when their getter is called.
2594 }
2595 
2597 {
2598  mpLocaleDataWrapper.reset();
2599  mpUILocaleDataWrapper.reset();
2600  mpI18nHelper.reset();
2601  mpUII18nHelper.reset();
2602 }
2603 
2605  : mxData(std::make_shared<ImplAllSettingsData>())
2606 {
2607 }
2608 
2610 {
2611  // copy if other references exist
2612  if (mxData.use_count() > 1)
2613  {
2614  mxData = std::make_shared<ImplAllSettingsData>(*mxData);
2615  }
2616 
2617 }
2618 
2620 {
2621 
2623 
2624  if ( nFlags & AllSettingsFlags::MOUSE )
2625  {
2626  if ( mxData->maMouseSettings != rSet.mxData->maMouseSettings )
2627  {
2628  CopyData();
2629  mxData->maMouseSettings = rSet.mxData->maMouseSettings;
2630  nChangeFlags |= AllSettingsFlags::MOUSE;
2631  }
2632  }
2633 
2634  if ( nFlags & AllSettingsFlags::STYLE )
2635  {
2636  if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2637  {
2638  CopyData();
2639  mxData->maStyleSettings = rSet.mxData->maStyleSettings;
2640  nChangeFlags |= AllSettingsFlags::STYLE;
2641  }
2642  }
2643 
2644  if ( nFlags & AllSettingsFlags::MISC )
2645  {
2646  if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2647  {
2648  CopyData();
2649  mxData->maMiscSettings = rSet.mxData->maMiscSettings;
2650  nChangeFlags |= AllSettingsFlags::MISC;
2651  }
2652  }
2653 
2654  if ( nFlags & AllSettingsFlags::LOCALE )
2655  {
2656  if ( mxData->maLocale != rSet.mxData->maLocale )
2657  {
2658  SetLanguageTag( rSet.mxData->maLocale );
2659  nChangeFlags |= AllSettingsFlags::LOCALE;
2660  }
2661  }
2662 
2663  return nChangeFlags;
2664 }
2665 
2667 {
2668 
2670 
2671  if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2672  nChangeFlags |= AllSettingsFlags::STYLE;
2673 
2674  if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2675  nChangeFlags |= AllSettingsFlags::MISC;
2676 
2677  if ( mxData->maLocale != rSet.mxData->maLocale )
2678  nChangeFlags |= AllSettingsFlags::LOCALE;
2679 
2680  return nChangeFlags;
2681 }
2682 
2683 bool AllSettings::operator ==( const AllSettings& rSet ) const
2684 {
2685  if ( mxData == rSet.mxData )
2686  return true;
2687 
2688  if ( (mxData->maMouseSettings == rSet.mxData->maMouseSettings) &&
2689  (mxData->maStyleSettings == rSet.mxData->maStyleSettings) &&
2690  (mxData->maMiscSettings == rSet.mxData->maMiscSettings) &&
2691  (mxData->maHelpSettings == rSet.mxData->maHelpSettings) &&
2692  (mxData->maLocale == rSet.mxData->maLocale) )
2693  {
2694  return true;
2695  }
2696 
2697  return false;
2698 }
2699 
2700 void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag )
2701 {
2702  if (mxData->maLocale != rLanguageTag)
2703  {
2704  CopyData();
2705 
2706  mxData->maLocale = rLanguageTag;
2707 
2708  if ( mxData->mpLocaleDataWrapper )
2709  {
2710  mxData->mpLocaleDataWrapper.reset();
2711  }
2712  if ( mxData->mpI18nHelper )
2713  {
2714  mxData->mpI18nHelper.reset();
2715  }
2716  }
2717 }
2718 
2719 namespace
2720 {
2721  bool GetConfigLayoutRTL(bool bMath)
2722  {
2723  static const char* pEnv = getenv("SAL_RTL_ENABLED" );
2724  static int nUIMirroring = -1; // -1: undef, 0: auto, 1: on 2: off
2725 
2726  // environment always overrides
2727  if( pEnv )
2728  return true;
2729 
2730  bool bRTL = false;
2731 
2732  if( nUIMirroring == -1 )
2733  {
2734  nUIMirroring = 0; // ask configuration only once
2737  "org.openoffice.Office.Common/I18N/CTL" ); // note: case sensitive !
2738  if ( aNode.isValid() )
2739  {
2740  bool bTmp = bool();
2741  css::uno::Any aValue = aNode.getNodeValue( "UIMirroring" );
2742  if( aValue >>= bTmp )
2743  {
2744  // found true or false; if it was nil, nothing is changed
2745  nUIMirroring = bTmp ? 1 : 2;
2746  }
2747  }
2748  }
2749 
2750  if( nUIMirroring == 0 ) // no config found (eg, setup) or default (nil) was set: check language
2751  {
2753  if (bMath)
2754  bRTL = MsLangId::isRightToLeftMath( aLang );
2755  else
2756  bRTL = MsLangId::isRightToLeft( aLang );
2757  }
2758  else
2759  bRTL = (nUIMirroring == 1);
2760 
2761  return bRTL;
2762  }
2763 }
2764 
2766 {
2768  return false;
2769  return GetConfigLayoutRTL(false);
2770 }
2771 
2773 {
2775  return false;
2776  return GetConfigLayoutRTL(true);
2777 }
2778 
2780 {
2782  {
2783  static LanguageTag aRet("en-US");
2784  return aRet;
2785  }
2786 
2789 
2790  // SYSTEM locale means: use settings from SvtSysLocale that is resolved
2791  if ( mxData->maLocale.isSystemLocale() )
2792  mxData->maLocale = mxData->maSysLocale.GetLanguageTag();
2793 
2794  return mxData->maLocale;
2795 }
2796 
2798 {
2800  {
2801  static LanguageTag aRet("en-US");
2802  return aRet;
2803  }
2804 
2807 
2808  // the UILocale is never changed
2809  if ( mxData->maUILocale.isSystemLocale() )
2810  mxData->maUILocale = mxData->maSysLocale.GetUILanguageTag();
2811 
2812  return mxData->maUILocale;
2813 }
2814 
2816 {
2817  if ( !mxData->mpLocaleDataWrapper )
2818  const_cast<AllSettings*>(this)->mxData->mpLocaleDataWrapper.reset( new LocaleDataWrapper(
2820  return *mxData->mpLocaleDataWrapper;
2821 }
2822 
2824 {
2825  if ( !mxData->mpUILocaleDataWrapper )
2826  const_cast<AllSettings*>(this)->mxData->mpUILocaleDataWrapper.reset( new LocaleDataWrapper(
2828  return *mxData->mpUILocaleDataWrapper;
2829 }
2830 
2832 {
2833  if ( !mxData->mpI18nHelper ) {
2834  const_cast<AllSettings*>(this)->mxData->mpI18nHelper.reset( new vcl::I18nHelper(
2836  }
2837  return *mxData->mpI18nHelper;
2838 }
2839 
2841 {
2842  if ( !mxData->mpUII18nHelper ) {
2843  const_cast<AllSettings*>(this)->mxData->mpUII18nHelper.reset( new vcl::I18nHelper(
2845  }
2846  return *mxData->mpUII18nHelper;
2847 }
2848 
2850 {
2851  AllSettings aAllSettings( Application::GetSettings() );
2852  if ( nHint & ConfigurationHints::DecSep )
2853  {
2854  MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
2855  bool bIsDecSepAsLocale = aAllSettings.mxData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale();
2856  if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale )
2857  {
2858  aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale );
2859  aAllSettings.SetMiscSettings( aMiscSettings );
2860  }
2861  }
2862 
2863  if ( nHint & ConfigurationHints::Locale )
2864  aAllSettings.SetLanguageTag( aAllSettings.mxData->maSysLocale.GetOptions().GetLanguageTag() );
2865 
2866  Application::SetSettings( aAllSettings );
2867 }
2868 
2869 const StyleSettings&
2871 {
2872  return mxData->maStyleSettings;
2873 }
2874 
2877 {
2878  return mxData->mnOptions;
2879 }
2880 
2881 std::vector<vcl::IconThemeInfo> const &
2883 {
2884  if (!mxData->mIconThemeScanner) {
2886  }
2887  return mxData->mIconThemeScanner->GetFoundIconThemes();
2888 }
2889 
2890 /*static*/ OUString
2892 {
2893  OUString desktopEnvironment = Application::GetDesktopEnvironment();
2894  if (!mxData->mIconThemeScanner) {
2896  }
2897  OUString themeName = mxData->mIconThemeSelector->SelectIconThemeForDesktopEnvironment(
2898  mxData->mIconThemeScanner->GetFoundIconThemes(),
2899  desktopEnvironment
2900  );
2901  return themeName;
2902 }
2903 
2904 void
2905 StyleSettings::SetIconTheme(const OUString& theme)
2906 {
2907  CopyData();
2908  mxData->mIconTheme = theme;
2909 }
2910 
2911 OUString
2913 {
2914  OUString sTheme(mxData->mIconTheme);
2915  if (sTheme.isEmpty())
2916  {
2918  sTheme = "colibre";
2919  else
2920  {
2921  // read from the configuration, or fallback to what the desktop wants
2922  uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
2923  if (xContext.is())
2924  {
2925  sTheme = officecfg::Office::Common::Misc::SymbolStyle::get(xContext);
2926 
2927  if (sTheme.isEmpty() || sTheme == "auto")
2929  }
2930  }
2931  }
2932 
2933  if (!mxData->mIconThemeScanner) {
2935  }
2936  OUString r = mxData->mIconThemeSelector->SelectIconTheme(
2937  mxData->mIconThemeScanner->GetFoundIconThemes(),
2938  sTheme);
2939  return r;
2940 }
2941 
2942 void
2944 {
2945  if (mxData->mbHighContrast == bHighContrast) {
2946  return;
2947  }
2948 
2949  CopyData();
2950  mxData->mbHighContrast = bHighContrast;
2951  mxData->mIconThemeSelector->SetUseHighContrastTheme(bHighContrast);
2952 }
2953 
2954 bool
2956 {
2957  return mxData->mbHighContrast;
2958 }
2959 
2960 void
2961 StyleSettings::SetPreferredIconTheme(const OUString& theme, bool bDarkIconTheme)
2962 {
2963  mxData->mIconThemeSelector->SetPreferredIconTheme(theme, bDarkIconTheme);
2964 }
2965 
2966 void
2968 {
2969  CopyData();
2970  mxData->maMouseSettings = rSet;
2971 }
2972 
2973 const MouseSettings&
2975 {
2976  return mxData->maMouseSettings;
2977 }
2978 
2979 void
2981 {
2982  CopyData();
2983  mxData->maStyleSettings = rSet;
2984 }
2985 
2986 void
2988 {
2989  CopyData();
2990  mxData->maMiscSettings = rSet;
2991 }
2992 
2993 const MiscSettings&
2995 {
2996  return mxData->maMiscSettings;
2997 }
2998 
2999 void
3001 {
3002  CopyData();
3003  mxData->maHelpSettings = rSet;
3004 }
3005 
3006 const HelpSettings&
3008 {
3009  return mxData->maHelpSettings;
3010 }
3011 
3012 bool
3014 {
3015  return !(*this == rSet);
3016 }
3017 
3018 SvtSysLocale&
3020 {
3021  return mxData->maSysLocale;
3022 }
3023 
3024 
3026  bool bCheckedColorSpecialCase )
3027 {
3028  Set3DColors( aBackColor );
3029  SetFaceColor( aBackColor );
3030  SetDialogColor( aBackColor );
3031  SetWorkspaceColor( aBackColor );
3032 
3033  if (bCheckedColorSpecialCase)
3035 }
3036 
3038  const vcl::Font& aLabelFont )
3039 {
3040  SetAppFont( aAppFont );
3041  SetPushButtonFont( aAppFont );
3042  SetToolFont( aAppFont );
3043  SetHelpFont( aAppFont );
3044 
3045  SetMenuFont( aLabelFont );
3046  SetTabFont( aLabelFont );
3047  SetLabelFont( aLabelFont );
3048  SetRadioCheckFont( aLabelFont );
3049  SetFieldFont( aLabelFont );
3050  SetGroupFont( aLabelFont );
3051  SetIconFont( aLabelFont );
3052 }
3053 
3054 /* 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
const Color & GetActionButtonTextColor() const
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)
Color maActionButtonTextColor
TriState mnEnableATT
void SetMonoColor(const Color &rColor)
LanguageType getLanguageType(bool bResolveSystem=true) const
StyleSettingsOptions
Definition: settings.hxx:158
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:184
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:704
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:352
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:215
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:129
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 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 SetDefaultActionButtonTextColor(const Color &rColor)
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:1554
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:644
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
Definition: svapp.cxx:1054
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)
long GetMinThumbSize() const
Color maActionButtonRolloverTextColor
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:214
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
vcl::Font maPushButtonFont
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: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:67
#define SAL_CONFIGFILE(name)
Color maAlternatingRowColor
const Color & GetActionButtonRolloverTextColor() const
const vcl::Font & GetPushButtonFont() const
NONE
vcl::Font maGroupFont
void SetActionButtonRolloverTextColor(const Color &rColor)
const Color & GetDisableColor() const
void SetSpinSize(long nSize)
static bool isRightToLeft(LanguageType nLang)
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.
std::shared_ptr< ImplStyleData > mxData
Definition: settings.hxx:221
long GetCursorSize() const
bool GetUseSystemUIFonts() const
const Color & GetMenuBarColor() const
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:610
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:293
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:349
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:661
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:1498
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
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
FAMILY_SWISS
const vcl::Font & GetIconFont() const
ToolbarIconSize
Definition: settings.hxx:206
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:196
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:629
DragFullOptions
Definition: settings.hxx:169
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:609
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