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  sal_Int32 mnDoubleClkWidth = 2;
63  sal_Int32 mnDoubleClkHeight = 2;
64  sal_Int32 mnStartDragWidth = 2 ;
65  sal_Int32 mnStartDragHeight = 2;
66  sal_Int32 mnButtonRepeat = 90;
67  sal_Int32 mnMenuDelay = 150;
71 };
72 
74 {
75  ImplStyleData();
77 
78  void SetStandardStyles();
79 
157  sal_Int32 mnTitleHeight;
159  sal_Int32 mnScrollBarSize;
160  sal_Int32 mnSpinSize;
161  sal_Int32 mnCursorSize;
162  sal_Int32 mnAntialiasedMin;
163  sal_uInt64 mnCursorBlinkTime;
181  sal_Int32 mnMinThumbSize;
182  std::shared_ptr<vcl::IconThemeScanner>
184  std::shared_ptr<vcl::IconThemeSelector>
186 
187  OUString mIconTheme;
192  //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise
193  //primary means scroll by single page. Secondary button takes the alternative behaviour
196 
197  sal_uInt16 mnEdgeBlending;
205 
207 
210  std::optional<Color> maPersonaMenuBarTextColor;
211 };
212 
214 {
215  ImplMiscData();
219 };
220 
222 {
223  sal_Int32 mnTipTimeout = 3000;
224 };
225 
227 {
231 
238  std::unique_ptr<LocaleDataWrapper> mpLocaleDataWrapper;
239  std::unique_ptr<LocaleDataWrapper> mpUILocaleDataWrapper;
240  std::unique_ptr<LocaleDataWrapper> mpNeutralLocaleDataWrapper;
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( sal_Int32 nDoubleClkWidth )
274 {
275  CopyData();
276  mxData->mnDoubleClkWidth = nDoubleClkWidth;
277 }
278 
279 sal_Int32
281 {
282  return mxData->mnDoubleClkWidth;
283 }
284 
285 void
286 MouseSettings::SetDoubleClickHeight( sal_Int32 nDoubleClkHeight )
287 {
288  CopyData();
289  mxData->mnDoubleClkHeight = nDoubleClkHeight;
290 }
291 
292 sal_Int32
294 {
295  return mxData->mnDoubleClkHeight;
296 }
297 
298 void
299 MouseSettings::SetStartDragWidth( sal_Int32 nDragWidth )
300 {
301  CopyData();
302  mxData->mnStartDragWidth = nDragWidth;
303 }
304 
305 sal_Int32
307 {
308  return mxData->mnStartDragWidth;
309 }
310 
311 void
312 MouseSettings::SetStartDragHeight( sal_Int32 nDragHeight )
313 {
314  CopyData();
315  mxData->mnStartDragHeight = nDragHeight;
316 }
317 
318 sal_Int32
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_Int32
344 {
345  return 100;
346 }
347 
348 sal_Int32
350 {
351  return 370;
352 }
353 
354 void
355 MouseSettings::SetButtonRepeat( sal_Int32 nRepeat )
356 {
357  CopyData();
358  mxData->mnButtonRepeat = nRepeat;
359 }
360 
361 sal_Int32
363 {
364  return mxData->mnButtonRepeat;
365 }
366 
367 sal_Int32
369 {
370  return 250;
371 }
372 
373 void
374 MouseSettings::SetMenuDelay( sal_Int32 nDelay )
375 {
376  CopyData();
377  mxData->mnMenuDelay = nDelay;
378 }
379 
380 sal_Int32
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  maHighlightTextColor( rData.maHighlightTextColor ),
537  maLabelTextColor( rData.maLabelTextColor ),
538  maLightBorderColor( rData.maLightBorderColor ),
539  maLightColor( rData.maLightColor ),
540  maLinkColor( rData.maLinkColor ),
541  maMenuBarColor( rData.maMenuBarColor ),
542  maMenuBarRolloverColor( rData.maMenuBarRolloverColor ),
543  maMenuBorderColor( rData.maMenuBorderColor ),
544  maMenuColor( rData.maMenuColor ),
545  maMenuHighlightColor( rData.maMenuHighlightColor ),
546  maMenuHighlightTextColor( rData.maMenuHighlightTextColor ),
547  maMenuTextColor( rData.maMenuTextColor ),
548  maMenuBarTextColor( rData.maMenuBarTextColor ),
549  maMenuBarRolloverTextColor( rData.maMenuBarRolloverTextColor ),
550  maMenuBarHighlightTextColor( rData.maMenuBarHighlightTextColor ),
551  maMonoColor( rData.maMonoColor ),
552  maRadioCheckTextColor( rData.maRadioCheckTextColor ),
553  maShadowColor( rData.maShadowColor ),
554  maVisitedLinkColor( rData.maVisitedLinkColor ),
555  maToolTextColor( rData.maToolTextColor ),
556  maWindowColor( rData.maWindowColor ),
557  maWindowTextColor( rData.maWindowTextColor ),
558  maWorkspaceColor( rData.maWorkspaceColor ),
559  maActiveTabColor( rData.maActiveTabColor ),
560  maInactiveTabColor( rData.maInactiveTabColor ),
561  maTabTextColor( rData.maTabTextColor ),
562  maTabRolloverTextColor( rData.maTabRolloverTextColor ),
563  maTabHighlightTextColor( rData.maTabHighlightTextColor ),
564  maAppFont( rData.maAppFont ),
565  maHelpFont( rData.maAppFont ),
566  maTitleFont( rData.maTitleFont ),
567  maFloatTitleFont( rData.maFloatTitleFont ),
568  maMenuFont( rData.maMenuFont ),
569  maToolFont( rData.maToolFont ),
570  maLabelFont( rData.maLabelFont ),
571  maRadioCheckFont( rData.maRadioCheckFont ),
572  maPushButtonFont( rData.maPushButtonFont ),
573  maFieldFont( rData.maFieldFont ),
574  maIconFont( rData.maIconFont ),
575  maTabFont( rData.maTabFont ),
576  maGroupFont( rData.maGroupFont ),
577  mnTitleHeight(rData.mnTitleHeight),
578  mnFloatTitleHeight(rData.mnFloatTitleHeight),
579  mnScrollBarSize(rData.mnScrollBarSize),
580  mnSpinSize(rData.mnSpinSize),
581  mnCursorSize(rData.mnCursorSize),
582  mnAntialiasedMin(rData.mnAntialiasedMin),
583  mnCursorBlinkTime(rData.mnCursorBlinkTime),
584  mnDragFullOptions(rData.mnDragFullOptions),
585  mnSelectionOptions(rData.mnSelectionOptions),
586  mnDisplayOptions(rData.mnDisplayOptions),
587  mnToolbarIconSize(rData.mnToolbarIconSize),
588  mnUseFlatMenus(rData.mnUseFlatMenus),
589  mnOptions(rData.mnOptions),
590  mbHighContrast(rData.mbHighContrast),
591  mbUseSystemUIFonts(rData.mbUseSystemUIFonts),
592  mbUseFontAAFromSystem(rData.mbUseFontAAFromSystem),
593  mbAutoMnemonic(rData.mbAutoMnemonic),
594  meUseImagesInMenus(rData.meUseImagesInMenus),
595  mnUseFlatBorders(rData.mnUseFlatBorders),
596  mbPreferredUseImagesInMenus(rData.mbPreferredUseImagesInMenus),
597  mnMinThumbSize(rData.mnMinThumbSize),
598  mIconThemeSelector(std::make_shared<vcl::IconThemeSelector>(*rData.mIconThemeSelector)),
599  mIconTheme(rData.mIconTheme),
600  mbSkipDisabledInMenus(rData.mbSkipDisabledInMenus),
601  mbHideDisabledMenuItems(rData.mbHideDisabledMenuItems),
602  mbPreferredContextMenuShortcuts(rData.mbPreferredContextMenuShortcuts),
603  meContextMenuShortcuts(rData.meContextMenuShortcuts),
604  mbPrimaryButtonWarpsSlider(rData.mbPrimaryButtonWarpsSlider),
605  maDialogStyle( rData.maDialogStyle ),
606  mnEdgeBlending(rData.mnEdgeBlending),
607  maEdgeBlendingTopLeftColor(rData.maEdgeBlendingTopLeftColor),
608  maEdgeBlendingBottomRightColor(rData.maEdgeBlendingBottomRightColor),
609  mnListBoxMaximumLineCount(rData.mnListBoxMaximumLineCount),
610  mnColorValueSetColumnCount(rData.mnColorValueSetColumnCount),
611  maListBoxPreviewDefaultLogicSize(rData.maListBoxPreviewDefaultLogicSize),
612  maListBoxPreviewDefaultPixelSize(rData.maListBoxPreviewDefaultPixelSize),
613  mbPreviewUsesCheckeredBackground(rData.mbPreviewUsesCheckeredBackground),
614  maPersonaHeaderFooter( rData.maPersonaHeaderFooter ),
615  maPersonaHeaderBitmap( rData.maPersonaHeaderBitmap ),
616  maPersonaFooterBitmap( rData.maPersonaFooterBitmap ),
617  maPersonaMenuBarTextColor( rData.maPersonaMenuBarTextColor )
618 {
619  if (rData.mIconThemeScanner)
620  mIconThemeScanner = std::make_shared<vcl::IconThemeScanner>(*rData.mIconThemeScanner);
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 );
698  // make active like highlight, except with a small contrast
708  maHelpColor = Color( 0xFF, 0xFF, 0xE0 );
711  maVisitedLinkColor = Color( 0x00, 0x00, 0xCC );
714  maAlternatingRowColor = Color( 0xEE, 0xEE, 0xEE );
715 
716  mnTitleHeight = 18;
717  mnFloatTitleHeight = 13;
718  mbHighContrast = false;
719  mbUseSystemUIFonts = true;
720  mbUseFontAAFromSystem = true;
721  mnUseFlatBorders = false;
722  mnUseFlatMenus = false;
724  mbSkipDisabledInMenus = false;
725  mbHideDisabledMenuItems = false;
728 }
729 
731  : mxData(std::make_shared<ImplStyleData>())
732 {
733 }
734 
735 void
737 {
738  CopyData();
739  mxData->maFaceColor = rColor;
740 }
741 
742 const Color&
744 {
745  return mxData->maFaceColor;
746 }
747 
748 void
750 {
751  CopyData();
752  mxData->maCheckedColor = rColor;
753 }
754 
755 const Color&
757 {
758  return mxData->maCheckedColor;
759 }
760 
761 void
763 {
764  CopyData();
765  mxData->maLightColor = rColor;
766 }
767 
768 const Color&
770 {
771  return mxData->maLightColor;
772 }
773 
774 void
776 {
777  CopyData();
778  mxData->maLightBorderColor = rColor;
779 }
780 
781 const Color&
783 {
784  return mxData->maLightBorderColor;
785 }
786 
787 void
789 {
790  CopyData();
791  mxData->maShadowColor = rColor;
792 }
793 
794 const Color&
796 {
797  return mxData->maShadowColor;
798 }
799 
800 void
802 {
803  CopyData();
804  mxData->maDarkShadowColor = rColor;
805 }
806 
807 const Color&
809 {
810  return mxData->maDarkShadowColor;
811 }
812 
813 void
815 {
816  CopyData();
817  mxData->maDefaultButtonTextColor = rColor;
818 }
819 
820 const Color&
822 {
823  return mxData->maDefaultButtonTextColor;
824 }
825 
826 void
828 {
829  CopyData();
830  mxData->maButtonTextColor = rColor;
831 }
832 
833 const Color&
835 {
836  return mxData->maButtonTextColor;
837 }
838 
839 void
841 {
842  CopyData();
843  mxData->maDefaultActionButtonTextColor = rColor;
844 }
845 
846 const Color&
848 {
849  return mxData->maDefaultActionButtonTextColor;
850 }
851 
852 void
854 {
855  CopyData();
856  mxData->maActionButtonTextColor = rColor;
857 }
858 
859 const Color&
861 {
862  return mxData->maActionButtonTextColor;
863 }
864 
865 void
867 {
868  CopyData();
869  mxData->maFlatButtonTextColor = rColor;
870 }
871 
872 const Color&
874 {
875  return mxData->maFlatButtonTextColor;
876 }
877 
878 void
880 {
881  CopyData();
882  mxData->maDefaultButtonRolloverTextColor = rColor;
883 }
884 
885 const Color&
887 {
888  return mxData->maDefaultButtonRolloverTextColor;
889 }
890 
891 void
893 {
894  CopyData();
895  mxData->maButtonRolloverTextColor = rColor;
896 }
897 
898 const Color&
900 {
901  return mxData->maButtonRolloverTextColor;
902 }
903 
904 void
906 {
907  CopyData();
908  mxData->maDefaultActionButtonRolloverTextColor = rColor;
909 }
910 
911 const Color&
913 {
914  return mxData->maDefaultActionButtonRolloverTextColor;
915 }
916 
917 void
919 {
920  CopyData();
921  mxData->maActionButtonRolloverTextColor = rColor;
922 }
923 
924 const Color&
926 {
927  return mxData->maActionButtonRolloverTextColor;
928 }
929 
930 void
932 {
933  CopyData();
934  mxData->maFlatButtonRolloverTextColor = rColor;
935 }
936 
937 const Color&
939 {
940  return mxData->maFlatButtonRolloverTextColor;
941 }
942 
943 void
945 {
946  CopyData();
947  mxData->maDefaultButtonPressedRolloverTextColor = rColor;
948 }
949 
950 const Color&
952 {
953  return mxData->maDefaultButtonPressedRolloverTextColor;
954 }
955 
956 void
958 {
959  CopyData();
960  mxData->maButtonPressedRolloverTextColor = rColor;
961 }
962 
963 const Color&
965 {
966  return mxData->maButtonPressedRolloverTextColor;
967 }
968 
969 void
971 {
972  CopyData();
973  mxData->maDefaultActionButtonPressedRolloverTextColor = rColor;
974 }
975 
976 const Color&
978 {
979  return mxData->maDefaultActionButtonPressedRolloverTextColor;
980 }
981 
982 void
984 {
985  CopyData();
986  mxData->maActionButtonPressedRolloverTextColor = rColor;
987 }
988 
989 const Color&
991 {
992  return mxData->maActionButtonPressedRolloverTextColor;
993 }
994 
995 void
997 {
998  CopyData();
999  mxData->maFlatButtonPressedRolloverTextColor = rColor;
1000 }
1001 
1002 const Color&
1004 {
1005  return mxData->maFlatButtonPressedRolloverTextColor;
1006 }
1007 
1008 void
1010 {
1011  CopyData();
1012  mxData->maRadioCheckTextColor = rColor;
1013 }
1014 
1015 const Color&
1017 {
1018  return mxData->maRadioCheckTextColor;
1019 }
1020 
1021 void
1023 {
1024  CopyData();
1025  mxData->maGroupTextColor = rColor;
1026 }
1027 
1028 const Color&
1030 {
1031  return mxData->maGroupTextColor;
1032 }
1033 
1034 void
1036 {
1037  CopyData();
1038  mxData->maLabelTextColor = rColor;
1039 }
1040 
1041 const Color&
1043 {
1044  return mxData->maLabelTextColor;
1045 }
1046 
1047 void
1049 {
1050  CopyData();
1051  mxData->maWindowColor = rColor;
1052 }
1053 
1054 const Color&
1056 {
1057  return mxData->maWindowColor;
1058 }
1059 
1060 void
1062 {
1063  CopyData();
1064  mxData->maWindowTextColor = rColor;
1065 }
1066 
1067 const Color&
1069 {
1070  return mxData->maWindowTextColor;
1071 }
1072 
1073 void
1075 {
1076  CopyData();
1077  mxData->maDialogColor = rColor;
1078 }
1079 
1080 const Color&
1082 {
1083  return mxData->maDialogColor;
1084 }
1085 
1086 void
1088 {
1089  CopyData();
1090  mxData->maDialogTextColor = rColor;
1091 }
1092 
1093 const Color&
1095 {
1096  return mxData->maDialogTextColor;
1097 }
1098 
1099 void
1101 {
1102  CopyData();
1103  mxData->maWorkspaceColor = rColor;
1104 }
1105 
1106 const Color&
1108 {
1109  return mxData->maWorkspaceColor;
1110 }
1111 
1112 void
1114 {
1115  CopyData();
1116  mxData->maFieldColor = rColor;
1117 }
1118 
1119 const Color&
1121 {
1122  return mxData->maFieldColor;
1123 }
1124 
1125 void
1127 {
1128  CopyData();
1129  mxData->maFieldTextColor = rColor;
1130 }
1131 
1132 const Color&
1134 {
1135  return mxData->maFieldTextColor;
1136 }
1137 
1138 void
1140 {
1141  CopyData();
1142  mxData->maFieldRolloverTextColor = rColor;
1143 }
1144 
1145 const Color&
1147 {
1148  return mxData->maFieldRolloverTextColor;
1149 }
1150 
1151 void
1153 {
1154  CopyData();
1155  mxData->maActiveColor = rColor;
1156 }
1157 
1158 const Color&
1160 {
1161  return mxData->maActiveColor;
1162 }
1163 
1164 void
1166 {
1167  CopyData();
1168  mxData->maActiveTextColor = rColor;
1169 }
1170 
1171 const Color&
1173 {
1174  return mxData->maActiveTextColor;
1175 }
1176 
1177 void
1179 {
1180  CopyData();
1181  mxData->maActiveBorderColor = rColor;
1182 }
1183 
1184 const Color&
1186 {
1187  return mxData->maActiveBorderColor;
1188 }
1189 
1190 void
1192 {
1193  CopyData();
1194  mxData->maDeactiveColor = rColor;
1195 }
1196 
1197 const Color&
1199 {
1200  return mxData->maDeactiveColor;
1201 }
1202 
1203 void
1205 {
1206  CopyData();
1207  mxData->maDeactiveTextColor = rColor;
1208 }
1209 
1210 const Color&
1212 {
1213  return mxData->maDeactiveTextColor;
1214 }
1215 
1216 void
1218 {
1219  CopyData();
1220  mxData->maDeactiveBorderColor = rColor;
1221 }
1222 
1223 const Color&
1225 {
1226  return mxData->maDeactiveBorderColor;
1227 }
1228 
1229 void
1231 {
1232  CopyData();
1233  mxData->maHighlightColor = rColor;
1234 }
1235 
1236 const Color&
1238 {
1239  return mxData->maHighlightColor;
1240 }
1241 
1242 void
1244 {
1245  CopyData();
1246  mxData->maHighlightTextColor = rColor;
1247 }
1248 
1249 const Color&
1251 {
1252  return mxData->maHighlightTextColor;
1253 }
1254 
1255 void
1257 {
1258  CopyData();
1259  mxData->maDisableColor = rColor;
1260 }
1261 
1262 const Color&
1264 {
1265  return mxData->maDisableColor;
1266 }
1267 
1268 void
1270 {
1271  CopyData();
1272  mxData->maHelpColor = rColor;
1273 }
1274 
1275 const Color&
1277 {
1278  return mxData->maHelpColor;
1279 }
1280 
1281 void
1283 {
1284  CopyData();
1285  mxData->maHelpTextColor = rColor;
1286 }
1287 
1288 const Color&
1290 {
1291  return mxData->maHelpTextColor;
1292 }
1293 
1294 void
1296 {
1297  CopyData();
1298  mxData->maMenuColor = rColor;
1299 }
1300 
1301 const Color&
1303 {
1304  return mxData->maMenuColor;
1305 }
1306 
1307 void
1309 {
1310  CopyData();
1311  mxData->maMenuBarColor = rColor;
1312 }
1313 
1314 const Color&
1316 {
1317  return mxData->maMenuBarColor;
1318 }
1319 
1320 void
1322 {
1323  CopyData();
1324  mxData->maMenuBarRolloverColor = rColor;
1325 }
1326 
1327 const Color&
1329 {
1330  return mxData->maMenuBarRolloverColor;
1331 }
1332 
1333 void
1335 {
1336  CopyData();
1337  mxData->maMenuBorderColor = rColor;
1338 }
1339 
1340 const Color&
1342 {
1343  return mxData->maMenuBorderColor;
1344 }
1345 
1346 void
1348 {
1349  CopyData();
1350  mxData->maMenuTextColor = rColor;
1351 }
1352 
1353 const Color&
1355 {
1356  return mxData->maMenuTextColor;
1357 }
1358 
1359 void
1361 {
1362  CopyData();
1363  mxData->maMenuBarTextColor = rColor;
1364 }
1365 
1366 const Color&
1368 {
1369  return mxData->maMenuBarTextColor;
1370 }
1371 
1372 void
1374 {
1375  CopyData();
1376  mxData->maMenuBarRolloverTextColor = rColor;
1377 }
1378 
1379 const Color&
1381 {
1382  return mxData->maMenuBarRolloverTextColor;
1383 }
1384 
1385 void
1387 {
1388  CopyData();
1389  mxData->maMenuBarHighlightTextColor = rColor;
1390 }
1391 
1392 const Color&
1394 {
1395  return mxData->maMenuBarHighlightTextColor;
1396 }
1397 
1398 void
1400 {
1401  CopyData();
1402  mxData->maMenuHighlightColor = rColor;
1403 }
1404 
1405 const Color&
1407 {
1408  return mxData->maMenuHighlightColor;
1409 }
1410 
1411 void
1413 {
1414  CopyData();
1415  mxData->maMenuHighlightTextColor = rColor;
1416 }
1417 
1418 const Color&
1420 {
1421  return mxData->maMenuHighlightTextColor;
1422 }
1423 
1424 void
1426 {
1427  CopyData();
1428  mxData->maTabTextColor = rColor;
1429 }
1430 
1431 const Color&
1433 {
1434  return mxData->maTabTextColor;
1435 }
1436 
1437 void
1439 {
1440  CopyData();
1441  mxData->maTabRolloverTextColor = rColor;
1442 }
1443 
1444 const Color&
1446 {
1447  return mxData->maTabRolloverTextColor;
1448 }
1449 
1450 void
1452 {
1453  CopyData();
1454  mxData->maTabHighlightTextColor = rColor;
1455 }
1456 
1457 const Color&
1459 {
1460  return mxData->maTabHighlightTextColor;
1461 }
1462 
1463 void
1465 {
1466  CopyData();
1467  mxData->maLinkColor = rColor;
1468 }
1469 
1470 const Color&
1472 {
1473  return mxData->maLinkColor;
1474 }
1475 
1476 void
1478 {
1479  CopyData();
1480  mxData->maVisitedLinkColor = rColor;
1481 }
1482 
1483 const Color&
1485 {
1486  return mxData->maVisitedLinkColor;
1487 }
1488 
1489 void
1491 {
1492  CopyData();
1493  mxData->maToolTextColor = rColor;
1494 }
1495 
1496 const Color&
1498 {
1499  return mxData->maToolTextColor;
1500 }
1501 
1502 void
1504 {
1505  CopyData();
1506  mxData->maMonoColor = rColor;
1507 }
1508 
1509 const Color&
1511 {
1512  return mxData->maMonoColor;
1513 }
1514 
1515 void
1517 {
1518  CopyData();
1519  mxData->maActiveTabColor = rColor;
1520 }
1521 
1522 const Color&
1524 {
1525  return mxData->maActiveTabColor;
1526 }
1527 
1528 void
1530 {
1531  CopyData();
1532  mxData->maInactiveTabColor = rColor;
1533 }
1534 
1535 const Color&
1537 {
1538  return mxData->maInactiveTabColor;
1539 }
1540 
1542 {
1543  CopyData();
1544  mxData->maAlternatingRowColor = rColor;
1545 }
1546 
1547 const Color&
1549 {
1550  return mxData->maAlternatingRowColor;
1551 }
1552 
1553 void
1554 StyleSettings::SetUseSystemUIFonts( bool bUseSystemUIFonts )
1555 {
1556  CopyData();
1557  mxData->mbUseSystemUIFonts = bUseSystemUIFonts;
1558 }
1559 
1560 bool
1562 {
1563  return mxData->mbUseSystemUIFonts;
1564 }
1565 
1566 void StyleSettings::SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
1567 {
1568  CopyData();
1569  mxData->mbUseFontAAFromSystem = bUseFontAAFromSystem;
1570 }
1571 
1573 {
1574  return mxData->mbUseFontAAFromSystem;
1575 }
1576 
1577 void
1578 StyleSettings::SetUseFlatBorders( bool bUseFlatBorders )
1579 {
1580  CopyData();
1581  mxData->mnUseFlatBorders = bUseFlatBorders;
1582 }
1583 
1584 bool
1586 {
1587  return mxData->mnUseFlatBorders;
1588 }
1589 
1590 void
1591 StyleSettings::SetUseFlatMenus( bool bUseFlatMenus )
1592 {
1593  CopyData();
1594  mxData->mnUseFlatMenus = bUseFlatMenus;
1595 }
1596 
1597 bool
1599 {
1600  return mxData->mnUseFlatMenus;
1601 }
1602 
1603 void
1605 {
1606  CopyData();
1607  mxData->meUseImagesInMenus = eUseImagesInMenus;
1608 }
1609 
1610 void
1611 StyleSettings::SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus )
1612 {
1613  CopyData();
1614  mxData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus;
1615 }
1616 
1617 bool
1619 {
1620  return mxData->mbPreferredUseImagesInMenus;
1621 }
1622 
1623 void
1624 StyleSettings::SetSkipDisabledInMenus( bool bSkipDisabledInMenus )
1625 {
1626  CopyData();
1627  mxData->mbSkipDisabledInMenus = bSkipDisabledInMenus;
1628 }
1629 
1630 bool
1632 {
1633  return mxData->mbSkipDisabledInMenus;
1634 }
1635 
1636 void
1637 StyleSettings::SetHideDisabledMenuItems( bool bHideDisabledMenuItems )
1638 {
1639  CopyData();
1640  mxData->mbHideDisabledMenuItems = bHideDisabledMenuItems;
1641 }
1642 
1643 bool
1645 {
1646  return mxData->mbHideDisabledMenuItems;
1647 }
1648 
1649 void
1651 {
1652  CopyData();
1653  mxData->meContextMenuShortcuts = eContextMenuShortcuts;
1654 }
1655 
1656 bool
1658 {
1659  switch (mxData->meContextMenuShortcuts)
1660  {
1661  case TRISTATE_FALSE:
1662  return false;
1663  case TRISTATE_TRUE:
1664  return true;
1665  default: // TRISTATE_INDET:
1667  }
1668 }
1669 
1670 void
1672 {
1673  CopyData();
1674  mxData->mbPreferredContextMenuShortcuts = bContextMenuShortcuts;
1675 }
1676 
1677 bool
1679 {
1680  return mxData->mbPreferredContextMenuShortcuts;
1681 }
1682 
1683 void
1684 StyleSettings::SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider )
1685 {
1686  CopyData();
1687  mxData->mbPrimaryButtonWarpsSlider = bPrimaryButtonWarpsSlider;
1688 }
1689 
1690 bool
1692 {
1693  return mxData->mbPrimaryButtonWarpsSlider;
1694 }
1695 
1696 void
1698 {
1699  CopyData();
1700  mxData->maAppFont = rFont;
1701 }
1702 
1703 const vcl::Font&
1705 {
1706  return mxData->maAppFont;
1707 }
1708 
1709 void
1711 {
1712  CopyData();
1713  mxData->maHelpFont = rFont;
1714 }
1715 
1716 const vcl::Font&
1718 {
1719  return mxData->maHelpFont;
1720 }
1721 
1722 void
1724 {
1725  CopyData();
1726  mxData->maTitleFont = rFont;
1727 }
1728 
1729 const vcl::Font&
1731 {
1732  return mxData->maTitleFont;
1733 }
1734 
1735 void
1737 {
1738  CopyData();
1739  mxData->maFloatTitleFont = rFont;
1740 }
1741 
1742 const vcl::Font&
1744 {
1745  return mxData->maFloatTitleFont;
1746 }
1747 
1748 void
1750 {
1751  CopyData();
1752  mxData->maMenuFont = rFont;
1753 }
1754 
1755 const vcl::Font&
1757 {
1758  return mxData->maMenuFont;
1759 }
1760 
1761 void
1763 {
1764  CopyData();
1765  mxData->maToolFont = rFont;
1766 }
1767 
1768 const vcl::Font&
1770 {
1771  return mxData->maToolFont;
1772 }
1773 
1774 void
1776 {
1777  CopyData();
1778  mxData->maGroupFont = rFont;
1779 }
1780 
1781 const vcl::Font&
1783 {
1784  return mxData->maGroupFont;
1785 }
1786 
1787 void
1789 {
1790  CopyData();
1791  mxData->maLabelFont = rFont;
1792 }
1793 
1794 const vcl::Font&
1796 {
1797  return mxData->maLabelFont;
1798 }
1799 
1800 void
1802 {
1803  CopyData();
1804  mxData->maRadioCheckFont = rFont;
1805 }
1806 
1807 const vcl::Font&
1809 {
1810  return mxData->maRadioCheckFont;
1811 }
1812 
1813 void
1815 {
1816  CopyData();
1817  mxData->maPushButtonFont = rFont;
1818 }
1819 
1820 const vcl::Font&
1822 {
1823  return mxData->maPushButtonFont;
1824 }
1825 
1826 void
1828 {
1829  CopyData();
1830  mxData->maFieldFont = rFont;
1831 }
1832 
1833 const vcl::Font&
1835 {
1836  return mxData->maFieldFont;
1837 }
1838 
1839 void
1841 {
1842  CopyData();
1843  mxData->maIconFont = rFont;
1844 }
1845 
1846 const vcl::Font&
1848 {
1849  return mxData->maIconFont;
1850 }
1851 
1852 void
1854 {
1855  CopyData();
1856  mxData->maTabFont = rFont;
1857 }
1858 
1859 const vcl::Font&
1861 {
1862  return mxData->maTabFont;
1863 }
1864 
1865 sal_Int32
1867 {
1868  return 1;
1869 }
1870 
1871 void
1873 {
1874  CopyData();
1875  mxData->mnTitleHeight = nSize;
1876 }
1877 
1878 sal_Int32
1880 {
1881  return mxData->mnTitleHeight;
1882 }
1883 
1884 void
1886 {
1887  CopyData();
1888  mxData->mnFloatTitleHeight = nSize;
1889 }
1890 
1891 sal_Int32
1893 {
1894  return mxData->mnFloatTitleHeight;
1895 }
1896 
1897 void
1899 {
1900  CopyData();
1901  mxData->mnScrollBarSize = nSize;
1902 }
1903 
1904 sal_Int32
1906 {
1907  return mxData->mnScrollBarSize;
1908 }
1909 
1910 void
1912 {
1913  CopyData();
1914  mxData->mnMinThumbSize = nSize;
1915 }
1916 
1917 sal_Int32
1919 {
1920  return mxData->mnMinThumbSize;
1921 }
1922 
1923 void
1924 StyleSettings::SetSpinSize( sal_Int32 nSize )
1925 {
1926  CopyData();
1927  mxData->mnSpinSize = nSize;
1928 }
1929 
1930 sal_Int32
1932 {
1933  return mxData->mnSpinSize;
1934 }
1935 
1936 sal_Int32
1938 {
1939  return 3;
1940 }
1941 
1942 void
1944 {
1945  CopyData();
1946  mxData->mnCursorSize = nSize;
1947 }
1948 
1949 sal_Int32
1951 {
1952  return mxData->mnCursorSize;
1953 }
1954 
1955 void
1956 StyleSettings::SetCursorBlinkTime( sal_uInt64 nBlinkTime )
1957 {
1958  CopyData();
1959  mxData->mnCursorBlinkTime = nBlinkTime;
1960 }
1961 
1962 sal_uInt64
1964 {
1965  return mxData->mnCursorBlinkTime;
1966 }
1967 
1968 void
1970 {
1971  CopyData();
1972  mxData->mnDragFullOptions = nOptions;
1973 }
1974 
1977 {
1978  return mxData->mnDragFullOptions;
1979 }
1980 
1981 void
1983 {
1984  CopyData();
1985  mxData->mnSelectionOptions = nOptions;
1986 }
1987 
1990 {
1991  return mxData->mnSelectionOptions;
1992 }
1993 
1994 void
1996 {
1997  CopyData();
1998  mxData->mnDisplayOptions = nOptions;
1999 }
2000 
2003 {
2004  return mxData->mnDisplayOptions;
2005 }
2006 
2007 void
2009 {
2010  CopyData();
2011  mxData->mnAntialiasedMin = nMinPixel;
2012 }
2013 
2014 sal_Int32
2016 {
2017  return mxData->mnAntialiasedMin;
2018 }
2019 
2020 void
2022 {
2023  CopyData();
2024  mxData->mnOptions = nOptions;
2025 }
2026 
2027 void
2028 StyleSettings::SetAutoMnemonic( bool bAutoMnemonic )
2029 {
2030  CopyData();
2031  mxData->mbAutoMnemonic = bAutoMnemonic;
2032 }
2033 
2034 bool
2036 {
2037  return mxData->mbAutoMnemonic;
2038 }
2039 
2040 bool
2042 {
2043  ImplSVData* pSVData = ImplGetSVData();
2044  return pSVData->maNWFData.mbCanDetermineWindowPosition;
2045 }
2046 
2047 void
2049 {
2050  CopyData();
2051  mxData->maFontColor = rColor;
2052 }
2053 
2054 const Color&
2056 {
2057  return mxData->maFontColor;
2058 }
2059 
2060 void
2062 {
2063  CopyData();
2064  mxData->mnToolbarIconSize = nSize;
2065 }
2066 
2069 {
2070  return mxData->mnToolbarIconSize;
2071 }
2072 
2074 {
2075  switch (GetToolbarIconSize())
2076  {
2078  return Size(24, 24);
2080  return Size(32, 32);
2082  default:
2083  return Size(16, 16);
2084  }
2085 }
2086 
2087 const DialogStyle&
2089 {
2090  return mxData->maDialogStyle;
2091 }
2092 
2093 void
2095 {
2096  CopyData();
2097  mxData->mnEdgeBlending = nCount;
2098 }
2099 
2100 sal_uInt16
2102 {
2103  return mxData->mnEdgeBlending;
2104 }
2105 
2106 const Color&
2108 {
2109  return mxData->maEdgeBlendingTopLeftColor;
2110 }
2111 
2112 const Color&
2114 {
2115  return mxData->maEdgeBlendingBottomRightColor;
2116 }
2117 
2118 void
2120 {
2121  CopyData();
2122  mxData->mnListBoxMaximumLineCount = nCount;
2123 }
2124 
2125 sal_uInt16
2127 {
2128  return mxData->mnListBoxMaximumLineCount;
2129 }
2130 
2131 void
2133 {
2134  CopyData();
2135  mxData->mnColorValueSetColumnCount = nCount;
2136 }
2137 
2138 sal_uInt16
2140 {
2141  return mxData->mnColorValueSetColumnCount;
2142 }
2143 
2144 sal_uInt16
2146 {
2147  return 1;
2148 }
2149 
2150 void
2152 {
2153  CopyData();
2154  mxData->mbPreviewUsesCheckeredBackground = bNew;
2155 }
2156 
2157 bool
2159 {
2160  return mxData->mbPreviewUsesCheckeredBackground;
2161 }
2162 
2163 bool
2165 {
2166  return !(*this == rSet);
2167 }
2168 
2170 {
2171  mxData->maListBoxPreviewDefaultLogicSize = rSize;
2172 }
2173 
2175 {
2176  if(0 == mxData->maListBoxPreviewDefaultPixelSize.Width() || 0 == mxData->maListBoxPreviewDefaultPixelSize.Height())
2177  {
2178  const_cast< StyleSettings* >(this)->mxData->maListBoxPreviewDefaultPixelSize =
2179  Application::GetDefaultDevice()->LogicToPixel(mxData->maListBoxPreviewDefaultLogicSize, MapMode(MapUnit::MapAppFont));
2180  }
2181 
2182  return mxData->maListBoxPreviewDefaultPixelSize;
2183 }
2184 
2185 void StyleSettings::Set3DColors( const Color& rColor )
2186 {
2187  CopyData();
2188  mxData->maFaceColor = rColor;
2189  mxData->maLightBorderColor = rColor;
2190  mxData->maMenuBorderColor = rColor;
2191  mxData->maDarkShadowColor = COL_BLACK;
2192  if ( rColor != COL_LIGHTGRAY )
2193  {
2194  mxData->maLightColor = rColor;
2195  mxData->maShadowColor = rColor;
2196  mxData->maDarkShadowColor=rColor;
2197  mxData->maLightColor.IncreaseLuminance( 64 );
2198  mxData->maShadowColor.DecreaseLuminance( 64 );
2199  mxData->maDarkShadowColor.DecreaseLuminance( 100 );
2200  sal_uLong nRed = mxData->maLightColor.GetRed();
2201  sal_uLong nGreen = mxData->maLightColor.GetGreen();
2202  sal_uLong nBlue = mxData->maLightColor.GetBlue();
2203  nRed += static_cast<sal_uLong>(mxData->maShadowColor.GetRed());
2204  nGreen += static_cast<sal_uLong>(mxData->maShadowColor.GetGreen());
2205  nBlue += static_cast<sal_uLong>(mxData->maShadowColor.GetBlue());
2206  mxData->maCheckedColor = Color( static_cast<sal_uInt8>(nRed/2), static_cast<sal_uInt8>(nGreen/2), static_cast<sal_uInt8>(nBlue/2) );
2207  }
2208  else
2209  {
2210  mxData->maCheckedColor = Color( 0x99, 0x99, 0x99 );
2211  mxData->maLightColor = COL_WHITE;
2212  mxData->maShadowColor = COL_GRAY;
2213  }
2214 }
2215 
2217 {
2218  CopyData();
2219  // Light gray checked color special case
2220  if ( GetFaceColor() == COL_LIGHTGRAY )
2221  mxData->maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
2222  else
2223  {
2224  sal_uInt8 nRed = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetRed()) + static_cast<sal_uInt16>(mxData->maLightColor.GetRed()))/2);
2225  sal_uInt8 nGreen = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetGreen()) + static_cast<sal_uInt16>(mxData->maLightColor.GetGreen()))/2);
2226  sal_uInt8 nBlue = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetBlue()) + static_cast<sal_uInt16>(mxData->maLightColor.GetBlue()))/2);
2227  mxData->maCheckedColor = Color( nRed, nGreen, nBlue );
2228  }
2229 }
2230 
2232 {
2233  // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
2234  switch (mxData->meUseImagesInMenus) {
2235  case TRISTATE_FALSE:
2236  return false;
2237  case TRISTATE_TRUE:
2238  return true;
2239  default: // TRISTATE_INDET:
2241  }
2242 }
2243 
2244 static BitmapEx readBitmapEx( const OUString& rPath )
2245 {
2246  OUString aPath( rPath );
2247  rtl::Bootstrap::expandMacros( aPath );
2248 
2249  // import the image
2250  Graphic aGraphic;
2251  if ( GraphicFilter::LoadGraphic( aPath, OUString(), aGraphic ) != ERRCODE_NONE )
2252  return BitmapEx();
2253  return aGraphic.GetBitmapEx();
2254 }
2255 
2256 namespace {
2257 
2258 enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
2259 
2260 }
2261 
2263 static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, std::optional<Color>& rMenuBarTextColor )
2264 {
2265  uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
2266  if ( !xContext.is() )
2267  return;
2268 
2269  // don't burn time loading images we don't need.
2271  return;
2272 
2273  // read from the configuration
2274  OUString aPersona( officecfg::Office::Common::Misc::Persona::get( xContext ) );
2275  OUString aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get( xContext ) );
2276 
2277  // have the settings changed? marks if header /footer prepared before
2278  //should maybe extended to a flag that marks if header /footer /both are loaded
2279  OUString aOldValue= eWhich==PERSONA_HEADER?OUString(aPersona + ";" + aPersonaSettings+";h" ):OUString(aPersona + ";" + aPersonaSettings+";f" );
2280  if ( rHeaderFooter == aOldValue )
2281  return;
2282 
2283  rHeaderFooter = aOldValue;
2284  rHeaderFooterBitmap = BitmapEx();
2285  rMenuBarTextColor.reset();
2286 
2287  // now read the new values and setup bitmaps
2288  OUString aHeader, aFooter;
2289  if ( aPersona == "own" || aPersona == "default" )
2290  {
2291  sal_Int32 nIndex = 0;
2292 
2293  // Skip the persona slug, name, and preview
2294  aHeader = aPersonaSettings.getToken( 3, ';', nIndex );
2295 
2296  if ( nIndex > 0 )
2297  aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
2298 
2299  // change menu text color, advance nIndex to skip the '#'
2300  if ( nIndex > 0 )
2301  {
2302  OUString aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
2303  rMenuBarTextColor = Color( ColorTransparency, aColor.toUInt32( 16 ) );
2304  }
2305  }
2306 
2307  OUString aName;
2308  switch ( eWhich ) {
2309  case PERSONA_HEADER: aName = aHeader; break;
2310  case PERSONA_FOOTER: aName = aFooter; break;
2311  }
2312 
2313  if ( !aName.isEmpty() )
2314  {
2315  OUString gallery("");
2316  // try the gallery first, then the program path:
2317  if ( aPersona == "own" && !aPersonaSettings.startsWith( "vnd.sun.star.expand" ) )
2318  {
2319  gallery = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
2320  rtl::Bootstrap::expandMacros( gallery );
2321  gallery += "/user/gallery/personas/";
2322  }
2323  else if ( aPersona == "default" )
2324  {
2325  gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/";
2326  }
2327  rHeaderFooterBitmap = readBitmapEx( gallery + aName );
2328 
2329  if ( rHeaderFooterBitmap.IsEmpty() )
2330  rHeaderFooterBitmap = readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" + aName );
2331  }
2332 
2333  // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
2334 
2335  if( rHeaderFooterBitmap.IsEmpty() )
2336  {
2337  std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
2338  officecfg::Office::Common::Misc::Persona::set( "no", batch );
2339  officecfg::Office::Common::Misc::PersonaSettings::set( "", batch );
2340  batch->commit();
2341  }
2342 }
2343 
2345 {
2346  setupPersonaHeaderFooter( PERSONA_HEADER, mxData->maPersonaHeaderFooter, mxData->maPersonaHeaderBitmap, mxData->maPersonaMenuBarTextColor );
2347  return mxData->maPersonaHeaderBitmap;
2348 }
2349 
2351 {
2352  setupPersonaHeaderFooter( PERSONA_FOOTER, mxData->maPersonaHeaderFooter, mxData->maPersonaFooterBitmap, mxData->maPersonaMenuBarTextColor );
2353  return mxData->maPersonaFooterBitmap;
2354 }
2355 
2356 const std::optional<Color>& StyleSettings::GetPersonaMenuBarTextColor() const
2357 {
2358  GetPersonaHeader();
2359  return mxData->maPersonaMenuBarTextColor;
2360 }
2361 
2363 {
2364  CopyData();
2365  mxData->SetStandardStyles();
2366 }
2367 
2369 {
2370  // compute a brighter face color that can be used in gradients
2371  // for a convex look (eg toolbars)
2372 
2373  sal_uInt16 h, s, b;
2374  GetFaceColor().RGBtoHSB( h, s, b );
2375  if( s > 1) s=1;
2376  if( b < 98) b=98;
2377  return Color::HSBtoRGB( h, s, b );
2378 }
2379 
2381 {
2382  // compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
2383  sal_uInt16 h, s, b;
2384  GetShadowColor().RGBtoHSB( h, s, b );
2385  b += b/4;
2386  s -= s/4;
2387  return Color::HSBtoRGB( h, s, b );
2388 }
2389 
2391 {
2392  // copy if other references exist
2393  if (mxData.use_count() > 1)
2394  {
2395  mxData = std::make_shared<ImplStyleData>(*mxData);
2396  }
2397 }
2398 
2400 {
2401  if ( mxData == rSet.mxData )
2402  return true;
2403 
2404  if (mxData->mIconTheme != rSet.mxData->mIconTheme) {
2405  return false;
2406  }
2407 
2408  if (*mxData->mIconThemeSelector != *rSet.mxData->mIconThemeSelector) {
2409  return false;
2410  }
2411 
2412  return (mxData->mnOptions == rSet.mxData->mnOptions) &&
2413  (mxData->mbAutoMnemonic == rSet.mxData->mbAutoMnemonic) &&
2414  (mxData->mnDragFullOptions == rSet.mxData->mnDragFullOptions) &&
2415  (mxData->mnSelectionOptions == rSet.mxData->mnSelectionOptions) &&
2416  (mxData->mnDisplayOptions == rSet.mxData->mnDisplayOptions) &&
2417  (mxData->mnCursorSize == rSet.mxData->mnCursorSize) &&
2418  (mxData->mnCursorBlinkTime == rSet.mxData->mnCursorBlinkTime) &&
2419  (mxData->mnTitleHeight == rSet.mxData->mnTitleHeight) &&
2420  (mxData->mnFloatTitleHeight == rSet.mxData->mnFloatTitleHeight) &&
2421  (mxData->mnScrollBarSize == rSet.mxData->mnScrollBarSize) &&
2422  (mxData->mnMinThumbSize == rSet.mxData->mnMinThumbSize) &&
2423  (mxData->mnSpinSize == rSet.mxData->mnSpinSize) &&
2424  (mxData->mnAntialiasedMin == rSet.mxData->mnAntialiasedMin) &&
2425  (mxData->mbHighContrast == rSet.mxData->mbHighContrast) &&
2426  (mxData->mbUseSystemUIFonts == rSet.mxData->mbUseSystemUIFonts) &&
2427  (mxData->mbUseFontAAFromSystem == rSet.mxData->mbUseFontAAFromSystem) &&
2428  (mxData->mnUseFlatBorders == rSet.mxData->mnUseFlatBorders) &&
2429  (mxData->mnUseFlatMenus == rSet.mxData->mnUseFlatMenus) &&
2430  (mxData->maFaceColor == rSet.mxData->maFaceColor) &&
2431  (mxData->maCheckedColor == rSet.mxData->maCheckedColor) &&
2432  (mxData->maLightColor == rSet.mxData->maLightColor) &&
2433  (mxData->maLightBorderColor == rSet.mxData->maLightBorderColor) &&
2434  (mxData->maShadowColor == rSet.mxData->maShadowColor) &&
2435  (mxData->maDarkShadowColor == rSet.mxData->maDarkShadowColor) &&
2436  (mxData->maButtonTextColor == rSet.mxData->maButtonTextColor) &&
2437  (mxData->maDefaultActionButtonTextColor == rSet.mxData->maDefaultActionButtonTextColor) &&
2438  (mxData->maActionButtonTextColor == rSet.mxData->maActionButtonTextColor) &&
2439  (mxData->maButtonRolloverTextColor == rSet.mxData->maButtonRolloverTextColor) &&
2440  (mxData->maActionButtonRolloverTextColor == rSet.mxData->maActionButtonRolloverTextColor) &&
2441  (mxData->maRadioCheckTextColor == rSet.mxData->maRadioCheckTextColor) &&
2442  (mxData->maGroupTextColor == rSet.mxData->maGroupTextColor) &&
2443  (mxData->maLabelTextColor == rSet.mxData->maLabelTextColor) &&
2444  (mxData->maWindowColor == rSet.mxData->maWindowColor) &&
2445  (mxData->maWindowTextColor == rSet.mxData->maWindowTextColor) &&
2446  (mxData->maDialogColor == rSet.mxData->maDialogColor) &&
2447  (mxData->maDialogTextColor == rSet.mxData->maDialogTextColor) &&
2448  (mxData->maWorkspaceColor == rSet.mxData->maWorkspaceColor) &&
2449  (mxData->maMonoColor == rSet.mxData->maMonoColor) &&
2450  (mxData->maFieldColor == rSet.mxData->maFieldColor) &&
2451  (mxData->maFieldTextColor == rSet.mxData->maFieldTextColor) &&
2452  (mxData->maActiveColor == rSet.mxData->maActiveColor) &&
2453  (mxData->maActiveTextColor == rSet.mxData->maActiveTextColor) &&
2454  (mxData->maActiveBorderColor == rSet.mxData->maActiveBorderColor) &&
2455  (mxData->maDeactiveColor == rSet.mxData->maDeactiveColor) &&
2456  (mxData->maDeactiveTextColor == rSet.mxData->maDeactiveTextColor) &&
2457  (mxData->maDeactiveBorderColor == rSet.mxData->maDeactiveBorderColor) &&
2458  (mxData->maMenuColor == rSet.mxData->maMenuColor) &&
2459  (mxData->maMenuBarColor == rSet.mxData->maMenuBarColor) &&
2460  (mxData->maMenuBarRolloverColor == rSet.mxData->maMenuBarRolloverColor) &&
2461  (mxData->maMenuBorderColor == rSet.mxData->maMenuBorderColor) &&
2462  (mxData->maMenuTextColor == rSet.mxData->maMenuTextColor) &&
2463  (mxData->maMenuBarTextColor == rSet.mxData->maMenuBarTextColor) &&
2464  (mxData->maMenuBarRolloverTextColor == rSet.mxData->maMenuBarRolloverTextColor) &&
2465  (mxData->maMenuHighlightColor == rSet.mxData->maMenuHighlightColor) &&
2466  (mxData->maMenuHighlightTextColor == rSet.mxData->maMenuHighlightTextColor) &&
2467  (mxData->maHighlightColor == rSet.mxData->maHighlightColor) &&
2468  (mxData->maHighlightTextColor == rSet.mxData->maHighlightTextColor) &&
2469  (mxData->maTabTextColor == rSet.mxData->maTabTextColor) &&
2470  (mxData->maTabRolloverTextColor == rSet.mxData->maTabRolloverTextColor) &&
2471  (mxData->maTabHighlightTextColor == rSet.mxData->maTabHighlightTextColor) &&
2472  (mxData->maActiveTabColor == rSet.mxData->maActiveTabColor) &&
2473  (mxData->maInactiveTabColor == rSet.mxData->maInactiveTabColor) &&
2474  (mxData->maDisableColor == rSet.mxData->maDisableColor) &&
2475  (mxData->maHelpColor == rSet.mxData->maHelpColor) &&
2476  (mxData->maHelpTextColor == rSet.mxData->maHelpTextColor) &&
2477  (mxData->maLinkColor == rSet.mxData->maLinkColor) &&
2478  (mxData->maVisitedLinkColor == rSet.mxData->maVisitedLinkColor) &&
2479  (mxData->maToolTextColor == rSet.mxData->maToolTextColor) &&
2480  (mxData->maAppFont == rSet.mxData->maAppFont) &&
2481  (mxData->maHelpFont == rSet.mxData->maHelpFont) &&
2482  (mxData->maTitleFont == rSet.mxData->maTitleFont) &&
2483  (mxData->maFloatTitleFont == rSet.mxData->maFloatTitleFont) &&
2484  (mxData->maMenuFont == rSet.mxData->maMenuFont) &&
2485  (mxData->maToolFont == rSet.mxData->maToolFont) &&
2486  (mxData->maGroupFont == rSet.mxData->maGroupFont) &&
2487  (mxData->maLabelFont == rSet.mxData->maLabelFont) &&
2488  (mxData->maRadioCheckFont == rSet.mxData->maRadioCheckFont) &&
2489  (mxData->maPushButtonFont == rSet.mxData->maPushButtonFont) &&
2490  (mxData->maFieldFont == rSet.mxData->maFieldFont) &&
2491  (mxData->maIconFont == rSet.mxData->maIconFont) &&
2492  (mxData->maTabFont == rSet.mxData->maTabFont) &&
2493  (mxData->meUseImagesInMenus == rSet.mxData->meUseImagesInMenus) &&
2494  (mxData->mbPreferredUseImagesInMenus == rSet.mxData->mbPreferredUseImagesInMenus) &&
2495  (mxData->mbSkipDisabledInMenus == rSet.mxData->mbSkipDisabledInMenus) &&
2496  (mxData->mbHideDisabledMenuItems == rSet.mxData->mbHideDisabledMenuItems) &&
2497  (mxData->mbPreferredContextMenuShortcuts == rSet.mxData->mbPreferredContextMenuShortcuts)&&
2498  (mxData->meContextMenuShortcuts == rSet.mxData->meContextMenuShortcuts) &&
2499  (mxData->mbPrimaryButtonWarpsSlider == rSet.mxData->mbPrimaryButtonWarpsSlider) &&
2500  (mxData->maFontColor == rSet.mxData->maFontColor) &&
2501  (mxData->mnEdgeBlending == rSet.mxData->mnEdgeBlending) &&
2502  (mxData->maEdgeBlendingTopLeftColor == rSet.mxData->maEdgeBlendingTopLeftColor) &&
2503  (mxData->maEdgeBlendingBottomRightColor == rSet.mxData->maEdgeBlendingBottomRightColor) &&
2504  (mxData->mnListBoxMaximumLineCount == rSet.mxData->mnListBoxMaximumLineCount) &&
2505  (mxData->mnColorValueSetColumnCount == rSet.mxData->mnColorValueSetColumnCount) &&
2506  (mxData->maListBoxPreviewDefaultLogicSize == rSet.mxData->maListBoxPreviewDefaultLogicSize) &&
2507  (mxData->maListBoxPreviewDefaultPixelSize == rSet.mxData->maListBoxPreviewDefaultPixelSize) &&
2508  (mxData->mbPreviewUsesCheckeredBackground == rSet.mxData->mbPreviewUsesCheckeredBackground);
2509 }
2510 
2512  mnEnableATT(TRISTATE_INDET),
2513  mnDisablePrinting(TRISTATE_INDET)
2514 {
2515  static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
2516  mbEnableLocalizedDecimalSep = (pEnv != nullptr);
2517 }
2518 
2520  : mxData(std::make_shared<ImplMiscData>())
2521 {
2522 }
2523 
2524 bool MiscSettings::operator ==( const MiscSettings& rSet ) const
2525 {
2526  if ( mxData == rSet.mxData )
2527  return true;
2528 
2529  return (mxData->mnEnableATT == rSet.mxData->mnEnableATT ) &&
2530  (mxData->mnDisablePrinting == rSet.mxData->mnDisablePrinting ) &&
2531  (mxData->mbEnableLocalizedDecimalSep == rSet.mxData->mbEnableLocalizedDecimalSep );
2532 }
2533 
2534 bool
2536 {
2537  return !(*this == rSet);
2538 }
2539 
2541 {
2542  if( mxData->mnDisablePrinting == TRISTATE_INDET )
2543  {
2544  OUString aEnable =
2546  getValue( "DesktopManagement",
2547  "DisablePrinting" );
2548  mxData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2549  }
2550 
2551  return mxData->mnDisablePrinting != TRISTATE_FALSE;
2552 }
2553 
2555 {
2556 
2557 #ifdef _WIN32
2558  if( mxData->mnEnableATT == TRISTATE_INDET )
2559  {
2560  // Check in the Windows registry if an AT tool wants Accessibility support to
2561  // be activated ..
2562  HKEY hkey;
2563 
2564  if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2565  L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2566  &hkey) )
2567  {
2568  DWORD dwType;
2569  wchar_t Data[6]; // possible values: "true", "false", "1", "0", DWORD
2570  DWORD cbData = sizeof(Data);
2571 
2572  if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2573  nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2574  {
2575  switch (dwType)
2576  {
2577  case REG_SZ:
2578  mxData->mnEnableATT = ((0 == wcsicmp(Data, L"1")) || (0 == wcsicmp(Data, L"true"))) ? TRISTATE_TRUE : TRISTATE_FALSE;
2579  break;
2580  case REG_DWORD:
2581  switch (reinterpret_cast<DWORD *>(Data)[0]) {
2582  case 0:
2583  mxData->mnEnableATT = TRISTATE_FALSE;
2584  break;
2585  case 1:
2586  mxData->mnEnableATT = TRISTATE_TRUE;
2587  break;
2588  default:
2589  mxData->mnEnableATT = TRISTATE_INDET;
2590  //TODO: or TRISTATE_TRUE?
2591  break;
2592  }
2593  break;
2594  default:
2595  // Unsupported registry type
2596  break;
2597  }
2598  }
2599 
2600  RegCloseKey(hkey);
2601  }
2602  }
2603 #endif
2604 
2605  if( mxData->mnEnableATT == TRISTATE_INDET )
2606  {
2607  static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
2608  if( !pEnv || !*pEnv )
2609  {
2610  OUString aEnable =
2612  getValue( "Accessibility",
2613  "EnableATToolSupport" );
2614  mxData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2615  }
2616  else
2617  {
2618  mxData->mnEnableATT = TRISTATE_TRUE;
2619  }
2620  }
2621 
2622  return mxData->mnEnableATT != TRISTATE_FALSE;
2623 }
2624 
2625 #ifdef _WIN32
2626 void MiscSettings::SetEnableATToolSupport( bool bEnable )
2627 {
2628  if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mxData->mnEnableATT )
2629  {
2630  if( bEnable && !ImplInitAccessBridge() )
2631  return;
2632 
2633  HKEY hkey;
2634 
2635  // If the accessibility key in the Windows registry exists, change it synchronously
2636  if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2637  L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2638  &hkey) )
2639  {
2640  DWORD dwType;
2641  wchar_t Data[6]; // possible values: "true", "false", 1, 0
2642  DWORD cbData = sizeof(Data);
2643 
2644  if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2645  nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2646  {
2647  switch (dwType)
2648  {
2649  case REG_SZ:
2650  RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2651  0, dwType,
2652  reinterpret_cast<const BYTE*>(bEnable ? L"true" : L"false"),
2653  bEnable ? sizeof(L"true") : sizeof(L"false"));
2654  break;
2655  case REG_DWORD:
2656  reinterpret_cast<DWORD *>(Data)[0] = bEnable ? 1 : 0;
2657  RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2658  0, dwType, reinterpret_cast<const BYTE*>(Data), sizeof(DWORD));
2659  break;
2660  default:
2661  // Unsupported registry type
2662  break;
2663  }
2664  }
2665 
2666  RegCloseKey(hkey);
2667  }
2668 
2670  setValue( "Accessibility",
2671  "EnableATToolSupport",
2672  bEnable ? OUString("true") : OUString("false" ) );
2673  mxData->mnEnableATT = bEnable ? TRISTATE_TRUE : TRISTATE_FALSE;
2674  }
2675 }
2676 #endif
2677 
2679 {
2680  // copy if other references exist
2681  if (mxData.use_count() > 1)
2682  {
2683  mxData = std::make_shared<ImplMiscData>(*mxData);
2684  }
2685  mxData->mbEnableLocalizedDecimalSep = bEnable;
2686 }
2687 
2689 {
2690  return mxData->mbEnableLocalizedDecimalSep;
2691 }
2692 
2694  : mxData(std::make_shared<ImplHelpData>())
2695 {
2696 }
2697 
2698 bool HelpSettings::operator ==( const HelpSettings& rSet ) const
2699 {
2700  if ( mxData == rSet.mxData )
2701  return true;
2702 
2703  return (mxData->mnTipTimeout == rSet.mxData->mnTipTimeout );
2704 }
2705 
2706 sal_Int32
2708 {
2709  return 500;
2710 }
2711 
2712 void
2713 HelpSettings::SetTipTimeout( sal_Int32 nTipTimeout )
2714 {
2715  // copy if other references exist
2716  if (mxData.use_count() > 1)
2717  {
2718  mxData = std::make_shared<ImplHelpData>(*mxData);
2719  }
2720  mxData->mnTipTimeout = nTipTimeout;
2721 }
2722 
2723 sal_Int32
2725 {
2726  return mxData->mnTipTimeout;
2727 }
2728 
2729 sal_Int32
2731 {
2732  return 1500;
2733 }
2734 
2735 bool
2737 {
2738  return !(*this == rSet);
2739 }
2740 
2742  :
2743  maLocale( LANGUAGE_SYSTEM ),
2744  maUILocale( LANGUAGE_SYSTEM )
2745 {
2748 }
2749 
2751  maMouseSettings( rData.maMouseSettings ),
2752  maStyleSettings( rData.maStyleSettings ),
2753  maMiscSettings( rData.maMiscSettings ),
2754  maHelpSettings( rData.maHelpSettings ),
2755  maLocale( rData.maLocale ),
2756  maUILocale( rData.maUILocale )
2757 {
2758  // Create the cache objects new when their getter is called.
2759 }
2760 
2762 {
2763  mpLocaleDataWrapper.reset();
2764  mpUILocaleDataWrapper.reset();
2766  mpI18nHelper.reset();
2767  mpUII18nHelper.reset();
2768 }
2769 
2771  : mxData(std::make_shared<ImplAllSettingsData>())
2772 {
2773 }
2774 
2776 {
2777  // copy if other references exist
2778  if (mxData.use_count() > 1)
2779  {
2780  mxData = std::make_shared<ImplAllSettingsData>(*mxData);
2781  }
2782 
2783 }
2784 
2786 {
2787 
2789 
2790  if ( nFlags & AllSettingsFlags::MOUSE )
2791  {
2792  if ( mxData->maMouseSettings != rSet.mxData->maMouseSettings )
2793  {
2794  CopyData();
2795  mxData->maMouseSettings = rSet.mxData->maMouseSettings;
2796  nChangeFlags |= AllSettingsFlags::MOUSE;
2797  }
2798  }
2799 
2800  if ( nFlags & AllSettingsFlags::STYLE )
2801  {
2802  if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2803  {
2804  CopyData();
2805  mxData->maStyleSettings = rSet.mxData->maStyleSettings;
2806  nChangeFlags |= AllSettingsFlags::STYLE;
2807  }
2808  }
2809 
2810  if ( nFlags & AllSettingsFlags::MISC )
2811  {
2812  if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2813  {
2814  CopyData();
2815  mxData->maMiscSettings = rSet.mxData->maMiscSettings;
2816  nChangeFlags |= AllSettingsFlags::MISC;
2817  }
2818  }
2819 
2820  if ( nFlags & AllSettingsFlags::LOCALE )
2821  {
2822  if ( mxData->maLocale != rSet.mxData->maLocale )
2823  {
2824  SetLanguageTag( rSet.mxData->maLocale );
2825  nChangeFlags |= AllSettingsFlags::LOCALE;
2826  }
2827  }
2828 
2829  return nChangeFlags;
2830 }
2831 
2833 {
2834 
2836 
2837  if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2838  nChangeFlags |= AllSettingsFlags::STYLE;
2839 
2840  if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2841  nChangeFlags |= AllSettingsFlags::MISC;
2842 
2843  if ( mxData->maLocale != rSet.mxData->maLocale )
2844  nChangeFlags |= AllSettingsFlags::LOCALE;
2845 
2846  return nChangeFlags;
2847 }
2848 
2849 bool AllSettings::operator ==( const AllSettings& rSet ) const
2850 {
2851  if ( mxData == rSet.mxData )
2852  return true;
2853 
2854  if ( (mxData->maMouseSettings == rSet.mxData->maMouseSettings) &&
2855  (mxData->maStyleSettings == rSet.mxData->maStyleSettings) &&
2856  (mxData->maMiscSettings == rSet.mxData->maMiscSettings) &&
2857  (mxData->maHelpSettings == rSet.mxData->maHelpSettings) &&
2858  (mxData->maLocale == rSet.mxData->maLocale) )
2859  {
2860  return true;
2861  }
2862 
2863  return false;
2864 }
2865 
2866 void AllSettings::SetLanguageTag(const OUString& rLanguage, bool bCanonicalize)
2867 {
2868  SetLanguageTag(LanguageTag(rLanguage, bCanonicalize));
2869 }
2870 
2871 void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag )
2872 {
2873  if (mxData->maLocale == rLanguageTag)
2874  return;
2875 
2876  CopyData();
2877 
2878  mxData->maLocale = rLanguageTag;
2879 
2880  if ( mxData->mpLocaleDataWrapper )
2881  {
2882  mxData->mpLocaleDataWrapper.reset();
2883  }
2884  if ( mxData->mpI18nHelper )
2885  {
2886  mxData->mpI18nHelper.reset();
2887  }
2888 }
2889 
2890 namespace
2891 {
2892  bool GetConfigLayoutRTL(bool bMath)
2893  {
2894  static const char* pEnv = getenv("SAL_RTL_ENABLED" );
2895  static int nUIMirroring = -1; // -1: undef, 0: auto, 1: on 2: off
2896 
2897  // environment always overrides
2898  if( pEnv )
2899  return true;
2900 
2901  bool bRTL = false;
2902 
2903  if( nUIMirroring == -1 )
2904  {
2905  nUIMirroring = 0; // ask configuration only once
2908  "org.openoffice.Office.Common/I18N/CTL" ); // note: case sensitive !
2909  if ( aNode.isValid() )
2910  {
2911  bool bTmp = bool();
2912  css::uno::Any aValue = aNode.getNodeValue( "UIMirroring" );
2913  if( aValue >>= bTmp )
2914  {
2915  // found true or false; if it was nil, nothing is changed
2916  nUIMirroring = bTmp ? 1 : 2;
2917  }
2918  }
2919  }
2920 
2921  if( nUIMirroring == 0 ) // no config found (eg, setup) or default (nil) was set: check language
2922  {
2924  if (bMath)
2925  bRTL = MsLangId::isRightToLeftMath( aLang );
2926  else
2927  bRTL = MsLangId::isRightToLeft( aLang );
2928  }
2929  else
2930  bRTL = (nUIMirroring == 1);
2931 
2932  return bRTL;
2933  }
2934 }
2935 
2937 {
2939  return false;
2940  return GetConfigLayoutRTL(false);
2941 }
2942 
2944 {
2946  return false;
2947  return GetConfigLayoutRTL(true);
2948 }
2949 
2951 {
2953  {
2954  static LanguageTag aRet("en-US");
2955  return aRet;
2956  }
2957 
2960 
2961  // SYSTEM locale means: use settings from SvtSysLocale that is resolved
2962  if ( mxData->maLocale.isSystemLocale() )
2963  mxData->maLocale = mxData->maSysLocale.GetLanguageTag();
2964 
2965  return mxData->maLocale;
2966 }
2967 
2969 {
2971  {
2972  static LanguageTag aRet("en-US");
2973  return aRet;
2974  }
2975 
2978 
2979  // the UILocale is never changed
2980  if ( mxData->maUILocale.isSystemLocale() )
2981  mxData->maUILocale = mxData->maSysLocale.GetUILanguageTag();
2982 
2983  return mxData->maUILocale;
2984 }
2985 
2987 {
2988  if ( !mxData->mpLocaleDataWrapper )
2989  const_cast<AllSettings*>(this)->mxData->mpLocaleDataWrapper.reset( new LocaleDataWrapper(
2991  return *mxData->mpLocaleDataWrapper;
2992 }
2993 
2995 {
2996  if ( !mxData->mpUILocaleDataWrapper )
2997  const_cast<AllSettings*>(this)->mxData->mpUILocaleDataWrapper.reset( new LocaleDataWrapper(
2999  return *mxData->mpUILocaleDataWrapper;
3000 }
3001 
3003 {
3004  if ( !mxData->mpNeutralLocaleDataWrapper )
3005  const_cast<AllSettings*>(this)->mxData->mpNeutralLocaleDataWrapper.reset( new LocaleDataWrapper(
3007  return *mxData->mpNeutralLocaleDataWrapper;
3008 }
3009 
3011 {
3012  if ( !mxData->mpI18nHelper ) {
3013  const_cast<AllSettings*>(this)->mxData->mpI18nHelper.reset( new vcl::I18nHelper(
3015  }
3016  return *mxData->mpI18nHelper;
3017 }
3018 
3020 {
3021  if ( !mxData->mpUII18nHelper ) {
3022  const_cast<AllSettings*>(this)->mxData->mpUII18nHelper.reset( new vcl::I18nHelper(
3024  }
3025  return *mxData->mpUII18nHelper;
3026 }
3027 
3029 {
3030  AllSettings aAllSettings( Application::GetSettings() );
3031  if ( nHint & ConfigurationHints::DecSep )
3032  {
3033  MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
3034  bool bIsDecSepAsLocale = aAllSettings.mxData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale();
3035  if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale )
3036  {
3037  aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale );
3038  aAllSettings.SetMiscSettings( aMiscSettings );
3039  }
3040  }
3041 
3042  if ( nHint & ConfigurationHints::Locale )
3043  aAllSettings.SetLanguageTag( aAllSettings.mxData->maSysLocale.GetOptions().GetLanguageTag() );
3044 
3045  Application::SetSettings( aAllSettings );
3046 }
3047 
3048 const StyleSettings&
3050 {
3051  return mxData->maStyleSettings;
3052 }
3053 
3056 {
3057  return mxData->mnOptions;
3058 }
3059 
3060 std::vector<vcl::IconThemeInfo> const &
3062 {
3063  if (!mxData->mIconThemeScanner) {
3065  }
3066  return mxData->mIconThemeScanner->GetFoundIconThemes();
3067 }
3068 
3069 /*static*/ OUString
3071 {
3072  OUString desktopEnvironment = Application::GetDesktopEnvironment();
3073  if (!mxData->mIconThemeScanner) {
3075  }
3076  OUString themeName = mxData->mIconThemeSelector->SelectIconThemeForDesktopEnvironment(
3077  mxData->mIconThemeScanner->GetFoundIconThemes(),
3078  desktopEnvironment
3079  );
3080  return themeName;
3081 }
3082 
3083 void
3084 StyleSettings::SetIconTheme(const OUString& theme)
3085 {
3086  CopyData();
3087  mxData->mIconTheme = theme;
3088 }
3089 
3090 OUString
3092 {
3093  OUString sTheme(mxData->mIconTheme);
3094  if (sTheme.isEmpty())
3095  {
3097  sTheme = "colibre";
3098  else
3099  {
3100  // read from the configuration, or fallback to what the desktop wants
3101  uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
3102  if (xContext.is())
3103  {
3104  sTheme = officecfg::Office::Common::Misc::SymbolStyle::get(xContext);
3105 
3106  if (sTheme.isEmpty() || sTheme == "auto")
3108  }
3109  }
3110  }
3111 
3112  if (!mxData->mIconThemeScanner) {
3114  }
3115  OUString r = mxData->mIconThemeSelector->SelectIconTheme(
3116  mxData->mIconThemeScanner->GetFoundIconThemes(),
3117  sTheme);
3118  return r;
3119 }
3120 
3121 void
3123 {
3124  if (mxData->mbHighContrast == bHighContrast) {
3125  return;
3126  }
3127 
3128  CopyData();
3129  mxData->mbHighContrast = bHighContrast;
3130  mxData->mIconThemeSelector->SetUseHighContrastTheme(bHighContrast);
3131 }
3132 
3133 bool
3135 {
3136  return mxData->mbHighContrast;
3137 }
3138 
3139 void
3140 StyleSettings::SetPreferredIconTheme(const OUString& theme, bool bDarkIconTheme)
3141 {
3142  mxData->mIconThemeSelector->SetPreferredIconTheme(theme, bDarkIconTheme);
3143 }
3144 
3145 void
3147 {
3148  CopyData();
3149  mxData->maMouseSettings = rSet;
3150 }
3151 
3152 const MouseSettings&
3154 {
3155  return mxData->maMouseSettings;
3156 }
3157 
3158 void
3160 {
3161  CopyData();
3162  mxData->maStyleSettings = rSet;
3163 }
3164 
3165 void
3167 {
3168  CopyData();
3169  mxData->maMiscSettings = rSet;
3170 }
3171 
3172 const MiscSettings&
3174 {
3175  return mxData->maMiscSettings;
3176 }
3177 
3178 void
3180 {
3181  CopyData();
3182  mxData->maHelpSettings = rSet;
3183 }
3184 
3185 const HelpSettings&
3187 {
3188  return mxData->maHelpSettings;
3189 }
3190 
3191 bool
3193 {
3194  return !(*this == rSet);
3195 }
3196 
3197 SvtSysLocale&
3199 {
3200  return mxData->maSysLocale;
3201 }
3202 
3203 
3205  bool bCheckedColorSpecialCase )
3206 {
3207  Set3DColors( aBackColor );
3208  SetFaceColor( aBackColor );
3209  SetDialogColor( aBackColor );
3210  SetWorkspaceColor( aBackColor );
3211 
3212  if (bCheckedColorSpecialCase)
3214 }
3215 
3217  const vcl::Font& aLabelFont )
3218 {
3219  SetAppFont( aAppFont );
3220  SetPushButtonFont( aAppFont );
3221  SetToolFont( aAppFont );
3222  SetHelpFont( aAppFont );
3223 
3224  SetMenuFont( aLabelFont );
3225  SetTabFont( aLabelFont );
3226  SetLabelFont( aLabelFont );
3227  SetRadioCheckFont( aLabelFont );
3228  SetFieldFont( aLabelFont );
3229  SetGroupFont( aLabelFont );
3230  SetIconFont( aLabelFont );
3231 }
3232 
3233 /* 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 SetSpinSize(sal_Int32 nSize)
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
static sal_Int32 GetSplitSize()
sal_Int32 GetMinThumbSize() const
Color maEdgeBlendingBottomRightColor
Color maActiveTabColor
void SetHelpFont(const vcl::Font &rFont)
sal_Int32 GetTipTimeout() const
std::shared_ptr< ImplMouseData > mxData
Definition: settings.hxx:86
const LocaleDataWrapper & GetLocaleDataWrapper() const
bool GetContextMenuShortcuts() const
sal_Int32 nIndex
Color maHighlightTextColor
bool GetAutoMnemonic() const
const Color & GetDeactiveColor() const
const Color & GetDialogColor() const
Color maDefaultButtonRolloverTextColor
void SetCheckedColorSpecialCase()
bool mbPreferredContextMenuShortcuts
const Color & GetActionButtonTextColor() const
void SetHideDisabledMenuItems(bool bHideDisabledMenuItems)
sal_uInt64 GetDoubleClickTime() const
void SetOptions(MouseSettingsOptions nOptions)
const Color & GetMenuBarRolloverColor() const
const Color & GetMenuBarTextColor() const
Color maDeactiveTextColor
OUString DetermineIconTheme() const
Determine which icon theme should be used.
void SetFontColor(const Color &rColor)
bool operator==(const HelpSettings &rSet) const
void SetDragFullOptions(DragFullOptions nOptions)
void SetFieldFont(const vcl::Font &rFont)
void SetMenuBorderColor(const Color &rColor)
const vcl::Font & GetMenuFont() const
const Color & GetHighlightTextColor() const
const LanguageTag & GetUILanguageTag() const
void SetMenuTextColor(const Color &rColor)
bool IsDecimalSeparatorAsLocale() const
void SetStyleSettings(const StyleSettings &rSet)
void SetPreviewUsesCheckeredBackground(bool bNew)
Color maActionButtonTextColor
TriState mnEnableATT
void SetMonoColor(const Color &rColor)
LanguageType getLanguageType(bool bResolveSystem=true) const
StyleSettingsOptions
Definition: settings.hxx:152
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:178
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:733
Color maWorkspaceColor
const Color & GetFaceColor() const
std::vector< vcl::IconThemeInfo > const & GetInstalledIconThemes() const
Obtain the list of icon themes which were found in the config folder.
vcl::Font maRadioCheckFont
BitmapEx const & GetPersonaHeader() const
const vcl::Font & GetRadioCheckFont() const
ImplSVNWFData maNWFData
Definition: svdata.hxx:397
static sal_Int32 GetScrollRepeat()
bool mbHideDisabledMenuItems
const Color & GetGroupTextColor() const
StyleSettingsOptions mnOptions
const Color & GetDefaultButtonPressedRolloverTextColor() const
sal_Int32 mnScrollBarSize
sal_Int32 mnAntialiasedMin
void SetUseFlatBorders(bool bUseFlatBorders)
void SetWindowColor(const Color &rColor)
const Color & GetWorkspaceColor() const
void SetWeight(FontWeight)
Definition: font/font.cxx:225
Color GetSeparatorColor() const
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:139
void SetDoubleClickTime(sal_uInt64 nDoubleClkTime)
sal_Int32 GetStartDragWidth() const
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 SetCursorSize(sal_Int32 nSize)
void SetDefaultActionButtonTextColor(const Color &rColor)
void SetPrimaryButtonWarpsSlider(bool bPrimaryButtonWarpsSlider)
const Color & GetHelpTextColor() const
Color maDarkShadowColor
static sal_Int32 GetTipDelay()
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)
sal_Int32 mnSpinSize
const Color & GetFieldTextColor() const
const Color & GetLightBorderColor() const
Unknown
sal_Int32 mnStartDragWidth
static const OUString & GetDesktopEnvironment()
Get the desktop environment the process is currently running in.
Definition: svapp.cxx:1602
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:659
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
Definition: svapp.cxx:1069
WEIGHT_BOLD
sal_Int32 GetDoubleClickHeight() const
void SetDoubleClickWidth(sal_Int32 nDoubleClkWidth)
std::unique_ptr< LocaleDataWrapper > mpUILocaleDataWrapper
const Color & GetRadioCheckTextColor() const
sal_uInt16 GetEdgeBlending() const
sal_uInt16 GetColorValueSetColumnCount() const
Color maLightBorderColor
void SetEnableLocalizedDecimalSep(bool bEnable)
void SetTipTimeout(sal_Int32 nTipTimeout)
Color maActionButtonRolloverTextColor
const Color & GetDefaultButtonRolloverTextColor() const
Color maActiveBorderColor
const vcl::Font & GetLabelFont() const
MouseFollowFlags mnFollow
void SetStartDragHeight(sal_Int32 nDragHeight)
void SetMenuBarRolloverColor(const Color &rColor)
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 SetTitleHeight(sal_Int32 nSize)
void SetMenuBarTextColor(const Color &rColor)
SvtSysLocale maSysLocale
vcl::Font maFloatTitleFont
static std::shared_ptr< ConfigurationChanges > create(css::uno::Reference< css::uno::XComponentContext > const &context=comphelper::getProcessComponentContext())
DragFullOptions GetDragFullOptions() const
OUString GetAutomaticallyChosenIconTheme() const
Obtain the name of the icon theme which will be chosen automatically for the desktop environment...
Color maButtonPressedRolloverTextColor
#define STYLE_CURSOR_NOBLINKTIME
Definition: settings.hxx:206
Color maMenuBarTextColor
void IncreaseLuminance(sal_uInt8 cLumInc)
static sal_uInt16 GetStartDragCode()
static Color HSBtoRGB(sal_uInt16 nHue, sal_uInt16 nSaturation, sal_uInt16 nBrightness)
vcl::Font maHelpFont
const HelpSettings & GetHelpSettings() const
MouseSettingsOptions
Definition: settings.hxx:52
const Color & GetMenuTextColor() const
TRISTATE_INDET
const Color & GetEdgeBlendingBottomRightColor() const
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:102
std::unique_ptr< LocaleDataWrapper > mpLocaleDataWrapper
sal_Int32 GetFloatTitleHeight() const
sal_Int32 GetMenuDelay() const
ToolbarIconSize GetToolbarIconSize() const
bool operator!=(const MouseSettings &rSet) const
const Color & GetMenuColor() const
const LanguageTag & GetLanguageTag() const
void SetAlternatingRowColor(const Color &rColor)
vcl::Font maPushButtonFont
void SetFlatButtonPressedRolloverTextColor(const Color &rColor)
OUString maPersonaHeaderFooter
Cache the settings to detect changes.
Color maDefaultActionButtonTextColor
static ErrCode LoadGraphic(const OUString &rPath, const OUString &rFilter, Graphic &rGraphic, GraphicFilter *pFilter=nullptr, sal_uInt16 *pDeterminedFormat=nullptr)
MouseFollowFlags
Definition: settings.hxx:63
void SetCursorBlinkTime(sal_uInt64 nBlinkTime)
Color maFieldTextColor
bool mbEnableLocalizedDecimalSep
void SetPreferredUseImagesInMenus(bool bPreferredUseImagesInMenus)
const Color & GetDarkShadowColor() const
const DialogStyle & GetDialogStyle() const
sal_Int32 GetAntialiasingMinPixelHeight() const
bool IsEmpty() const
Definition: BitmapEx.cxx:177
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
sal_Int32 GetScrollBarSize() const
void SetActionButtonRolloverTextColor(const Color &rColor)
const Color & GetDisableColor() const
void SetFloatTitleHeight(sal_Int32 nSize)
static bool isRightToLeft(LanguageType nLang)
void SetFamilyName(const OUString &rFamilyName)
Definition: font/font.cxx:117
const vcl::Font & GetGroupFont() const
sal_Int32 mnDoubleClkHeight
void SetIconTheme(const OUString &)
Set the icon theme to use.
std::shared_ptr< ImplStyleData > mxData
Definition: settings.hxx:213
bool GetUseSystemUIFonts() const
const Color & GetActionButtonPressedRolloverTextColor() const
const Color & GetMenuBarColor() const
MouseMiddleButtonAction GetMiddleButtonAction() const
const vcl::Font & GetToolFont() const
void SetScrollBarSize(sal_Int32 nSize)
void SetListBoxMaximumLineCount(sal_uInt16 nCount)
sal_Int32 GetButtonRepeat() const
void SetEdgeBlending(sal_uInt16 nCount)
sal_Int32 mnMinThumbSize
const std::optional< Color > & GetPersonaMenuBarTextColor() const
sal_Int32 GetDoubleClickWidth() const
css::uno::Any getNodeValue(const OUString &_rPath) const noexcept
#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:639
Color maCheckedColor
DisplayOptions GetDisplayOptions() const
void SetLanguageTag(const OUString &rLanguage, bool bCanonicalize)
void SetMenuBarColor(const Color &rColor)
const vcl::Font & GetTabFont() const
sal_Int32 mnCursorSize
void SetMouseSettings(const MouseSettings &rSet)
sal_uInt16 mnColorValueSetColumnCount
Color maMenuHighlightTextColor
void SetButtonRolloverTextColor(const Color &rColor)
TRISTATE_FALSE
const Color & GetMenuBarHighlightTextColor() const
void SetGroupTextColor(const Color &rColor)
void SetMenuBarHighlightTextColor(const Color &rColor)
vcl::Font maTitleFont
void SetDisableColor(const Color &rColor)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_GRAY
const Color & GetFontColor() const
const Color & GetFieldColor() const
WEIGHT_NORMAL
bool GetHideDisabledMenuItems() const
std::unique_ptr< LocaleDataWrapper > mpNeutralLocaleDataWrapper
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
sal_Int32 mnFloatTitleHeight
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)
static sal_Int32 GetActionDelay()
void SetMenuDelay(sal_Int32 nDelay)
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)
ColorTransparency
const Color & GetAlternatingRowColor() const
const LanguageTag & getLanguageTag()
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
Definition: graph.cxx:330
void SetRadioCheckTextColor(const Color &rColor)
void SetUseSystemUIFonts(bool bUseSystemUIFonts)
css::beans::Optional< css::uno::Any > getValue(std::u16string_view id)
void SetVisitedLinkColor(const Color &rColor)
std::shared_ptr< ImplAllSettingsData > mxData
Definition: settings.hxx:676
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)
sal_Int32 mnButtonRepeat
void SetUseImagesInMenus(TriState eUseImagesInMenus)
MouseSettingsOptions mnOptions
Color maHighlightColor
void SetInactiveTabColor(const Color &rColor)
void SetToolFont(const vcl::Font &rFont)
const Color & GetLinkColor() const
void SetStartDragWidth(sal_Int32 nDragWidth)
WhichPersona
void SetPreferredContextMenuShortcuts(bool bContextMenuShortcuts)
void SetFloatTitleFont(const vcl::Font &rFont)
const Color & GetButtonRolloverTextColor() const
const Color & GetDefaultActionButtonRolloverTextColor() const
StyleSettingsOptions GetOptions() const
Color maFlatButtonRolloverTextColor
sal_Int32 mnMenuDelay
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:835
const LocaleDataWrapper & GetNeutralLocaleDataWrapper() const
static DefaultFontConfiguration & get()
SelectionOptions mnSelectionOptions
const vcl::I18nHelper & GetLocaleI18nHelper() const
static bool GetMathLayoutRTL()
void SetMinThumbSize(sal_Int32 nSize)
Color maDefaultActionButtonRolloverTextColor
sal_Int32 mnStartDragHeight
bool GetUseFontAAFromSystem() const
void SetTabTextColor(const Color &rColor)
vcl::Font maToolFont
const Color & GetVisitedLinkColor() const
static sal_uInt16 GetContextMenuCode()
const Color & GetMenuBorderColor() const
sal_uInt16 mnEdgeBlending
Color maMenuHighlightColor
void SetToolTextColor(const Color &rColor)
void SetSelectionOptions(SelectionOptions nOptions)
void SetPreferredIconTheme(const OUString &, bool bDarkIconTheme=false)
Set a preferred icon theme.
TriState meUseImagesInMenus
TriState mnDisablePrinting
void SetGroupFont(const vcl::Font &rFont)
void SetPushButtonFont(const vcl::Font &rFont)
Color maDeactiveBorderColor
Color maMenuBarRolloverColor
static sal_Int32 GetBorderSize()
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:1546
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:196
void SetLabelFont(const vcl::Font &rFont)
unsigned char sal_uInt8
Size GetToolbarIconSizePixel() const
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
sal_Int32 GetCursorSize() const
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:198
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 SetButtonRepeat(sal_Int32 nRepeat)
void SetFollow(MouseFollowFlags nFollow)
Reference< XComponentContext > getProcessComponentContext()
const MouseSettings & GetMouseSettings() const
sal_Int32 GetTitleHeight() const
const vcl::Font & GetFloatTitleFont() const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
Size maListBoxPreviewDefaultLogicSize
const Color & GetWindowColor() const
static sal_Int32 GetBalloonDelay()
bool GetSkipDisabledInMenus() const
Color maFieldRolloverTextColor
void SetHelpColor(const Color &rColor)
void SetActiveBorderColor(const Color &rColor)
vcl::Font maLabelFont
Color maLabelTextColor
const vcl::Font & GetAppFont() const
Color maFlatButtonPressedRolloverTextColor
void Set3DColors(const Color &rColor)
AllSettingsFlags Update(AllSettingsFlags nFlags, const AllSettings &rSettings)
void SetHelpSettings(const HelpSettings &rSet)
void SetListBoxPreviewDefaultLogicSize(Size const &rSize)
sal_Int32 GetSpinSize() const
TriState meContextMenuShortcuts
static sal_uInt16 GetListBoxPreviewDefaultLineWidth()
DisplayOptions
Definition: settings.hxx:188
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:77
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
std::shared_ptr< ImplHelpData > mxData
Definition: settings.hxx:644
DragFullOptions
Definition: settings.hxx:163
const LanguageTag & GetRealUILanguageTag() const
void SetActiveTextColor(const Color &rColor)
void SetDoubleClickHeight(sal_Int32 nDoubleClkHeight)
bool GetDisablePrinting() const
void SetTabHighlightTextColor(const Color &rColor)
Color maButtonRolloverTextColor
static SettingsConfigItem * get()
Color maMenuBarRolloverTextColor
void SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
sal_uInt64 mnDoubleClkTime
void SetDefaultButtonRolloverTextColor(const Color &rColor)
static bool isRightToLeftMath(LanguageType nLang)
bool operator!=(const AllSettings &rSet) const
void SetAntialiasingMinPixelHeight(sal_Int32 nMinPixel)
HelpSettings maHelpSettings
const Color & GetMenuBarRolloverTextColor() const
void SetHelpTextColor(const Color &rColor)
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
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)
sal_Int32 mnTitleHeight
#define MOUSE_RIGHT
Definition: event.hxx:104
AllSettingsFlags GetChangeFlags(const AllSettings &rSettings) const
sal_Int32 h
const Color & GetTabTextColor() const
bool operator!=(const MiscSettings &rSet) const
void BatchSetBackgrounds(const Color &aBackColor, bool bCheckedColorSpecialCase=true)
const Color & GetWindowTextColor() const
vcl::Font maIconFont
void SetDarkShadowColor(const Color &rColor)
Color maTabRolloverTextColor
const Color & GetMonoColor() const
bool operator==(const StyleSettings &rSet) const
void SetMiddleButtonAction(MouseMiddleButtonAction nAction)
Color maMenuBorderColor
std::shared_ptr< ImplMiscData > mxData
Definition: settings.hxx:624
bool GetUseFlatBorders() const
MouseMiddleButtonAction
Definition: settings.hxx:72
sal_Int32 mnTipTimeout
static sal_Int32 GetButtonStartRepeat()
Color maVisitedLinkColor
sal_Int32 mnDoubleClkWidth
sal_Int32 GetStartDragHeight() const
std::unique_ptr< vcl::I18nHelper > mpUII18nHelper
vcl::Font maAppFont
void SetActiveColor(const Color &rColor)
Color maEdgeBlendingTopLeftColor