LibreOffice Module vcl (master)  1
app/settings.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <config_folders.h>
21 
22 #include <officecfg/Office/Common.hxx>
23 
24 #ifdef _WIN32
25 #include <win/svsys.h>
26 #endif
27 
29 #include <rtl/bootstrap.hxx>
30 
31 #include <i18nlangtag/mslangid.hxx>
33 
34 #include <comphelper/lok.hxx>
35 
36 #include <vcl/graphicfilter.hxx>
37 #include <IconThemeScanner.hxx>
38 #include <IconThemeSelector.hxx>
39 #include <vcl/IconThemeInfo.hxx>
40 #include <vcl/svapp.hxx>
41 #include <vcl/event.hxx>
42 #include <vcl/settings.hxx>
43 #include <vcl/i18nhelp.hxx>
44 #include <configsettings.hxx>
45 #include <vcl/outdev.hxx>
46 
47 #include <unotools/fontcfg.hxx>
49 #include <unotools/confignode.hxx>
50 #include <unotools/configmgr.hxx>
51 #include <unotools/syslocale.hxx>
53 
54 using namespace ::com::sun::star;
55 
56 #include <svdata.hxx>
57 
59 {
61  sal_uInt64 mnDoubleClkTime = 500;
62  long mnDoubleClkWidth = 2;
64  long mnStartDragWidth = 2 ;
71 };
72 
74 {
75  ImplStyleData();
77 
78  void SetStandardStyles();
79 
164  sal_uInt64 mnCursorBlinkTime;
183  std::shared_ptr<vcl::IconThemeScanner>
185  std::shared_ptr<vcl::IconThemeSelector>
187 
188  OUString mIconTheme;
193  //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise
194  //primary means scroll by single page. Secondary button takes the alternative behaviour
197 
198  sal_uInt16 mnEdgeBlending;
206 
208 
211  std::optional<Color> maPersonaMenuBarTextColor;
212 };
213 
215 {
216  ImplMiscData();
220 };
221 
223 {
225 };
226 
228 {
232 
239  std::unique_ptr<LocaleDataWrapper> mpLocaleDataWrapper;
240  std::unique_ptr<LocaleDataWrapper> mpUILocaleDataWrapper;
241  std::unique_ptr<vcl::I18nHelper> mpI18nHelper;
242  std::unique_ptr<vcl::I18nHelper> mpUII18nHelper;
244 };
245 
246 void
248 {
249  CopyData();
250  mxData->mnOptions = nOptions;
251 }
252 
255 {
256  return mxData->mnOptions;
257 }
258 
259 void
260 MouseSettings::SetDoubleClickTime( sal_uInt64 nDoubleClkTime )
261 {
262  CopyData();
263  mxData->mnDoubleClkTime = nDoubleClkTime;
264 }
265 
266 sal_uInt64
268 {
269  return mxData->mnDoubleClkTime;
270 }
271 
272 void
273 MouseSettings::SetDoubleClickWidth( long nDoubleClkWidth )
274 {
275  CopyData();
276  mxData->mnDoubleClkWidth = nDoubleClkWidth;
277 }
278 
279 long
281 {
282  return mxData->mnDoubleClkWidth;
283 }
284 
285 void
286 MouseSettings::SetDoubleClickHeight( long nDoubleClkHeight )
287 {
288  CopyData();
289  mxData->mnDoubleClkHeight = nDoubleClkHeight;
290 }
291 
292 long
294 {
295  return mxData->mnDoubleClkHeight;
296 }
297 
298 void
300 {
301  CopyData();
302  mxData->mnStartDragWidth = nDragWidth;
303 }
304 
305 long
307 {
308  return mxData->mnStartDragWidth;
309 }
310 
311 void
313 {
314  CopyData();
315  mxData->mnStartDragHeight = nDragHeight;
316 }
317 
318 long
320 {
321  return mxData->mnStartDragHeight;
322 }
323 
324 sal_uInt16
326 {
327  return MOUSE_LEFT;
328 }
329 
330 sal_uInt16
332 {
333  return MOUSE_RIGHT;
334 }
335 
336 sal_uInt16
338 {
339  return 1;
340 }
341 
342 sal_uLong
344 {
345  return 100;
346 }
347 
348 sal_uLong
350 {
351  return 370;
352 }
353 
354 void
356 {
357  CopyData();
358  mxData->mnButtonRepeat = nRepeat;
359 }
360 
361 sal_uLong
363 {
364  return mxData->mnButtonRepeat;
365 }
366 
367 sal_uLong
369 {
370  return 250;
371 }
372 
373 void
375 {
376  CopyData();
377  mxData->mnMenuDelay = nDelay;
378 }
379 
380 sal_uLong
382 {
383  return mxData->mnMenuDelay;
384 }
385 
386 void
388 {
389  CopyData();
390  mxData->mnFollow = nFollow;
391 }
392 
395 {
396  return mxData->mnFollow;
397 }
398 
399 void
401 {
402  CopyData();
403  mxData->mnMiddleButtonAction = nAction;
404 }
405 
408 {
409  return mxData->mnMiddleButtonAction;
410 }
411 
412 void
414 {
415  CopyData();
416  mxData->mnWheelBehavior = nBehavior;
417 }
418 
421 {
422  return mxData->mnWheelBehavior;
423 }
424 
425 bool
427 {
428  return !(*this == rSet);
429 }
430 
432  : mxData(std::make_shared<ImplMouseData>())
433 {
434 }
435 
437 {
438  // copy if other references exist
439  if (mxData.use_count() > 1)
440  {
441  mxData = std::make_shared<ImplMouseData>(*mxData);
442  }
443 }
444 
445 bool MouseSettings::operator ==( const MouseSettings& rSet ) const
446 {
447  if ( mxData == rSet.mxData )
448  return true;
449 
450  return
451  (mxData->mnOptions == rSet.mxData->mnOptions) &&
452  (mxData->mnDoubleClkTime == rSet.mxData->mnDoubleClkTime) &&
453  (mxData->mnDoubleClkWidth == rSet.mxData->mnDoubleClkWidth) &&
454  (mxData->mnDoubleClkHeight == rSet.mxData->mnDoubleClkHeight) &&
455  (mxData->mnStartDragWidth == rSet.mxData->mnStartDragWidth) &&
456  (mxData->mnStartDragHeight == rSet.mxData->mnStartDragHeight) &&
457  (mxData->mnMiddleButtonAction == rSet.mxData->mnMiddleButtonAction) &&
458  (mxData->mnButtonRepeat == rSet.mxData->mnButtonRepeat) &&
459  (mxData->mnMenuDelay == rSet.mxData->mnMenuDelay) &&
460  (mxData->mnFollow == rSet.mxData->mnFollow) &&
461  (mxData->mnWheelBehavior == rSet.mxData->mnWheelBehavior );
462 }
463 
465  mnScrollBarSize(16),
466  mnSpinSize(16),
467  mnCursorSize(2),
468  mnAntialiasedMin(0),
469  mnCursorBlinkTime(STYLE_CURSOR_NOBLINKTIME),
470  mnDragFullOptions(DragFullOptions::All),
471  mnSelectionOptions(SelectionOptions::NONE),
472  mnDisplayOptions(DisplayOptions::NONE),
473  mnToolbarIconSize(ToolbarIconSize::Unknown),
474  mnOptions(StyleSettingsOptions::NONE),
475  mbAutoMnemonic(true),
476  meUseImagesInMenus(TRISTATE_INDET),
477  mnMinThumbSize(16),
478  mIconThemeSelector(std::make_shared<vcl::IconThemeSelector>()),
479  meContextMenuShortcuts(TRISTATE_INDET),
480  mnEdgeBlending(35),
481  maEdgeBlendingTopLeftColor(Color(0xC0, 0xC0, 0xC0)),
482  maEdgeBlendingBottomRightColor(Color(0x40, 0x40, 0x40)),
483  mnListBoxMaximumLineCount(25),
484  // For some reason this isn't actually the column count that gets used, at least on iOS, but
485  // instead what SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() in
486  // svtools/source/config/accessibilityoptions.cxx returns.
487  mnColorValueSetColumnCount(12),
488 #ifdef IOS
489  maListBoxPreviewDefaultLogicSize(Size(30, 30)),
490 #else
491  maListBoxPreviewDefaultLogicSize(Size(15, 7)),
492 #endif
493  maListBoxPreviewDefaultPixelSize(Size(0, 0)), // on-demand calculated in GetListBoxPreviewDefaultPixelSize(),
494  mbPreviewUsesCheckeredBackground(true)
495 {
497 }
498 
500  maActiveBorderColor( rData.maActiveBorderColor ),
501  maActiveColor( rData.maActiveColor ),
502  maActiveTextColor( rData.maActiveTextColor ),
503  maAlternatingRowColor( rData.maAlternatingRowColor ),
504  maDefaultButtonTextColor( rData.maDefaultButtonTextColor ),
505  maButtonTextColor( rData.maButtonTextColor ),
506  maDefaultActionButtonTextColor( rData.maDefaultActionButtonTextColor ),
507  maActionButtonTextColor( rData.maActionButtonTextColor ),
508  maFlatButtonTextColor( rData.maFlatButtonTextColor ),
509  maDefaultButtonRolloverTextColor( rData.maDefaultButtonRolloverTextColor ),
510  maButtonRolloverTextColor( rData.maButtonRolloverTextColor ),
511  maDefaultActionButtonRolloverTextColor( rData.maDefaultActionButtonRolloverTextColor ),
512  maActionButtonRolloverTextColor( rData.maActionButtonRolloverTextColor ),
513  maFlatButtonRolloverTextColor( rData.maFlatButtonRolloverTextColor ),
514  maDefaultButtonPressedRolloverTextColor( rData.maDefaultButtonPressedRolloverTextColor ),
515  maButtonPressedRolloverTextColor( rData.maButtonPressedRolloverTextColor ),
516  maDefaultActionButtonPressedRolloverTextColor( rData.maDefaultActionButtonPressedRolloverTextColor ),
517  maActionButtonPressedRolloverTextColor( rData.maActionButtonPressedRolloverTextColor ),
518  maFlatButtonPressedRolloverTextColor( rData.maFlatButtonPressedRolloverTextColor ),
519  maCheckedColor( rData.maCheckedColor ),
520  maDarkShadowColor( rData.maDarkShadowColor ),
521  maDeactiveBorderColor( rData.maDeactiveBorderColor ),
522  maDeactiveColor( rData.maDeactiveColor ),
523  maDeactiveTextColor( rData.maDeactiveTextColor ),
524  maDialogColor( rData.maDialogColor ),
525  maDialogTextColor( rData.maDialogTextColor ),
526  maDisableColor( rData.maDisableColor ),
527  maFaceColor( rData.maFaceColor ),
528  maFieldColor( rData.maFieldColor ),
529  maFieldTextColor( rData.maFieldTextColor ),
530  maFieldRolloverTextColor( rData.maFieldRolloverTextColor ),
531  maFontColor( rData.maFontColor ),
532  maGroupTextColor( rData.maGroupTextColor ),
533  maHelpColor( rData.maHelpColor ),
534  maHelpTextColor( rData.maHelpTextColor ),
535  maHighlightColor( rData.maHighlightColor ),
536  maHighlightLinkColor( rData.maHighlightLinkColor ),
537  maHighlightTextColor( rData.maHighlightTextColor ),
538  maLabelTextColor( rData.maLabelTextColor ),
539  maLightBorderColor( rData.maLightBorderColor ),
540  maLightColor( rData.maLightColor ),
541  maLinkColor( rData.maLinkColor ),
542  maMenuBarColor( rData.maMenuBarColor ),
543  maMenuBarRolloverColor( rData.maMenuBarRolloverColor ),
544  maMenuBorderColor( rData.maMenuBorderColor ),
545  maMenuColor( rData.maMenuColor ),
546  maMenuHighlightColor( rData.maMenuHighlightColor ),
547  maMenuHighlightTextColor( rData.maMenuHighlightTextColor ),
548  maMenuTextColor( rData.maMenuTextColor ),
549  maMenuBarTextColor( rData.maMenuBarTextColor ),
550  maMenuBarRolloverTextColor( rData.maMenuBarRolloverTextColor ),
551  maMenuBarHighlightTextColor( rData.maMenuBarHighlightTextColor ),
552  maMonoColor( rData.maMonoColor ),
553  maRadioCheckTextColor( rData.maRadioCheckTextColor ),
554  maShadowColor( rData.maShadowColor ),
555  maVisitedLinkColor( rData.maVisitedLinkColor ),
556  maToolTextColor( rData.maToolTextColor ),
557  maWindowColor( rData.maWindowColor ),
558  maWindowTextColor( rData.maWindowTextColor ),
559  maWorkspaceColor( rData.maWorkspaceColor ),
560  maActiveTabColor( rData.maActiveTabColor ),
561  maInactiveTabColor( rData.maInactiveTabColor ),
562  maTabTextColor( rData.maTabTextColor ),
563  maTabRolloverTextColor( rData.maTabRolloverTextColor ),
564  maTabHighlightTextColor( rData.maTabHighlightTextColor ),
565  maAppFont( rData.maAppFont ),
566  maHelpFont( rData.maAppFont ),
567  maTitleFont( rData.maTitleFont ),
568  maFloatTitleFont( rData.maFloatTitleFont ),
569  maMenuFont( rData.maMenuFont ),
570  maToolFont( rData.maToolFont ),
571  maLabelFont( rData.maLabelFont ),
572  maRadioCheckFont( rData.maRadioCheckFont ),
573  maPushButtonFont( rData.maPushButtonFont ),
574  maFieldFont( rData.maFieldFont ),
575  maIconFont( rData.maIconFont ),
576  maTabFont( rData.maTabFont ),
577  maGroupFont( rData.maGroupFont ),
578  mnTitleHeight(rData.mnTitleHeight),
579  mnFloatTitleHeight(rData.mnFloatTitleHeight),
580  mnScrollBarSize(rData.mnScrollBarSize),
581  mnSpinSize(rData.mnSpinSize),
582  mnCursorSize(rData.mnCursorSize),
583  mnAntialiasedMin(rData.mnAntialiasedMin),
584  mnCursorBlinkTime(rData.mnCursorBlinkTime),
585  mnDragFullOptions(rData.mnDragFullOptions),
586  mnSelectionOptions(rData.mnSelectionOptions),
587  mnDisplayOptions(rData.mnDisplayOptions),
588  mnToolbarIconSize(rData.mnToolbarIconSize),
589  mnUseFlatMenus(rData.mnUseFlatMenus),
590  mnOptions(rData.mnOptions),
591  mbHighContrast(rData.mbHighContrast),
592  mbUseSystemUIFonts(rData.mbUseSystemUIFonts),
593  mbUseFontAAFromSystem(rData.mbUseFontAAFromSystem),
594  mbAutoMnemonic(rData.mbAutoMnemonic),
595  meUseImagesInMenus(rData.meUseImagesInMenus),
596  mnUseFlatBorders(rData.mnUseFlatBorders),
597  mbPreferredUseImagesInMenus(rData.mbPreferredUseImagesInMenus),
598  mnMinThumbSize(rData.mnMinThumbSize),
599  mIconThemeScanner(rData.mIconThemeScanner?new vcl::IconThemeScanner(*rData.mIconThemeScanner):nullptr),
600  mIconThemeSelector(std::make_shared<vcl::IconThemeSelector>(*rData.mIconThemeSelector)),
601  mIconTheme(rData.mIconTheme),
602  mbSkipDisabledInMenus(rData.mbSkipDisabledInMenus),
603  mbHideDisabledMenuItems(rData.mbHideDisabledMenuItems),
604  mbPreferredContextMenuShortcuts(rData.mbPreferredContextMenuShortcuts),
605  meContextMenuShortcuts(rData.meContextMenuShortcuts),
606  mbPrimaryButtonWarpsSlider(rData.mbPrimaryButtonWarpsSlider),
607  maDialogStyle( rData.maDialogStyle ),
608  mnEdgeBlending(rData.mnEdgeBlending),
609  maEdgeBlendingTopLeftColor(rData.maEdgeBlendingTopLeftColor),
610  maEdgeBlendingBottomRightColor(rData.maEdgeBlendingBottomRightColor),
611  mnListBoxMaximumLineCount(rData.mnListBoxMaximumLineCount),
612  mnColorValueSetColumnCount(rData.mnColorValueSetColumnCount),
613  maListBoxPreviewDefaultLogicSize(rData.maListBoxPreviewDefaultLogicSize),
614  maListBoxPreviewDefaultPixelSize(rData.maListBoxPreviewDefaultPixelSize),
615  mbPreviewUsesCheckeredBackground(rData.mbPreviewUsesCheckeredBackground),
616  maPersonaHeaderFooter( rData.maPersonaHeaderFooter ),
617  maPersonaHeaderBitmap( rData.maPersonaHeaderBitmap ),
618  maPersonaFooterBitmap( rData.maPersonaFooterBitmap ),
619  maPersonaMenuBarTextColor( rData.maPersonaMenuBarTextColor )
620 {
621 }
622 
624 {
625  vcl::Font aStdFont( FAMILY_SWISS, Size( 0, 8 ) );
626  aStdFont.SetCharSet( osl_getThreadTextEncoding() );
627  aStdFont.SetWeight( WEIGHT_NORMAL );
629  aStdFont.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en")));
630  else
631  aStdFont.SetFamilyName("Liberation Sans");
632  maAppFont = aStdFont;
633  maHelpFont = aStdFont;
634  maMenuFont = aStdFont;
635  maToolFont = aStdFont;
636  maGroupFont = aStdFont;
637  maLabelFont = aStdFont;
638  maRadioCheckFont = aStdFont;
639  maPushButtonFont = aStdFont;
640  maFieldFont = aStdFont;
641  maIconFont = aStdFont;
642  maTabFont = aStdFont;
643  aStdFont.SetWeight( WEIGHT_BOLD );
644  maFloatTitleFont = aStdFont;
645  maTitleFont = aStdFont;
646 
648  maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
653 
669 
677  maWorkspaceColor = Color( 0xDF, 0xDF, 0xDE );
706  maHelpColor = Color( 0xFF, 0xFF, 0xE0 );
709  maVisitedLinkColor = Color( 0x00, 0x00, 0xCC );
713  maAlternatingRowColor = Color( 0xEE, 0xEE, 0xEE );
714 
715  mnTitleHeight = 18;
716  mnFloatTitleHeight = 13;
717  mbHighContrast = false;
718  mbUseSystemUIFonts = true;
719  mbUseFontAAFromSystem = true;
720  mnUseFlatBorders = false;
721  mnUseFlatMenus = false;
723  mbSkipDisabledInMenus = false;
724  mbHideDisabledMenuItems = false;
727 }
728 
730  : mxData(std::make_shared<ImplStyleData>())
731 {
732 }
733 
734 void
736 {
737  CopyData();
738  mxData->maFaceColor = rColor;
739 }
740 
741 const Color&
743 {
744  return mxData->maFaceColor;
745 }
746 
747 void
749 {
750  CopyData();
751  mxData->maCheckedColor = rColor;
752 }
753 
754 const Color&
756 {
757  return mxData->maCheckedColor;
758 }
759 
760 void
762 {
763  CopyData();
764  mxData->maLightColor = rColor;
765 }
766 
767 const Color&
769 {
770  return mxData->maLightColor;
771 }
772 
773 void
775 {
776  CopyData();
777  mxData->maLightBorderColor = rColor;
778 }
779 
780 const Color&
782 {
783  return mxData->maLightBorderColor;
784 }
785 
786 void
788 {
789  CopyData();
790  mxData->maShadowColor = rColor;
791 }
792 
793 const Color&
795 {
796  return mxData->maShadowColor;
797 }
798 
799 void
801 {
802  CopyData();
803  mxData->maDarkShadowColor = rColor;
804 }
805 
806 const Color&
808 {
809  return mxData->maDarkShadowColor;
810 }
811 
812 void
814 {
815  CopyData();
816  mxData->maDefaultButtonTextColor = rColor;
817 }
818 
819 const Color&
821 {
822  return mxData->maDefaultButtonTextColor;
823 }
824 
825 void
827 {
828  CopyData();
829  mxData->maButtonTextColor = rColor;
830 }
831 
832 const Color&
834 {
835  return mxData->maButtonTextColor;
836 }
837 
838 void
840 {
841  CopyData();
842  mxData->maDefaultActionButtonTextColor = rColor;
843 }
844 
845 const Color&
847 {
848  return mxData->maDefaultActionButtonTextColor;
849 }
850 
851 void
853 {
854  CopyData();
855  mxData->maActionButtonTextColor = rColor;
856 }
857 
858 const Color&
860 {
861  return mxData->maActionButtonTextColor;
862 }
863 
864 void
866 {
867  CopyData();
868  mxData->maFlatButtonTextColor = rColor;
869 }
870 
871 const Color&
873 {
874  return mxData->maFlatButtonTextColor;
875 }
876 
877 void
879 {
880  CopyData();
881  mxData->maDefaultButtonRolloverTextColor = rColor;
882 }
883 
884 const Color&
886 {
887  return mxData->maDefaultButtonRolloverTextColor;
888 }
889 
890 void
892 {
893  CopyData();
894  mxData->maButtonRolloverTextColor = rColor;
895 }
896 
897 const Color&
899 {
900  return mxData->maButtonRolloverTextColor;
901 }
902 
903 void
905 {
906  CopyData();
907  mxData->maDefaultActionButtonRolloverTextColor = rColor;
908 }
909 
910 const Color&
912 {
913  return mxData->maDefaultActionButtonRolloverTextColor;
914 }
915 
916 void
918 {
919  CopyData();
920  mxData->maActionButtonRolloverTextColor = rColor;
921 }
922 
923 const Color&
925 {
926  return mxData->maActionButtonRolloverTextColor;
927 }
928 
929 void
931 {
932  CopyData();
933  mxData->maFlatButtonRolloverTextColor = rColor;
934 }
935 
936 const Color&
938 {
939  return mxData->maFlatButtonRolloverTextColor;
940 }
941 
942 void
944 {
945  CopyData();
946  mxData->maDefaultButtonPressedRolloverTextColor = rColor;
947 }
948 
949 const Color&
951 {
952  return mxData->maDefaultButtonPressedRolloverTextColor;
953 }
954 
955 void
957 {
958  CopyData();
959  mxData->maButtonPressedRolloverTextColor = rColor;
960 }
961 
962 const Color&
964 {
965  return mxData->maButtonPressedRolloverTextColor;
966 }
967 
968 void
970 {
971  CopyData();
972  mxData->maDefaultActionButtonPressedRolloverTextColor = rColor;
973 }
974 
975 const Color&
977 {
978  return mxData->maDefaultActionButtonPressedRolloverTextColor;
979 }
980 
981 void
983 {
984  CopyData();
985  mxData->maActionButtonPressedRolloverTextColor = rColor;
986 }
987 
988 const Color&
990 {
991  return mxData->maActionButtonPressedRolloverTextColor;
992 }
993 
994 void
996 {
997  CopyData();
998  mxData->maFlatButtonPressedRolloverTextColor = rColor;
999 }
1000 
1001 const Color&
1003 {
1004  return mxData->maFlatButtonPressedRolloverTextColor;
1005 }
1006 
1007 void
1009 {
1010  CopyData();
1011  mxData->maRadioCheckTextColor = rColor;
1012 }
1013 
1014 const Color&
1016 {
1017  return mxData->maRadioCheckTextColor;
1018 }
1019 
1020 void
1022 {
1023  CopyData();
1024  mxData->maGroupTextColor = rColor;
1025 }
1026 
1027 const Color&
1029 {
1030  return mxData->maGroupTextColor;
1031 }
1032 
1033 void
1035 {
1036  CopyData();
1037  mxData->maLabelTextColor = rColor;
1038 }
1039 
1040 const Color&
1042 {
1043  return mxData->maLabelTextColor;
1044 }
1045 
1046 void
1048 {
1049  CopyData();
1050  mxData->maWindowColor = rColor;
1051 }
1052 
1053 const Color&
1055 {
1056  return mxData->maWindowColor;
1057 }
1058 
1059 void
1061 {
1062  CopyData();
1063  mxData->maWindowTextColor = rColor;
1064 }
1065 
1066 const Color&
1068 {
1069  return mxData->maWindowTextColor;
1070 }
1071 
1072 void
1074 {
1075  CopyData();
1076  mxData->maDialogColor = rColor;
1077 }
1078 
1079 const Color&
1081 {
1082  return mxData->maDialogColor;
1083 }
1084 
1085 void
1087 {
1088  CopyData();
1089  mxData->maDialogTextColor = rColor;
1090 }
1091 
1092 const Color&
1094 {
1095  return mxData->maDialogTextColor;
1096 }
1097 
1098 void
1100 {
1101  CopyData();
1102  mxData->maWorkspaceColor = rColor;
1103 }
1104 
1105 const Color&
1107 {
1108  return mxData->maWorkspaceColor;
1109 }
1110 
1111 void
1113 {
1114  CopyData();
1115  mxData->maFieldColor = rColor;
1116 }
1117 
1118 const Color&
1120 {
1121  return mxData->maFieldColor;
1122 }
1123 
1124 void
1126 {
1127  CopyData();
1128  mxData->maFieldTextColor = rColor;
1129 }
1130 
1131 const Color&
1133 {
1134  return mxData->maFieldTextColor;
1135 }
1136 
1137 void
1139 {
1140  CopyData();
1141  mxData->maFieldRolloverTextColor = rColor;
1142 }
1143 
1144 const Color&
1146 {
1147  return mxData->maFieldRolloverTextColor;
1148 }
1149 
1150 void
1152 {
1153  CopyData();
1154  mxData->maActiveColor = rColor;
1155 }
1156 
1157 const Color&
1159 {
1160  return mxData->maActiveColor;
1161 }
1162 
1163 void
1165 {
1166  CopyData();
1167  mxData->maActiveTextColor = rColor;
1168 }
1169 
1170 const Color&
1172 {
1173  return mxData->maActiveTextColor;
1174 }
1175 
1176 void
1178 {
1179  CopyData();
1180  mxData->maActiveBorderColor = rColor;
1181 }
1182 
1183 const Color&
1185 {
1186  return mxData->maActiveBorderColor;
1187 }
1188 
1189 void
1191 {
1192  CopyData();
1193  mxData->maDeactiveColor = rColor;
1194 }
1195 
1196 const Color&
1198 {
1199  return mxData->maDeactiveColor;
1200 }
1201 
1202 void
1204 {
1205  CopyData();
1206  mxData->maDeactiveTextColor = rColor;
1207 }
1208 
1209 const Color&
1211 {
1212  return mxData->maDeactiveTextColor;
1213 }
1214 
1215 void
1217 {
1218  CopyData();
1219  mxData->maDeactiveBorderColor = rColor;
1220 }
1221 
1222 const Color&
1224 {
1225  return mxData->maDeactiveBorderColor;
1226 }
1227 
1228 void
1230 {
1231  CopyData();
1232  mxData->maHighlightColor = rColor;
1233 }
1234 
1235 const Color&
1237 {
1238  return mxData->maHighlightColor;
1239 }
1240 
1241 void
1243 {
1244  CopyData();
1245  mxData->maHighlightTextColor = rColor;
1246 }
1247 
1248 const Color&
1250 {
1251  return mxData->maHighlightTextColor;
1252 }
1253 
1254 void
1256 {
1257  CopyData();
1258  mxData->maDisableColor = rColor;
1259 }
1260 
1261 const Color&
1263 {
1264  return mxData->maDisableColor;
1265 }
1266 
1267 void
1269 {
1270  CopyData();
1271  mxData->maHelpColor = rColor;
1272 }
1273 
1274 const Color&
1276 {
1277  return mxData->maHelpColor;
1278 }
1279 
1280 void
1282 {
1283  CopyData();
1284  mxData->maHelpTextColor = rColor;
1285 }
1286 
1287 const Color&
1289 {
1290  return mxData->maHelpTextColor;
1291 }
1292 
1293 void
1295 {
1296  CopyData();
1297  mxData->maMenuColor = rColor;
1298 }
1299 
1300 const Color&
1302 {
1303  return mxData->maMenuColor;
1304 }
1305 
1306 void
1308 {
1309  CopyData();
1310  mxData->maMenuBarColor = rColor;
1311 }
1312 
1313 const Color&
1315 {
1316  return mxData->maMenuBarColor;
1317 }
1318 
1319 void
1321 {
1322  CopyData();
1323  mxData->maMenuBarRolloverColor = rColor;
1324 }
1325 
1326 const Color&
1328 {
1329  return mxData->maMenuBarRolloverColor;
1330 }
1331 
1332 void
1334 {
1335  CopyData();
1336  mxData->maMenuBorderColor = rColor;
1337 }
1338 
1339 const Color&
1341 {
1342  return mxData->maMenuBorderColor;
1343 }
1344 
1345 void
1347 {
1348  CopyData();
1349  mxData->maMenuTextColor = rColor;
1350 }
1351 
1352 const Color&
1354 {
1355  return mxData->maMenuTextColor;
1356 }
1357 
1358 void
1360 {
1361  CopyData();
1362  mxData->maMenuBarTextColor = rColor;
1363 }
1364 
1365 const Color&
1367 {
1368  return mxData->maMenuBarTextColor;
1369 }
1370 
1371 void
1373 {
1374  CopyData();
1375  mxData->maMenuBarRolloverTextColor = rColor;
1376 }
1377 
1378 const Color&
1380 {
1381  return mxData->maMenuBarRolloverTextColor;
1382 }
1383 
1384 void
1386 {
1387  CopyData();
1388  mxData->maMenuBarHighlightTextColor = rColor;
1389 }
1390 
1391 const Color&
1393 {
1394  return mxData->maMenuBarHighlightTextColor;
1395 }
1396 
1397 void
1399 {
1400  CopyData();
1401  mxData->maMenuHighlightColor = rColor;
1402 }
1403 
1404 const Color&
1406 {
1407  return mxData->maMenuHighlightColor;
1408 }
1409 
1410 void
1412 {
1413  CopyData();
1414  mxData->maMenuHighlightTextColor = rColor;
1415 }
1416 
1417 const Color&
1419 {
1420  return mxData->maMenuHighlightTextColor;
1421 }
1422 
1423 void
1425 {
1426  CopyData();
1427  mxData->maTabTextColor = rColor;
1428 }
1429 
1430 const Color&
1432 {
1433  return mxData->maTabTextColor;
1434 }
1435 
1436 void
1438 {
1439  CopyData();
1440  mxData->maTabRolloverTextColor = rColor;
1441 }
1442 
1443 const Color&
1445 {
1446  return mxData->maTabRolloverTextColor;
1447 }
1448 
1449 void
1451 {
1452  CopyData();
1453  mxData->maTabHighlightTextColor = rColor;
1454 }
1455 
1456 const Color&
1458 {
1459  return mxData->maTabHighlightTextColor;
1460 }
1461 
1462 void
1464 {
1465  CopyData();
1466  mxData->maLinkColor = rColor;
1467 }
1468 
1469 const Color&
1471 {
1472  return mxData->maLinkColor;
1473 }
1474 
1475 void
1477 {
1478  CopyData();
1479  mxData->maVisitedLinkColor = rColor;
1480 }
1481 
1482 const Color&
1484 {
1485  return mxData->maVisitedLinkColor;
1486 }
1487 
1488 void
1490 {
1491  CopyData();
1492  mxData->maToolTextColor = rColor;
1493 }
1494 
1495 const Color&
1497 {
1498  return mxData->maToolTextColor;
1499 }
1500 
1501 const Color&
1503 {
1504  return mxData->maHighlightLinkColor;
1505 }
1506 
1507 void
1509 {
1510  CopyData();
1511  mxData->maMonoColor = rColor;
1512 }
1513 
1514 const Color&
1516 {
1517  return mxData->maMonoColor;
1518 }
1519 
1520 void
1522 {
1523  CopyData();
1524  mxData->maActiveTabColor = rColor;
1525 }
1526 
1527 const Color&
1529 {
1530  return mxData->maActiveTabColor;
1531 }
1532 
1533 void
1535 {
1536  CopyData();
1537  mxData->maInactiveTabColor = rColor;
1538 }
1539 
1540 const Color&
1542 {
1543  return mxData->maInactiveTabColor;
1544 }
1545 
1546 const Color&
1548 {
1549  return mxData->maAlternatingRowColor;
1550 }
1551 
1552 void
1553 StyleSettings::SetUseSystemUIFonts( bool bUseSystemUIFonts )
1554 {
1555  CopyData();
1556  mxData->mbUseSystemUIFonts = bUseSystemUIFonts;
1557 }
1558 
1559 bool
1561 {
1562  return mxData->mbUseSystemUIFonts;
1563 }
1564 
1565 void StyleSettings::SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
1566 {
1567  CopyData();
1568  mxData->mbUseFontAAFromSystem = bUseFontAAFromSystem;
1569 }
1570 
1572 {
1573  return mxData->mbUseFontAAFromSystem;
1574 }
1575 
1576 void
1577 StyleSettings::SetUseFlatBorders( bool bUseFlatBorders )
1578 {
1579  CopyData();
1580  mxData->mnUseFlatBorders = bUseFlatBorders;
1581 }
1582 
1583 bool
1585 {
1586  return mxData->mnUseFlatBorders;
1587 }
1588 
1589 void
1590 StyleSettings::SetUseFlatMenus( bool bUseFlatMenus )
1591 {
1592  CopyData();
1593  mxData->mnUseFlatMenus = bUseFlatMenus;
1594 }
1595 
1596 bool
1598 {
1599  return mxData->mnUseFlatMenus;
1600 }
1601 
1602 void
1604 {
1605  CopyData();
1606  mxData->meUseImagesInMenus = eUseImagesInMenus;
1607 }
1608 
1609 void
1610 StyleSettings::SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus )
1611 {
1612  CopyData();
1613  mxData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus;
1614 }
1615 
1616 bool
1618 {
1619  return mxData->mbPreferredUseImagesInMenus;
1620 }
1621 
1622 void
1623 StyleSettings::SetSkipDisabledInMenus( bool bSkipDisabledInMenus )
1624 {
1625  CopyData();
1626  mxData->mbSkipDisabledInMenus = bSkipDisabledInMenus;
1627 }
1628 
1629 bool
1631 {
1632  return mxData->mbSkipDisabledInMenus;
1633 }
1634 
1635 void
1636 StyleSettings::SetHideDisabledMenuItems( bool bHideDisabledMenuItems )
1637 {
1638  CopyData();
1639  mxData->mbHideDisabledMenuItems = bHideDisabledMenuItems;
1640 }
1641 
1642 bool
1644 {
1645  return mxData->mbHideDisabledMenuItems;
1646 }
1647 
1648 void
1650 {
1651  CopyData();
1652  mxData->meContextMenuShortcuts = eContextMenuShortcuts;
1653 }
1654 
1655 bool
1657 {
1658  switch (mxData->meContextMenuShortcuts)
1659  {
1660  case TRISTATE_FALSE:
1661  return false;
1662  case TRISTATE_TRUE:
1663  return true;
1664  default: // TRISTATE_INDET:
1666  }
1667 }
1668 
1669 void
1671 {
1672  CopyData();
1673  mxData->mbPreferredContextMenuShortcuts = bContextMenuShortcuts;
1674 }
1675 
1676 bool
1678 {
1679  return mxData->mbPreferredContextMenuShortcuts;
1680 }
1681 
1682 void
1683 StyleSettings::SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider )
1684 {
1685  CopyData();
1686  mxData->mbPrimaryButtonWarpsSlider = bPrimaryButtonWarpsSlider;
1687 }
1688 
1689 bool
1691 {
1692  return mxData->mbPrimaryButtonWarpsSlider;
1693 }
1694 
1695 void
1697 {
1698  CopyData();
1699  mxData->maAppFont = rFont;
1700 }
1701 
1702 const vcl::Font&
1704 {
1705  return mxData->maAppFont;
1706 }
1707 
1708 void
1710 {
1711  CopyData();
1712  mxData->maHelpFont = rFont;
1713 }
1714 
1715 const vcl::Font&
1717 {
1718  return mxData->maHelpFont;
1719 }
1720 
1721 void
1723 {
1724  CopyData();
1725  mxData->maTitleFont = rFont;
1726 }
1727 
1728 const vcl::Font&
1730 {
1731  return mxData->maTitleFont;
1732 }
1733 
1734 void
1736 {
1737  CopyData();
1738  mxData->maFloatTitleFont = rFont;
1739 }
1740 
1741 const vcl::Font&
1743 {
1744  return mxData->maFloatTitleFont;
1745 }
1746 
1747 void
1749 {
1750  CopyData();
1751  mxData->maMenuFont = rFont;
1752 }
1753 
1754 const vcl::Font&
1756 {
1757  return mxData->maMenuFont;
1758 }
1759 
1760 void
1762 {
1763  CopyData();
1764  mxData->maToolFont = rFont;
1765 }
1766 
1767 const vcl::Font&
1769 {
1770  return mxData->maToolFont;
1771 }
1772 
1773 void
1775 {
1776  CopyData();
1777  mxData->maGroupFont = rFont;
1778 }
1779 
1780 const vcl::Font&
1782 {
1783  return mxData->maGroupFont;
1784 }
1785 
1786 void
1788 {
1789  CopyData();
1790  mxData->maLabelFont = rFont;
1791 }
1792 
1793 const vcl::Font&
1795 {
1796  return mxData->maLabelFont;
1797 }
1798 
1799 void
1801 {
1802  CopyData();
1803  mxData->maRadioCheckFont = rFont;
1804 }
1805 
1806 const vcl::Font&
1808 {
1809  return mxData->maRadioCheckFont;
1810 }
1811 
1812 void
1814 {
1815  CopyData();
1816  mxData->maPushButtonFont = rFont;
1817 }
1818 
1819 const vcl::Font&
1821 {
1822  return mxData->maPushButtonFont;
1823 }
1824 
1825 void
1827 {
1828  CopyData();
1829  mxData->maFieldFont = rFont;
1830 }
1831 
1832 const vcl::Font&
1834 {
1835  return mxData->maFieldFont;
1836 }
1837 
1838 void
1840 {
1841  CopyData();
1842  mxData->maIconFont = rFont;
1843 }
1844 
1845 const vcl::Font&
1847 {
1848  return mxData->maIconFont;
1849 }
1850 
1851 void
1853 {
1854  CopyData();
1855  mxData->maTabFont = rFont;
1856 }
1857 
1858 const vcl::Font&
1860 {
1861  return mxData->maTabFont;
1862 }
1863 
1864 long
1866 {
1867  return 1;
1868 }
1869 
1870 void
1872 {
1873  CopyData();
1874  mxData->mnTitleHeight = nSize;
1875 }
1876 
1877 long
1879 {
1880  return mxData->mnTitleHeight;
1881 }
1882 
1883 void
1885 {
1886  CopyData();
1887  mxData->mnFloatTitleHeight = nSize;
1888 }
1889 
1890 long
1892 {
1893  return mxData->mnFloatTitleHeight;
1894 }
1895 
1896 void
1898 {
1899  CopyData();
1900  mxData->mnScrollBarSize = nSize;
1901 }
1902 
1903 long
1905 {
1906  return mxData->mnScrollBarSize;
1907 }
1908 
1909 void
1911 {
1912  CopyData();
1913  mxData->mnMinThumbSize = nSize;
1914 }
1915 
1916 long
1918 {
1919  return mxData->mnMinThumbSize;
1920 }
1921 
1922 void
1924 {
1925  CopyData();
1926  mxData->mnSpinSize = nSize;
1927 }
1928 
1929 long
1931 {
1932  return mxData->mnSpinSize;
1933 }
1934 
1935 long
1937 {
1938  return 3;
1939 }
1940 
1941 void
1943 {
1944  CopyData();
1945  mxData->mnCursorSize = nSize;
1946 }
1947 
1948 long
1950 {
1951  return mxData->mnCursorSize;
1952 }
1953 
1954 void
1955 StyleSettings::SetCursorBlinkTime( sal_uInt64 nBlinkTime )
1956 {
1957  CopyData();
1958  mxData->mnCursorBlinkTime = nBlinkTime;
1959 }
1960 
1961 sal_uInt64
1963 {
1964  return static_cast<long>(mxData->mnCursorBlinkTime);
1965 }
1966 
1967 void
1969 {
1970  CopyData();
1971  mxData->mnDragFullOptions = nOptions;
1972 }
1973 
1976 {
1977  return mxData->mnDragFullOptions;
1978 }
1979 
1980 void
1982 {
1983  CopyData();
1984  mxData->mnSelectionOptions = nOptions;
1985 }
1986 
1989 {
1990  return mxData->mnSelectionOptions;
1991 }
1992 
1993 void
1995 {
1996  CopyData();
1997  mxData->mnDisplayOptions = nOptions;
1998 }
1999 
2002 {
2003  return mxData->mnDisplayOptions;
2004 }
2005 
2006 void
2008 {
2009  CopyData();
2010  mxData->mnAntialiasedMin = nMinPixel;
2011 }
2012 
2013 sal_uLong
2015 {
2016  return mxData->mnAntialiasedMin;
2017 }
2018 
2019 void
2021 {
2022  CopyData();
2023  mxData->mnOptions = nOptions;
2024 }
2025 
2026 void
2027 StyleSettings::SetAutoMnemonic( bool bAutoMnemonic )
2028 {
2029  CopyData();
2030  mxData->mbAutoMnemonic = bAutoMnemonic;
2031 }
2032 
2033 bool
2035 {
2036  return mxData->mbAutoMnemonic;
2037 }
2038 
2039 bool
2041 {
2042  ImplSVData* pSVData = ImplGetSVData();
2043  return pSVData->maNWFData.mbCanDetermineWindowPosition;
2044 }
2045 
2046 void
2048 {
2049  CopyData();
2050  mxData->maFontColor = rColor;
2051 }
2052 
2053 const Color&
2055 {
2056  return mxData->maFontColor;
2057 }
2058 
2059 void
2061 {
2062  CopyData();
2063  mxData->mnToolbarIconSize = nSize;
2064 }
2065 
2068 {
2069  return mxData->mnToolbarIconSize;
2070 }
2071 
2072 const DialogStyle&
2074 {
2075  return mxData->maDialogStyle;
2076 }
2077 
2078 void
2080 {
2081  CopyData();
2082  mxData->mnEdgeBlending = nCount;
2083 }
2084 
2085 sal_uInt16
2087 {
2088  return mxData->mnEdgeBlending;
2089 }
2090 
2091 const Color&
2093 {
2094  return mxData->maEdgeBlendingTopLeftColor;
2095 }
2096 
2097 const Color&
2099 {
2100  return mxData->maEdgeBlendingBottomRightColor;
2101 }
2102 
2103 void
2105 {
2106  CopyData();
2107  mxData->mnListBoxMaximumLineCount = nCount;
2108 }
2109 
2110 sal_uInt16
2112 {
2113  return mxData->mnListBoxMaximumLineCount;
2114 }
2115 
2116 void
2118 {
2119  CopyData();
2120  mxData->mnColorValueSetColumnCount = nCount;
2121 }
2122 
2123 sal_uInt16
2125 {
2126  return mxData->mnColorValueSetColumnCount;
2127 }
2128 
2129 sal_uInt16
2131 {
2132  return 10;
2133 }
2134 
2135 sal_uInt16
2137 {
2138  return 1;
2139 }
2140 
2141 void
2143 {
2144  CopyData();
2145  mxData->mbPreviewUsesCheckeredBackground = bNew;
2146 }
2147 
2148 bool
2150 {
2151  return mxData->mbPreviewUsesCheckeredBackground;
2152 }
2153 
2154 bool
2156 {
2157  return !(*this == rSet);
2158 }
2159 
2161 {
2162  mxData->maListBoxPreviewDefaultLogicSize = rSize;
2163 }
2164 
2166 {
2167  if(0 == mxData->maListBoxPreviewDefaultPixelSize.Width() || 0 == mxData->maListBoxPreviewDefaultPixelSize.Height())
2168  {
2169  const_cast< StyleSettings* >(this)->mxData->maListBoxPreviewDefaultPixelSize =
2170  Application::GetDefaultDevice()->LogicToPixel(mxData->maListBoxPreviewDefaultLogicSize, MapMode(MapUnit::MapAppFont));
2171  }
2172 
2173  return mxData->maListBoxPreviewDefaultPixelSize;
2174 }
2175 
2176 void StyleSettings::Set3DColors( const Color& rColor )
2177 {
2178  CopyData();
2179  mxData->maFaceColor = rColor;
2180  mxData->maLightBorderColor = rColor;
2181  mxData->maMenuBorderColor = rColor;
2182  mxData->maDarkShadowColor = COL_BLACK;
2183  if ( rColor != COL_LIGHTGRAY )
2184  {
2185  mxData->maLightColor = rColor;
2186  mxData->maShadowColor = rColor;
2187  mxData->maDarkShadowColor=rColor;
2188  mxData->maLightColor.IncreaseLuminance( 64 );
2189  mxData->maShadowColor.DecreaseLuminance( 64 );
2190  mxData->maDarkShadowColor.DecreaseLuminance( 100 );
2191  sal_uLong nRed = mxData->maLightColor.GetRed();
2192  sal_uLong nGreen = mxData->maLightColor.GetGreen();
2193  sal_uLong nBlue = mxData->maLightColor.GetBlue();
2194  nRed += static_cast<sal_uLong>(mxData->maShadowColor.GetRed());
2195  nGreen += static_cast<sal_uLong>(mxData->maShadowColor.GetGreen());
2196  nBlue += static_cast<sal_uLong>(mxData->maShadowColor.GetBlue());
2197  mxData->maCheckedColor = Color( static_cast<sal_uInt8>(nRed/2), static_cast<sal_uInt8>(nGreen/2), static_cast<sal_uInt8>(nBlue/2) );
2198  }
2199  else
2200  {
2201  mxData->maCheckedColor = Color( 0x99, 0x99, 0x99 );
2202  mxData->maLightColor = COL_WHITE;
2203  mxData->maShadowColor = COL_GRAY;
2204  }
2205 }
2206 
2208 {
2209  CopyData();
2210  // Light gray checked color special case
2211  if ( GetFaceColor() == COL_LIGHTGRAY )
2212  mxData->maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
2213  else
2214  {
2215  sal_uInt8 nRed = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetRed()) + static_cast<sal_uInt16>(mxData->maLightColor.GetRed()))/2);
2216  sal_uInt8 nGreen = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetGreen()) + static_cast<sal_uInt16>(mxData->maLightColor.GetGreen()))/2);
2217  sal_uInt8 nBlue = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetBlue()) + static_cast<sal_uInt16>(mxData->maLightColor.GetBlue()))/2);
2218  mxData->maCheckedColor = Color( nRed, nGreen, nBlue );
2219  }
2220 }
2221 
2223 {
2224  // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
2225  switch (mxData->meUseImagesInMenus) {
2226  case TRISTATE_FALSE:
2227  return false;
2228  case TRISTATE_TRUE:
2229  return true;
2230  default: // TRISTATE_INDET:
2232  }
2233 }
2234 
2235 static BitmapEx readBitmapEx( const OUString& rPath )
2236 {
2237  OUString aPath( rPath );
2238  rtl::Bootstrap::expandMacros( aPath );
2239 
2240  // import the image
2241  Graphic aGraphic;
2242  if ( GraphicFilter::LoadGraphic( aPath, OUString(), aGraphic ) != ERRCODE_NONE )
2243  return BitmapEx();
2244  return aGraphic.GetBitmapEx();
2245 }
2246 
2247 namespace {
2248 
2249 enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
2250 
2251 }
2252 
2254 static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, std::optional<Color>& rMenuBarTextColor )
2255 {
2256  uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
2257  if ( !xContext.is() )
2258  return;
2259 
2260  // don't burn time loading images we don't need.
2262  return;
2263 
2264  // read from the configuration
2265  OUString aPersona( officecfg::Office::Common::Misc::Persona::get( xContext ) );
2266  OUString aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get( xContext ) );
2267 
2268  // have the settings changed? marks if header /footer prepared before
2269  //should maybe extended to a flag that marks if header /footer /both are loaded
2270  OUString aOldValue= eWhich==PERSONA_HEADER?OUString(aPersona + ";" + aPersonaSettings+";h" ):OUString(aPersona + ";" + aPersonaSettings+";f" );
2271  if ( rHeaderFooter == aOldValue )
2272  return;
2273 
2274  rHeaderFooter = aOldValue;
2275  rHeaderFooterBitmap = BitmapEx();
2276  rMenuBarTextColor.reset();
2277 
2278  // now read the new values and setup bitmaps
2279  OUString aHeader, aFooter;
2280  if ( aPersona == "own" || aPersona == "default" )
2281  {
2282  sal_Int32 nIndex = 0;
2283 
2284  // Skip the persona slug, name, and preview
2285  aHeader = aPersonaSettings.getToken( 3, ';', nIndex );
2286 
2287  if ( nIndex > 0 )
2288  aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
2289 
2290  // change menu text color, advance nIndex to skip the '#'
2291  if ( nIndex > 0 )
2292  {
2293  OUString aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
2294  rMenuBarTextColor = Color( aColor.toUInt32( 16 ) );
2295  }
2296  }
2297 
2298  OUString aName;
2299  switch ( eWhich ) {
2300  case PERSONA_HEADER: aName = aHeader; break;
2301  case PERSONA_FOOTER: aName = aFooter; break;
2302  }
2303 
2304  if ( !aName.isEmpty() )
2305  {
2306  OUString gallery("");
2307  // try the gallery first, then the program path:
2308  if ( aPersona == "own" && !aPersonaSettings.startsWith( "vnd.sun.star.expand" ) )
2309  {
2310  gallery = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
2311  rtl::Bootstrap::expandMacros( gallery );
2312  gallery += "/user/gallery/personas/";
2313  }
2314  else if ( aPersona == "default" )
2315  {
2316  gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/";
2317  }
2318  rHeaderFooterBitmap = readBitmapEx( gallery + aName );
2319 
2320  if ( rHeaderFooterBitmap.IsEmpty() )
2321  rHeaderFooterBitmap = readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" + aName );
2322  }
2323 
2324  // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
2325 
2326  if( rHeaderFooterBitmap.IsEmpty() )
2327  {
2328  std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
2329  officecfg::Office::Common::Misc::Persona::set( "no", batch );
2330  officecfg::Office::Common::Misc::PersonaSettings::set( "", batch );
2331  batch->commit();
2332  }
2333 }
2334 
2336 {
2337  setupPersonaHeaderFooter( PERSONA_HEADER, mxData->maPersonaHeaderFooter, mxData->maPersonaHeaderBitmap, mxData->maPersonaMenuBarTextColor );
2338  return mxData->maPersonaHeaderBitmap;
2339 }
2340 
2342 {
2343  setupPersonaHeaderFooter( PERSONA_FOOTER, mxData->maPersonaHeaderFooter, mxData->maPersonaFooterBitmap, mxData->maPersonaMenuBarTextColor );
2344  return mxData->maPersonaFooterBitmap;
2345 }
2346 
2347 const std::optional<Color>& StyleSettings::GetPersonaMenuBarTextColor() const
2348 {
2349  GetPersonaHeader();
2350  return mxData->maPersonaMenuBarTextColor;
2351 }
2352 
2354 {
2355  CopyData();
2356  mxData->SetStandardStyles();
2357 }
2358 
2360 {
2361  // compute a brighter face color that can be used in gradients
2362  // for a convex look (eg toolbars)
2363 
2364  sal_uInt16 h, s, b;
2365  GetFaceColor().RGBtoHSB( h, s, b );
2366  if( s > 1) s=1;
2367  if( b < 98) b=98;
2368  return Color::HSBtoRGB( h, s, b );
2369 }
2370 
2372 {
2373  // compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
2374  sal_uInt16 h, s, b;
2375  GetShadowColor().RGBtoHSB( h, s, b );
2376  b += b/4;
2377  s -= s/4;
2378  return Color::HSBtoRGB( h, s, b );
2379 }
2380 
2382 {
2383  // copy if other references exist
2384  if (mxData.use_count() > 1)
2385  {
2386  mxData = std::make_shared<ImplStyleData>(*mxData);
2387  }
2388 }
2389 
2391 {
2392  if ( mxData == rSet.mxData )
2393  return true;
2394 
2395  if (mxData->mIconTheme != rSet.mxData->mIconTheme) {
2396  return false;
2397  }
2398 
2399  if (*mxData->mIconThemeSelector != *rSet.mxData->mIconThemeSelector) {
2400  return false;
2401  }
2402 
2403  return (mxData->mnOptions == rSet.mxData->mnOptions) &&
2404  (mxData->mbAutoMnemonic == rSet.mxData->mbAutoMnemonic) &&
2405  (mxData->mnDragFullOptions == rSet.mxData->mnDragFullOptions) &&
2406  (mxData->mnSelectionOptions == rSet.mxData->mnSelectionOptions) &&
2407  (mxData->mnDisplayOptions == rSet.mxData->mnDisplayOptions) &&
2408  (mxData->mnCursorSize == rSet.mxData->mnCursorSize) &&
2409  (mxData->mnCursorBlinkTime == rSet.mxData->mnCursorBlinkTime) &&
2410  (mxData->mnTitleHeight == rSet.mxData->mnTitleHeight) &&
2411  (mxData->mnFloatTitleHeight == rSet.mxData->mnFloatTitleHeight) &&
2412  (mxData->mnScrollBarSize == rSet.mxData->mnScrollBarSize) &&
2413  (mxData->mnMinThumbSize == rSet.mxData->mnMinThumbSize) &&
2414  (mxData->mnSpinSize == rSet.mxData->mnSpinSize) &&
2415  (mxData->mnAntialiasedMin == rSet.mxData->mnAntialiasedMin) &&
2416  (mxData->mbHighContrast == rSet.mxData->mbHighContrast) &&
2417  (mxData->mbUseSystemUIFonts == rSet.mxData->mbUseSystemUIFonts) &&
2418  (mxData->mbUseFontAAFromSystem == rSet.mxData->mbUseFontAAFromSystem) &&
2419  (mxData->mnUseFlatBorders == rSet.mxData->mnUseFlatBorders) &&
2420  (mxData->mnUseFlatMenus == rSet.mxData->mnUseFlatMenus) &&
2421  (mxData->maFaceColor == rSet.mxData->maFaceColor) &&
2422  (mxData->maCheckedColor == rSet.mxData->maCheckedColor) &&
2423  (mxData->maLightColor == rSet.mxData->maLightColor) &&
2424  (mxData->maLightBorderColor == rSet.mxData->maLightBorderColor) &&
2425  (mxData->maShadowColor == rSet.mxData->maShadowColor) &&
2426  (mxData->maDarkShadowColor == rSet.mxData->maDarkShadowColor) &&
2427  (mxData->maButtonTextColor == rSet.mxData->maButtonTextColor) &&
2428  (mxData->maDefaultActionButtonTextColor == rSet.mxData->maDefaultActionButtonTextColor) &&
2429  (mxData->maActionButtonTextColor == rSet.mxData->maActionButtonTextColor) &&
2430  (mxData->maButtonRolloverTextColor == rSet.mxData->maButtonRolloverTextColor) &&
2431  (mxData->maActionButtonRolloverTextColor == rSet.mxData->maActionButtonRolloverTextColor) &&
2432  (mxData->maRadioCheckTextColor == rSet.mxData->maRadioCheckTextColor) &&
2433  (mxData->maGroupTextColor == rSet.mxData->maGroupTextColor) &&
2434  (mxData->maLabelTextColor == rSet.mxData->maLabelTextColor) &&
2435  (mxData->maWindowColor == rSet.mxData->maWindowColor) &&
2436  (mxData->maWindowTextColor == rSet.mxData->maWindowTextColor) &&
2437  (mxData->maDialogColor == rSet.mxData->maDialogColor) &&
2438  (mxData->maDialogTextColor == rSet.mxData->maDialogTextColor) &&
2439  (mxData->maWorkspaceColor == rSet.mxData->maWorkspaceColor) &&
2440  (mxData->maMonoColor == rSet.mxData->maMonoColor) &&
2441  (mxData->maFieldColor == rSet.mxData->maFieldColor) &&
2442  (mxData->maFieldTextColor == rSet.mxData->maFieldTextColor) &&
2443  (mxData->maActiveColor == rSet.mxData->maActiveColor) &&
2444  (mxData->maActiveTextColor == rSet.mxData->maActiveTextColor) &&
2445  (mxData->maActiveBorderColor == rSet.mxData->maActiveBorderColor) &&
2446  (mxData->maDeactiveColor == rSet.mxData->maDeactiveColor) &&
2447  (mxData->maDeactiveTextColor == rSet.mxData->maDeactiveTextColor) &&
2448  (mxData->maDeactiveBorderColor == rSet.mxData->maDeactiveBorderColor) &&
2449  (mxData->maMenuColor == rSet.mxData->maMenuColor) &&
2450  (mxData->maMenuBarColor == rSet.mxData->maMenuBarColor) &&
2451  (mxData->maMenuBarRolloverColor == rSet.mxData->maMenuBarRolloverColor) &&
2452  (mxData->maMenuBorderColor == rSet.mxData->maMenuBorderColor) &&
2453  (mxData->maMenuTextColor == rSet.mxData->maMenuTextColor) &&
2454  (mxData->maMenuBarTextColor == rSet.mxData->maMenuBarTextColor) &&
2455  (mxData->maMenuBarRolloverTextColor == rSet.mxData->maMenuBarRolloverTextColor) &&
2456  (mxData->maMenuHighlightColor == rSet.mxData->maMenuHighlightColor) &&
2457  (mxData->maMenuHighlightTextColor == rSet.mxData->maMenuHighlightTextColor) &&
2458  (mxData->maHighlightColor == rSet.mxData->maHighlightColor) &&
2459  (mxData->maHighlightTextColor == rSet.mxData->maHighlightTextColor) &&
2460  (mxData->maTabTextColor == rSet.mxData->maTabTextColor) &&
2461  (mxData->maTabRolloverTextColor == rSet.mxData->maTabRolloverTextColor) &&
2462  (mxData->maTabHighlightTextColor == rSet.mxData->maTabHighlightTextColor) &&
2463  (mxData->maActiveTabColor == rSet.mxData->maActiveTabColor) &&
2464  (mxData->maInactiveTabColor == rSet.mxData->maInactiveTabColor) &&
2465  (mxData->maDisableColor == rSet.mxData->maDisableColor) &&
2466  (mxData->maHelpColor == rSet.mxData->maHelpColor) &&
2467  (mxData->maHelpTextColor == rSet.mxData->maHelpTextColor) &&
2468  (mxData->maLinkColor == rSet.mxData->maLinkColor) &&
2469  (mxData->maVisitedLinkColor == rSet.mxData->maVisitedLinkColor) &&
2470  (mxData->maToolTextColor == rSet.mxData->maToolTextColor) &&
2471  (mxData->maHighlightLinkColor == rSet.mxData->maHighlightLinkColor) &&
2472  (mxData->maAppFont == rSet.mxData->maAppFont) &&
2473  (mxData->maHelpFont == rSet.mxData->maHelpFont) &&
2474  (mxData->maTitleFont == rSet.mxData->maTitleFont) &&
2475  (mxData->maFloatTitleFont == rSet.mxData->maFloatTitleFont) &&
2476  (mxData->maMenuFont == rSet.mxData->maMenuFont) &&
2477  (mxData->maToolFont == rSet.mxData->maToolFont) &&
2478  (mxData->maGroupFont == rSet.mxData->maGroupFont) &&
2479  (mxData->maLabelFont == rSet.mxData->maLabelFont) &&
2480  (mxData->maRadioCheckFont == rSet.mxData->maRadioCheckFont) &&
2481  (mxData->maPushButtonFont == rSet.mxData->maPushButtonFont) &&
2482  (mxData->maFieldFont == rSet.mxData->maFieldFont) &&
2483  (mxData->maIconFont == rSet.mxData->maIconFont) &&
2484  (mxData->maTabFont == rSet.mxData->maTabFont) &&
2485  (mxData->meUseImagesInMenus == rSet.mxData->meUseImagesInMenus) &&
2486  (mxData->mbPreferredUseImagesInMenus == rSet.mxData->mbPreferredUseImagesInMenus) &&
2487  (mxData->mbSkipDisabledInMenus == rSet.mxData->mbSkipDisabledInMenus) &&
2488  (mxData->mbHideDisabledMenuItems == rSet.mxData->mbHideDisabledMenuItems) &&
2489  (mxData->mbPreferredContextMenuShortcuts == rSet.mxData->mbPreferredContextMenuShortcuts)&&
2490  (mxData->meContextMenuShortcuts == rSet.mxData->meContextMenuShortcuts) &&
2491  (mxData->mbPrimaryButtonWarpsSlider == rSet.mxData->mbPrimaryButtonWarpsSlider) &&
2492  (mxData->maFontColor == rSet.mxData->maFontColor) &&
2493  (mxData->mnEdgeBlending == rSet.mxData->mnEdgeBlending) &&
2494  (mxData->maEdgeBlendingTopLeftColor == rSet.mxData->maEdgeBlendingTopLeftColor) &&
2495  (mxData->maEdgeBlendingBottomRightColor == rSet.mxData->maEdgeBlendingBottomRightColor) &&
2496  (mxData->mnListBoxMaximumLineCount == rSet.mxData->mnListBoxMaximumLineCount) &&
2497  (mxData->mnColorValueSetColumnCount == rSet.mxData->mnColorValueSetColumnCount) &&
2498  (mxData->maListBoxPreviewDefaultLogicSize == rSet.mxData->maListBoxPreviewDefaultLogicSize) &&
2499  (mxData->maListBoxPreviewDefaultPixelSize == rSet.mxData->maListBoxPreviewDefaultPixelSize) &&
2500  (mxData->mbPreviewUsesCheckeredBackground == rSet.mxData->mbPreviewUsesCheckeredBackground);
2501 }
2502 
2504  mnEnableATT(TRISTATE_INDET),
2505  mnDisablePrinting(TRISTATE_INDET)
2506 {
2507  static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
2508  mbEnableLocalizedDecimalSep = (pEnv != nullptr);
2509 }
2510 
2512  : mxData(std::make_shared<ImplMiscData>())
2513 {
2514 }
2515 
2516 bool MiscSettings::operator ==( const MiscSettings& rSet ) const
2517 {
2518  if ( mxData == rSet.mxData )
2519  return true;
2520 
2521  return (mxData->mnEnableATT == rSet.mxData->mnEnableATT ) &&
2522  (mxData->mnDisablePrinting == rSet.mxData->mnDisablePrinting ) &&
2523  (mxData->mbEnableLocalizedDecimalSep == rSet.mxData->mbEnableLocalizedDecimalSep );
2524 }
2525 
2526 bool
2528 {
2529  return !(*this == rSet);
2530 }
2531 
2533 {
2534  if( mxData->mnDisablePrinting == TRISTATE_INDET )
2535  {
2536  OUString aEnable =
2538  getValue( "DesktopManagement",
2539  "DisablePrinting" );
2540  mxData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2541  }
2542 
2543  return mxData->mnDisablePrinting != TRISTATE_FALSE;
2544 }
2545 
2547 {
2548 
2549 #ifdef _WIN32
2550  if( mxData->mnEnableATT == TRISTATE_INDET )
2551  {
2552  // Check in the Windows registry if an AT tool wants Accessibility support to
2553  // be activated ..
2554  HKEY hkey;
2555 
2556  if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2557  L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2558  &hkey) )
2559  {
2560  DWORD dwType;
2561  wchar_t Data[6]; // possible values: "true", "false", "1", "0", DWORD
2562  DWORD cbData = sizeof(Data);
2563 
2564  if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2565  nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2566  {
2567  switch (dwType)
2568  {
2569  case REG_SZ:
2570  mxData->mnEnableATT = ((0 == wcsicmp(Data, L"1")) || (0 == wcsicmp(Data, L"true"))) ? TRISTATE_TRUE : TRISTATE_FALSE;
2571  break;
2572  case REG_DWORD:
2573  switch (reinterpret_cast<DWORD *>(Data)[0]) {
2574  case 0:
2575  mxData->mnEnableATT = TRISTATE_FALSE;
2576  break;
2577  case 1:
2578  mxData->mnEnableATT = TRISTATE_TRUE;
2579  break;
2580  default:
2581  mxData->mnEnableATT = TRISTATE_INDET;
2582  //TODO: or TRISTATE_TRUE?
2583  break;
2584  }
2585  break;
2586  default:
2587  // Unsupported registry type
2588  break;
2589  }
2590  }
2591 
2592  RegCloseKey(hkey);
2593  }
2594  }
2595 #endif
2596 
2597  if( mxData->mnEnableATT == TRISTATE_INDET )
2598  {
2599  static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
2600  if( !pEnv || !*pEnv )
2601  {
2602  OUString aEnable =
2604  getValue( "Accessibility",
2605  "EnableATToolSupport" );
2606  mxData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2607  }
2608  else
2609  {
2610  mxData->mnEnableATT = TRISTATE_TRUE;
2611  }
2612  }
2613 
2614  return mxData->mnEnableATT != TRISTATE_FALSE;
2615 }
2616 
2617 #ifdef _WIN32
2618 void MiscSettings::SetEnableATToolSupport( bool bEnable )
2619 {
2620  if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mxData->mnEnableATT )
2621  {
2622  if( bEnable && !ImplInitAccessBridge() )
2623  return;
2624 
2625  HKEY hkey;
2626 
2627  // If the accessibility key in the Windows registry exists, change it synchronously
2628  if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2629  L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2630  &hkey) )
2631  {
2632  DWORD dwType;
2633  wchar_t Data[6]; // possible values: "true", "false", 1, 0
2634  DWORD cbData = sizeof(Data);
2635 
2636  if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2637  nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2638  {
2639  switch (dwType)
2640  {
2641  case REG_SZ:
2642  RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2643  0, dwType,
2644  reinterpret_cast<const BYTE*>(bEnable ? L"true" : L"false"),
2645  bEnable ? sizeof(L"true") : sizeof(L"false"));
2646  break;
2647  case REG_DWORD:
2648  reinterpret_cast<DWORD *>(Data)[0] = bEnable ? 1 : 0;
2649  RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2650  0, dwType, reinterpret_cast<const BYTE*>(Data), sizeof(DWORD));
2651  break;
2652  default:
2653  // Unsupported registry type
2654  break;
2655  }
2656  }
2657 
2658  RegCloseKey(hkey);
2659  }
2660 
2662  setValue( "Accessibility",
2663  "EnableATToolSupport",
2664  bEnable ? OUString("true") : OUString("false" ) );
2665  mxData->mnEnableATT = bEnable ? TRISTATE_TRUE : TRISTATE_FALSE;
2666  }
2667 }
2668 #endif
2669 
2671 {
2672  // copy if other references exist
2673  if (mxData.use_count() > 1)
2674  {
2675  mxData = std::make_shared<ImplMiscData>(*mxData);
2676  }
2677  mxData->mbEnableLocalizedDecimalSep = bEnable;
2678 }
2679 
2681 {
2682  return mxData->mbEnableLocalizedDecimalSep;
2683 }
2684 
2686  : mxData(std::make_shared<ImplHelpData>())
2687 {
2688 }
2689 
2690 bool HelpSettings::operator ==( const HelpSettings& rSet ) const
2691 {
2692  if ( mxData == rSet.mxData )
2693  return true;
2694 
2695  return (mxData->mnTipTimeout == rSet.mxData->mnTipTimeout );
2696 }
2697 
2698 sal_uLong
2700 {
2701  return 500;
2702 }
2703 
2704 void
2706 {
2707  // copy if other references exist
2708  if (mxData.use_count() > 1)
2709  {
2710  mxData = std::make_shared<ImplHelpData>(*mxData);
2711  }
2712  mxData->mnTipTimeout = nTipTimeout;
2713 }
2714 
2715 sal_uLong
2717 {
2718  return mxData->mnTipTimeout;
2719 }
2720 
2721 sal_uLong
2723 {
2724  return 1500;
2725 }
2726 
2727 bool
2729 {
2730  return !(*this == rSet);
2731 }
2732 
2734  :
2735  maLocale( LANGUAGE_SYSTEM ),
2736  maUILocale( LANGUAGE_SYSTEM )
2737 {
2740 }
2741 
2743  maMouseSettings( rData.maMouseSettings ),
2744  maStyleSettings( rData.maStyleSettings ),
2745  maMiscSettings( rData.maMiscSettings ),
2746  maHelpSettings( rData.maHelpSettings ),
2747  maLocale( rData.maLocale ),
2748  maUILocale( rData.maUILocale )
2749 {
2750  // Create the cache objects new when their getter is called.
2751 }
2752 
2754 {
2755  mpLocaleDataWrapper.reset();
2756  mpUILocaleDataWrapper.reset();
2757  mpI18nHelper.reset();
2758  mpUII18nHelper.reset();
2759 }
2760 
2762  : mxData(std::make_shared<ImplAllSettingsData>())
2763 {
2764 }
2765 
2767 {
2768  // copy if other references exist
2769  if (mxData.use_count() > 1)
2770  {
2771  mxData = std::make_shared<ImplAllSettingsData>(*mxData);
2772  }
2773 
2774 }
2775 
2777 {
2778 
2780 
2781  if ( nFlags & AllSettingsFlags::MOUSE )
2782  {
2783  if ( mxData->maMouseSettings != rSet.mxData->maMouseSettings )
2784  {
2785  CopyData();
2786  mxData->maMouseSettings = rSet.mxData->maMouseSettings;
2787  nChangeFlags |= AllSettingsFlags::MOUSE;
2788  }
2789  }
2790 
2791  if ( nFlags & AllSettingsFlags::STYLE )
2792  {
2793  if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2794  {
2795  CopyData();
2796  mxData->maStyleSettings = rSet.mxData->maStyleSettings;
2797  nChangeFlags |= AllSettingsFlags::STYLE;
2798  }
2799  }
2800 
2801  if ( nFlags & AllSettingsFlags::MISC )
2802  {
2803  if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2804  {
2805  CopyData();
2806  mxData->maMiscSettings = rSet.mxData->maMiscSettings;
2807  nChangeFlags |= AllSettingsFlags::MISC;
2808  }
2809  }
2810 
2811  if ( nFlags & AllSettingsFlags::LOCALE )
2812  {
2813  if ( mxData->maLocale != rSet.mxData->maLocale )
2814  {
2815  SetLanguageTag( rSet.mxData->maLocale );
2816  nChangeFlags |= AllSettingsFlags::LOCALE;
2817  }
2818  }
2819 
2820  return nChangeFlags;
2821 }
2822 
2824 {
2825 
2827 
2828  if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2829  nChangeFlags |= AllSettingsFlags::STYLE;
2830 
2831  if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2832  nChangeFlags |= AllSettingsFlags::MISC;
2833 
2834  if ( mxData->maLocale != rSet.mxData->maLocale )
2835  nChangeFlags |= AllSettingsFlags::LOCALE;
2836 
2837  return nChangeFlags;
2838 }
2839 
2840 bool AllSettings::operator ==( const AllSettings& rSet ) const
2841 {
2842  if ( mxData == rSet.mxData )
2843  return true;
2844 
2845  if ( (mxData->maMouseSettings == rSet.mxData->maMouseSettings) &&
2846  (mxData->maStyleSettings == rSet.mxData->maStyleSettings) &&
2847  (mxData->maMiscSettings == rSet.mxData->maMiscSettings) &&
2848  (mxData->maHelpSettings == rSet.mxData->maHelpSettings) &&
2849  (mxData->maLocale == rSet.mxData->maLocale) )
2850  {
2851  return true;
2852  }
2853 
2854  return false;
2855 }
2856 
2857 void AllSettings::SetLanguageTag(const OUString& rLanguage, bool bCanonicalize)
2858 {
2859  SetLanguageTag(LanguageTag(rLanguage, bCanonicalize));
2860 }
2861 
2862 void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag )
2863 {
2864  if (mxData->maLocale != rLanguageTag)
2865  {
2866  CopyData();
2867 
2868  mxData->maLocale = rLanguageTag;
2869 
2870  if ( mxData->mpLocaleDataWrapper )
2871  {
2872  mxData->mpLocaleDataWrapper.reset();
2873  }
2874  if ( mxData->mpI18nHelper )
2875  {
2876  mxData->mpI18nHelper.reset();
2877  }
2878  }
2879 }
2880 
2881 namespace
2882 {
2883  bool GetConfigLayoutRTL(bool bMath)
2884  {
2885  static const char* pEnv = getenv("SAL_RTL_ENABLED" );
2886  static int nUIMirroring = -1; // -1: undef, 0: auto, 1: on 2: off
2887 
2888  // environment always overrides
2889  if( pEnv )
2890  return true;
2891 
2892  bool bRTL = false;
2893 
2894  if( nUIMirroring == -1 )
2895  {
2896  nUIMirroring = 0; // ask configuration only once
2899  "org.openoffice.Office.Common/I18N/CTL" ); // note: case sensitive !
2900  if ( aNode.isValid() )
2901  {
2902  bool bTmp = bool();
2903  css::uno::Any aValue = aNode.getNodeValue( "UIMirroring" );
2904  if( aValue >>= bTmp )
2905  {
2906  // found true or false; if it was nil, nothing is changed
2907  nUIMirroring = bTmp ? 1 : 2;
2908  }
2909  }
2910  }
2911 
2912  if( nUIMirroring == 0 ) // no config found (eg, setup) or default (nil) was set: check language
2913  {
2915  if (bMath)
2916  bRTL = MsLangId::isRightToLeftMath( aLang );
2917  else
2918  bRTL = MsLangId::isRightToLeft( aLang );
2919  }
2920  else
2921  bRTL = (nUIMirroring == 1);
2922 
2923  return bRTL;
2924  }
2925 }
2926 
2928 {
2930  return false;
2931  return GetConfigLayoutRTL(false);
2932 }
2933 
2935 {
2937  return false;
2938  return GetConfigLayoutRTL(true);
2939 }
2940 
2942 {
2944  {
2945  static LanguageTag aRet("en-US");
2946  return aRet;
2947  }
2948 
2951 
2952  // SYSTEM locale means: use settings from SvtSysLocale that is resolved
2953  if ( mxData->maLocale.isSystemLocale() )
2954  mxData->maLocale = mxData->maSysLocale.GetLanguageTag();
2955 
2956  return mxData->maLocale;
2957 }
2958 
2960 {
2962  {
2963  static LanguageTag aRet("en-US");
2964  return aRet;
2965  }
2966 
2969 
2970  // the UILocale is never changed
2971  if ( mxData->maUILocale.isSystemLocale() )
2972  mxData->maUILocale = mxData->maSysLocale.GetUILanguageTag();
2973 
2974  return mxData->maUILocale;
2975 }
2976 
2978 {
2979  if ( !mxData->mpLocaleDataWrapper )
2980  const_cast<AllSettings*>(this)->mxData->mpLocaleDataWrapper.reset( new LocaleDataWrapper(
2982  return *mxData->mpLocaleDataWrapper;
2983 }
2984 
2986 {
2987  if ( !mxData->mpUILocaleDataWrapper )
2988  const_cast<AllSettings*>(this)->mxData->mpUILocaleDataWrapper.reset( new LocaleDataWrapper(
2990  return *mxData->mpUILocaleDataWrapper;
2991 }
2992 
2994 {
2995  if ( !mxData->mpI18nHelper ) {
2996  const_cast<AllSettings*>(this)->mxData->mpI18nHelper.reset( new vcl::I18nHelper(
2998  }
2999  return *mxData->mpI18nHelper;
3000 }
3001 
3003 {
3004  if ( !mxData->mpUII18nHelper ) {
3005  const_cast<AllSettings*>(this)->mxData->mpUII18nHelper.reset( new vcl::I18nHelper(
3007  }
3008  return *mxData->mpUII18nHelper;
3009 }
3010 
3012 {
3013  AllSettings aAllSettings( Application::GetSettings() );
3014  if ( nHint & ConfigurationHints::DecSep )
3015  {
3016  MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
3017  bool bIsDecSepAsLocale = aAllSettings.mxData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale();
3018  if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale )
3019  {
3020  aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale );
3021  aAllSettings.SetMiscSettings( aMiscSettings );
3022  }
3023  }
3024 
3025  if ( nHint & ConfigurationHints::Locale )
3026  aAllSettings.SetLanguageTag( aAllSettings.mxData->maSysLocale.GetOptions().GetLanguageTag() );
3027 
3028  Application::SetSettings( aAllSettings );
3029 }
3030 
3031 const StyleSettings&
3033 {
3034  return mxData->maStyleSettings;
3035 }
3036 
3039 {
3040  return mxData->mnOptions;
3041 }
3042 
3043 std::vector<vcl::IconThemeInfo> const &
3045 {
3046  if (!mxData->mIconThemeScanner) {
3048  }
3049  return mxData->mIconThemeScanner->GetFoundIconThemes();
3050 }
3051 
3052 /*static*/ OUString
3054 {
3055  OUString desktopEnvironment = Application::GetDesktopEnvironment();
3056  if (!mxData->mIconThemeScanner) {
3058  }
3059  OUString themeName = mxData->mIconThemeSelector->SelectIconThemeForDesktopEnvironment(
3060  mxData->mIconThemeScanner->GetFoundIconThemes(),
3061  desktopEnvironment
3062  );
3063  return themeName;
3064 }
3065 
3066 void
3067 StyleSettings::SetIconTheme(const OUString& theme)
3068 {
3069  CopyData();
3070  mxData->mIconTheme = theme;
3071 }
3072 
3073 OUString
3075 {
3076  OUString sTheme(mxData->mIconTheme);
3077  if (sTheme.isEmpty())
3078  {
3080  sTheme = "colibre";
3081  else
3082  {
3083  // read from the configuration, or fallback to what the desktop wants
3084  uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
3085  if (xContext.is())
3086  {
3087  sTheme = officecfg::Office::Common::Misc::SymbolStyle::get(xContext);
3088 
3089  if (sTheme.isEmpty() || sTheme == "auto")
3091  }
3092  }
3093  }
3094 
3095  if (!mxData->mIconThemeScanner) {
3097  }
3098  OUString r = mxData->mIconThemeSelector->SelectIconTheme(
3099  mxData->mIconThemeScanner->GetFoundIconThemes(),
3100  sTheme);
3101  return r;
3102 }
3103 
3104 void
3106 {
3107  if (mxData->mbHighContrast == bHighContrast) {
3108  return;
3109  }
3110 
3111  CopyData();
3112  mxData->mbHighContrast = bHighContrast;
3113  mxData->mIconThemeSelector->SetUseHighContrastTheme(bHighContrast);
3114 }
3115 
3116 bool
3118 {
3119  return mxData->mbHighContrast;
3120 }
3121 
3122 void
3123 StyleSettings::SetPreferredIconTheme(const OUString& theme, bool bDarkIconTheme)
3124 {
3125  mxData->mIconThemeSelector->SetPreferredIconTheme(theme, bDarkIconTheme);
3126 }
3127 
3128 void
3130 {
3131  CopyData();
3132  mxData->maMouseSettings = rSet;
3133 }
3134 
3135 const MouseSettings&
3137 {
3138  return mxData->maMouseSettings;
3139 }
3140 
3141 void
3143 {
3144  CopyData();
3145  mxData->maStyleSettings = rSet;
3146 }
3147 
3148 void
3150 {
3151  CopyData();
3152  mxData->maMiscSettings = rSet;
3153 }
3154 
3155 const MiscSettings&
3157 {
3158  return mxData->maMiscSettings;
3159 }
3160 
3161 void
3163 {
3164  CopyData();
3165  mxData->maHelpSettings = rSet;
3166 }
3167 
3168 const HelpSettings&
3170 {
3171  return mxData->maHelpSettings;
3172 }
3173 
3174 bool
3176 {
3177  return !(*this == rSet);
3178 }
3179 
3180 SvtSysLocale&
3182 {
3183  return mxData->maSysLocale;
3184 }
3185 
3186 
3188  bool bCheckedColorSpecialCase )
3189 {
3190  Set3DColors( aBackColor );
3191  SetFaceColor( aBackColor );
3192  SetDialogColor( aBackColor );
3193  SetWorkspaceColor( aBackColor );
3194 
3195  if (bCheckedColorSpecialCase)
3197 }
3198 
3200  const vcl::Font& aLabelFont )
3201 {
3202  SetAppFont( aAppFont );
3203  SetPushButtonFont( aAppFont );
3204  SetToolFont( aAppFont );
3205  SetHelpFont( aAppFont );
3206 
3207  SetMenuFont( aLabelFont );
3208  SetTabFont( aLabelFont );
3209  SetLabelFont( aLabelFont );
3210  SetRadioCheckFont( aLabelFont );
3211  SetFieldFont( aLabelFont );
3212  SetGroupFont( aLabelFont );
3213  SetIconFont( aLabelFont );
3214 }
3215 
3216 /* 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:89
const LocaleDataWrapper & GetLocaleDataWrapper() const
bool GetContextMenuShortcuts() const
sal_Int32 nIndex
Color maHighlightTextColor
bool GetAutoMnemonic() const
const Color & GetDeactiveColor() const
const Color & GetDialogColor() const
Color maDefaultButtonRolloverTextColor
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)
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:155
void SetLightColor(const Color &rColor)
void SetMenuBarRolloverTextColor(const Color &rColor)
SelectionOptions GetSelectionOptions() const
void SetActionButtonTextColor(const Color &rColor)
bool operator==(const MouseSettings &rSet) const
const Color & GetInactiveTabColor() const
Color maWindowTextColor
SelectionOptions
Definition: settings.hxx:181
long GetDoubleClickWidth() const
void SetIconFont(const vcl::Font &rFont)
std::optional< Color > maPersonaMenuBarTextColor
Cache the menubar color.
sal_uInt16 mnListBoxMaximumLineCount
sal_uIntPtr sal_uLong
void SetMiscSettings(const MiscSettings &rSet)
void SetRadioCheckFont(const vcl::Font &rFont)
void SetFieldRolloverTextColor(const Color &rColor)
const Color & GetDefaultButtonTextColor() const
bool GetPreferredUseImagesInMenus() const
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
Gets the application's settings.
Definition: svapp.cxx:714
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:399
bool mbHideDisabledMenuItems
const Color & GetGroupTextColor() const
StyleSettingsOptions mnOptions
const Color & GetDefaultButtonPressedRolloverTextColor() const
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 ContentProperties & rData
const Color & GetActiveBorderColor() const
Color maDefaultButtonPressedRolloverTextColor
Color maTabHighlightTextColor
constexpr::Color COL_GRAY(0x80, 0x80, 0x80)
const Color & GetFieldRolloverTextColor() const
bool GetPreviewUsesCheckeredBackground() const
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 SetFlatButtonTextColor(const Color &rColor)
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:1583
const Color & GetHighlightColor() const
MouseFollowFlags GetFollow() const
bool GetPreferredContextMenuShortcuts() const
void SetLinkColor(const Color &rColor)
const Color & GetActiveTabColor() const
NONE
const Color & GetMenuHighlightTextColor() const
void SetDeactiveBorderColor(const Color &rColor)
void SetDeactiveColor(const Color &rColor)
AllSettingsFlags
Definition: settings.hxx:668
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
Definition: svapp.cxx:1059
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
const Color & GetDefaultButtonRolloverTextColor() 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
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:211
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:53
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:99
std::unique_ptr< LocaleDataWrapper > mpLocaleDataWrapper
ToolbarIconSize GetToolbarIconSize() const
bool operator!=(const MouseSettings &rSet) const
const Color & GetMenuColor() const
sal_uLong mnButtonRepeat
const LanguageTag & GetLanguageTag() const
vcl::Font maPushButtonFont
void SetFlatButtonPressedRolloverTextColor(const Color &rColor)
OUString maPersonaHeaderFooter
Cache the settings to detect changes.
Color maDefaultActionButtonTextColor
static ErrCode LoadGraphic(const OUString &rPath, const OUString &rFilter, Graphic &rGraphic, GraphicFilter *pFilter=nullptr, sal_uInt16 *pDeterminedFormat=nullptr)
MouseFollowFlags
Definition: settings.hxx:65
void SetCursorBlinkTime(sal_uInt64 nBlinkTime)
Color maFieldTextColor
bool mbEnableLocalizedDecimalSep
void SetPreferredUseImagesInMenus(bool bPreferredUseImagesInMenus)
const Color & GetDarkShadowColor() const
const DialogStyle & GetDialogStyle() const
bool IsEmpty() const
Definition: bitmapex.cxx:203
MouseWheelBehaviour GetWheelBehavior() const
ImplSVData * ImplGetSVData()
Definition: svdata.cxx:75
#define SAL_CONFIGFILE(name)
Color maAlternatingRowColor
const Color & GetActionButtonRolloverTextColor() const
const vcl::Font & GetPushButtonFont() const
vcl::Font maGroupFont
void SetActionButtonRolloverTextColor(const Color &rColor)
const Color & GetDisableColor() const
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:218
long GetCursorSize() const
bool GetUseSystemUIFonts() const
const Color & GetActionButtonPressedRolloverTextColor() const
const Color & GetMenuBarColor() const
MouseMiddleButtonAction GetMiddleButtonAction() const
const vcl::Font & GetToolFont() const
void SetListBoxMaximumLineCount(sal_uInt16 nCount)
void SetEdgeBlending(sal_uInt16 nCount)
const std::optional< Color > & GetPersonaMenuBarTextColor() const
#define LANGUAGE_SYSTEM
DialogStyle maDialogStyle
static void SetSettings(const AllSettings &rSettings)
Sets the application's settings and notifies all windows of the change.
Definition: svapp.cxx:620
Color maCheckedColor
DisplayOptions GetDisplayOptions() const
void SetLanguageTag(const OUString &rLanguage, bool bCanonicalize)
void SetMenuBarColor(const Color &rColor)
const vcl::Font & GetTabFont() const
void SetMouseSettings(const MouseSettings &rSet)
sal_uInt16 mnColorValueSetColumnCount
Color maMenuHighlightTextColor
void SetButtonRolloverTextColor(const Color &rColor)
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:338
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)
void SetActionButtonPressedRolloverTextColor(const Color &rColor)
void SetDefaultButtonPressedRolloverTextColor(const Color &rColor)
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:685
void SetLabelTextColor(const Color &rColor)
const Color & GetCheckedColor() const
Color maDefaultActionButtonPressedRolloverTextColor
LanguageTag maUILocale
void SetDefaultActionButtonPressedRolloverTextColor(const Color &rColor)
Color maMenuBarHighlightTextColor
const Color & GetDefaultActionButtonPressedRolloverTextColor() const
void SetDefaultButtonTextColor(const Color &rColor)
void SetUseImagesInMenus(TriState eUseImagesInMenus)
MouseSettingsOptions mnOptions
Color maHighlightColor
void SetInactiveTabColor(const Color &rColor)
void SetToolFont(const vcl::Font &rFont)
const Color & GetLinkColor() const
WhichPersona
void SetPreferredContextMenuShortcuts(bool bContextMenuShortcuts)
void SetFloatTitleFont(const vcl::Font &rFont)
const Color & GetButtonRolloverTextColor() const
const Color & GetDefaultActionButtonRolloverTextColor() const
static sal_uInt16 GetColorValueSetMaximumRowCount()
StyleSettingsOptions GetOptions() const
void SetDoubleClickWidth(long nDoubleClkWidth)
Color maFlatButtonRolloverTextColor
Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:934
static sal_uLong GetActionDelay()
static DefaultFontConfiguration & get()
SelectionOptions mnSelectionOptions
const vcl::I18nHelper & GetLocaleI18nHelper() const
static bool GetMathLayoutRTL()
Color maDefaultActionButtonRolloverTextColor
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)
Color maDefaultButtonTextColor
StyleSettings maStyleSettings
Color maFlatButtonTextColor
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
void SetFlatButtonRolloverTextColor(const Color &rColor)
Color GetFaceGradientColor() const
vcl::Font maTabFont
static bool IsHeadlessModeEnabled()
Determines if headless mode is enabled.
Definition: svapp.cxx:1527
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
const Color & GetFlatButtonRolloverTextColor() const
OUString aName
FAMILY_SWISS
const vcl::Font & GetIconFont() const
const Color & GetFlatButtonPressedRolloverTextColor() const
ToolbarIconSize
Definition: settings.hxx:203
const Color & GetTabHighlightTextColor() const
Size maListBoxPreviewDefaultPixelSize
bool GetPrimaryButtonWarpsSlider() const
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)
Color maFlatButtonPressedRolloverTextColor
void Set3DColors(const Color &rColor)
AllSettingsFlags Update(AllSettingsFlags nFlags, const AllSettings &rSettings)
void SetHelpSettings(const HelpSettings &rSet)
void SetListBoxPreviewDefaultLogicSize(Size const &rSize)
TriState meContextMenuShortcuts
static sal_uInt16 GetListBoxPreviewDefaultLineWidth()
void SetMenuDelay(sal_uLong nDelay)
DisplayOptions
Definition: settings.hxx:193
void SetTabFont(const vcl::Font &rFont)
const MiscSettings & GetMiscSettings() const
Color maDialogTextColor
BitmapEx maPersonaHeaderBitmap
Cache the header bitmap.
const Color & GetButtonPressedRolloverTextColor() const
bool operator==(const AllSettings &rSet) const
const Color & GetTabRolloverTextColor() const
MouseWheelBehaviour
Definition: settings.hxx:80
void SetDeactiveTextColor(const Color &rColor)
void SetFieldTextColor(const Color &rColor)
constexpr::Color COL_BLUE(0x00, 0x00, 0x80)
bool operator!=(const HelpSettings &rSet) const
void SetStandardStyles()
void SetShadowColor(const Color &rColor)
void RGBtoHSB(sal_uInt16 &nHue, sal_uInt16 &nSaturation, sal_uInt16 &nBrightness) const
const Color & GetDeactiveBorderColor() const
void SetColorValueSetColumnCount(sal_uInt16 nCount)
Color maRadioCheckTextColor
bool GetEnableATToolSupport() const
std::unique_ptr< vcl::I18nHelper > mpI18nHelper
const Color & GetHighlightLinkColor() const
std::shared_ptr< ImplHelpData > mxData
Definition: settings.hxx:653
DragFullOptions
Definition: settings.hxx:166
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
void SetDefaultButtonRolloverTextColor(const Color &rColor)
static bool isRightToLeftMath(LanguageType nLang)
bool operator!=(const AllSettings &rSet) const
HelpSettings maHelpSettings
const Color & GetMenuBarRolloverTextColor() const
void SetHelpTextColor(const Color &rColor)
void SetButtonRepeat(sal_uLong nRepeat)
sal_uInt64 mnCursorBlinkTime
void SetWindowTextColor(const Color &rColor)
void SetUseFlatMenus(bool bUseFlatMenus)
static void setupPersonaHeaderFooter(WhichPersona eWhich, OUString &rHeaderFooter, BitmapEx &rHeaderFooterBitmap, std::optional< Color > &rMenuBarTextColor)
Update the setting of the Persona header / footer in ImplStyleData.
static sal_uInt16 GetContextMenuClicks()
const Color & GetDialogTextColor() const
TriState
static sal_uLong GetScrollRepeat()
void SetHighlightTextColor(const Color &rColor)
const Color & GetEdgeBlendingTopLeftColor() const
MouseSettings maMouseSettings
Color maActionButtonPressedRolloverTextColor
const Color & GetFlatButtonTextColor() const
SvtSysLocaleOptions & GetOptions() const
void SetDefaultActionButtonRolloverTextColor(const Color &rColor)
#define MOUSE_RIGHT
Definition: event.hxx:101
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:633
bool GetUseFlatBorders() const
MouseMiddleButtonAction
Definition: settings.hxx:75
Color maVisitedLinkColor
std::unique_ptr< vcl::I18nHelper > mpUII18nHelper
static sal_uLong GetButtonStartRepeat()
vcl::Font maAppFont
void SetActiveColor(const Color &rColor)
Color maEdgeBlendingTopLeftColor