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