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 
2073 const DialogStyle&
2075 {
2076  return mxData->maDialogStyle;
2077 }
2078 
2079 void
2081 {
2082  CopyData();
2083  mxData->mnEdgeBlending = nCount;
2084 }
2085 
2086 sal_uInt16
2088 {
2089  return mxData->mnEdgeBlending;
2090 }
2091 
2092 const Color&
2094 {
2095  return mxData->maEdgeBlendingTopLeftColor;
2096 }
2097 
2098 const Color&
2100 {
2101  return mxData->maEdgeBlendingBottomRightColor;
2102 }
2103 
2104 void
2106 {
2107  CopyData();
2108  mxData->mnListBoxMaximumLineCount = nCount;
2109 }
2110 
2111 sal_uInt16
2113 {
2114  return mxData->mnListBoxMaximumLineCount;
2115 }
2116 
2117 void
2119 {
2120  CopyData();
2121  mxData->mnColorValueSetColumnCount = nCount;
2122 }
2123 
2124 sal_uInt16
2126 {
2127  return mxData->mnColorValueSetColumnCount;
2128 }
2129 
2130 sal_uInt16
2132 {
2133  return 1;
2134 }
2135 
2136 void
2138 {
2139  CopyData();
2140  mxData->mbPreviewUsesCheckeredBackground = bNew;
2141 }
2142 
2143 bool
2145 {
2146  return mxData->mbPreviewUsesCheckeredBackground;
2147 }
2148 
2149 bool
2151 {
2152  return !(*this == rSet);
2153 }
2154 
2156 {
2157  mxData->maListBoxPreviewDefaultLogicSize = rSize;
2158 }
2159 
2161 {
2162  if(0 == mxData->maListBoxPreviewDefaultPixelSize.Width() || 0 == mxData->maListBoxPreviewDefaultPixelSize.Height())
2163  {
2164  const_cast< StyleSettings* >(this)->mxData->maListBoxPreviewDefaultPixelSize =
2165  Application::GetDefaultDevice()->LogicToPixel(mxData->maListBoxPreviewDefaultLogicSize, MapMode(MapUnit::MapAppFont));
2166  }
2167 
2168  return mxData->maListBoxPreviewDefaultPixelSize;
2169 }
2170 
2171 void StyleSettings::Set3DColors( const Color& rColor )
2172 {
2173  CopyData();
2174  mxData->maFaceColor = rColor;
2175  mxData->maLightBorderColor = rColor;
2176  mxData->maMenuBorderColor = rColor;
2177  mxData->maDarkShadowColor = COL_BLACK;
2178  if ( rColor != COL_LIGHTGRAY )
2179  {
2180  mxData->maLightColor = rColor;
2181  mxData->maShadowColor = rColor;
2182  mxData->maDarkShadowColor=rColor;
2183  mxData->maLightColor.IncreaseLuminance( 64 );
2184  mxData->maShadowColor.DecreaseLuminance( 64 );
2185  mxData->maDarkShadowColor.DecreaseLuminance( 100 );
2186  sal_uLong nRed = mxData->maLightColor.GetRed();
2187  sal_uLong nGreen = mxData->maLightColor.GetGreen();
2188  sal_uLong nBlue = mxData->maLightColor.GetBlue();
2189  nRed += static_cast<sal_uLong>(mxData->maShadowColor.GetRed());
2190  nGreen += static_cast<sal_uLong>(mxData->maShadowColor.GetGreen());
2191  nBlue += static_cast<sal_uLong>(mxData->maShadowColor.GetBlue());
2192  mxData->maCheckedColor = Color( static_cast<sal_uInt8>(nRed/2), static_cast<sal_uInt8>(nGreen/2), static_cast<sal_uInt8>(nBlue/2) );
2193  }
2194  else
2195  {
2196  mxData->maCheckedColor = Color( 0x99, 0x99, 0x99 );
2197  mxData->maLightColor = COL_WHITE;
2198  mxData->maShadowColor = COL_GRAY;
2199  }
2200 }
2201 
2203 {
2204  CopyData();
2205  // Light gray checked color special case
2206  if ( GetFaceColor() == COL_LIGHTGRAY )
2207  mxData->maCheckedColor = Color( 0xCC, 0xCC, 0xCC );
2208  else
2209  {
2210  sal_uInt8 nRed = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetRed()) + static_cast<sal_uInt16>(mxData->maLightColor.GetRed()))/2);
2211  sal_uInt8 nGreen = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetGreen()) + static_cast<sal_uInt16>(mxData->maLightColor.GetGreen()))/2);
2212  sal_uInt8 nBlue = static_cast<sal_uInt8>((static_cast<sal_uInt16>(mxData->maFaceColor.GetBlue()) + static_cast<sal_uInt16>(mxData->maLightColor.GetBlue()))/2);
2213  mxData->maCheckedColor = Color( nRed, nGreen, nBlue );
2214  }
2215 }
2216 
2218 {
2219  // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
2220  switch (mxData->meUseImagesInMenus) {
2221  case TRISTATE_FALSE:
2222  return false;
2223  case TRISTATE_TRUE:
2224  return true;
2225  default: // TRISTATE_INDET:
2227  }
2228 }
2229 
2230 static BitmapEx readBitmapEx( const OUString& rPath )
2231 {
2232  OUString aPath( rPath );
2233  rtl::Bootstrap::expandMacros( aPath );
2234 
2235  // import the image
2236  Graphic aGraphic;
2237  if ( GraphicFilter::LoadGraphic( aPath, OUString(), aGraphic ) != ERRCODE_NONE )
2238  return BitmapEx();
2239  return aGraphic.GetBitmapEx();
2240 }
2241 
2242 namespace {
2243 
2244 enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
2245 
2246 }
2247 
2249 static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, std::optional<Color>& rMenuBarTextColor )
2250 {
2251  uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
2252  if ( !xContext.is() )
2253  return;
2254 
2255  // don't burn time loading images we don't need.
2257  return;
2258 
2259  // read from the configuration
2260  OUString aPersona( officecfg::Office::Common::Misc::Persona::get( xContext ) );
2261  OUString aPersonaSettings( officecfg::Office::Common::Misc::PersonaSettings::get( xContext ) );
2262 
2263  // have the settings changed? marks if header /footer prepared before
2264  //should maybe extended to a flag that marks if header /footer /both are loaded
2265  OUString aOldValue= eWhich==PERSONA_HEADER?OUString(aPersona + ";" + aPersonaSettings+";h" ):OUString(aPersona + ";" + aPersonaSettings+";f" );
2266  if ( rHeaderFooter == aOldValue )
2267  return;
2268 
2269  rHeaderFooter = aOldValue;
2270  rHeaderFooterBitmap = BitmapEx();
2271  rMenuBarTextColor.reset();
2272 
2273  // now read the new values and setup bitmaps
2274  OUString aHeader, aFooter;
2275  if ( aPersona == "own" || aPersona == "default" )
2276  {
2277  sal_Int32 nIndex = 0;
2278 
2279  // Skip the persona slug, name, and preview
2280  aHeader = aPersonaSettings.getToken( 3, ';', nIndex );
2281 
2282  if ( nIndex > 0 )
2283  aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
2284 
2285  // change menu text color, advance nIndex to skip the '#'
2286  if ( nIndex > 0 )
2287  {
2288  OUString aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
2289  rMenuBarTextColor = Color( ColorTransparency, aColor.toUInt32( 16 ) );
2290  }
2291  }
2292 
2293  OUString aName;
2294  switch ( eWhich ) {
2295  case PERSONA_HEADER: aName = aHeader; break;
2296  case PERSONA_FOOTER: aName = aFooter; break;
2297  }
2298 
2299  if ( !aName.isEmpty() )
2300  {
2301  OUString gallery("");
2302  // try the gallery first, then the program path:
2303  if ( aPersona == "own" && !aPersonaSettings.startsWith( "vnd.sun.star.expand" ) )
2304  {
2305  gallery = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
2306  rtl::Bootstrap::expandMacros( gallery );
2307  gallery += "/user/gallery/personas/";
2308  }
2309  else if ( aPersona == "default" )
2310  {
2311  gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/";
2312  }
2313  rHeaderFooterBitmap = readBitmapEx( gallery + aName );
2314 
2315  if ( rHeaderFooterBitmap.IsEmpty() )
2316  rHeaderFooterBitmap = readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" + aName );
2317  }
2318 
2319  // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
2320 
2321  if( rHeaderFooterBitmap.IsEmpty() )
2322  {
2323  std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
2324  officecfg::Office::Common::Misc::Persona::set( "no", batch );
2325  officecfg::Office::Common::Misc::PersonaSettings::set( "", batch );
2326  batch->commit();
2327  }
2328 }
2329 
2331 {
2332  setupPersonaHeaderFooter( PERSONA_HEADER, mxData->maPersonaHeaderFooter, mxData->maPersonaHeaderBitmap, mxData->maPersonaMenuBarTextColor );
2333  return mxData->maPersonaHeaderBitmap;
2334 }
2335 
2337 {
2338  setupPersonaHeaderFooter( PERSONA_FOOTER, mxData->maPersonaHeaderFooter, mxData->maPersonaFooterBitmap, mxData->maPersonaMenuBarTextColor );
2339  return mxData->maPersonaFooterBitmap;
2340 }
2341 
2342 const std::optional<Color>& StyleSettings::GetPersonaMenuBarTextColor() const
2343 {
2344  GetPersonaHeader();
2345  return mxData->maPersonaMenuBarTextColor;
2346 }
2347 
2349 {
2350  CopyData();
2351  mxData->SetStandardStyles();
2352 }
2353 
2355 {
2356  // compute a brighter face color that can be used in gradients
2357  // for a convex look (eg toolbars)
2358 
2359  sal_uInt16 h, s, b;
2360  GetFaceColor().RGBtoHSB( h, s, b );
2361  if( s > 1) s=1;
2362  if( b < 98) b=98;
2363  return Color::HSBtoRGB( h, s, b );
2364 }
2365 
2367 {
2368  // compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
2369  sal_uInt16 h, s, b;
2370  GetShadowColor().RGBtoHSB( h, s, b );
2371  b += b/4;
2372  s -= s/4;
2373  return Color::HSBtoRGB( h, s, b );
2374 }
2375 
2377 {
2378  // copy if other references exist
2379  if (mxData.use_count() > 1)
2380  {
2381  mxData = std::make_shared<ImplStyleData>(*mxData);
2382  }
2383 }
2384 
2386 {
2387  if ( mxData == rSet.mxData )
2388  return true;
2389 
2390  if (mxData->mIconTheme != rSet.mxData->mIconTheme) {
2391  return false;
2392  }
2393 
2394  if (*mxData->mIconThemeSelector != *rSet.mxData->mIconThemeSelector) {
2395  return false;
2396  }
2397 
2398  return (mxData->mnOptions == rSet.mxData->mnOptions) &&
2399  (mxData->mbAutoMnemonic == rSet.mxData->mbAutoMnemonic) &&
2400  (mxData->mnDragFullOptions == rSet.mxData->mnDragFullOptions) &&
2401  (mxData->mnSelectionOptions == rSet.mxData->mnSelectionOptions) &&
2402  (mxData->mnDisplayOptions == rSet.mxData->mnDisplayOptions) &&
2403  (mxData->mnCursorSize == rSet.mxData->mnCursorSize) &&
2404  (mxData->mnCursorBlinkTime == rSet.mxData->mnCursorBlinkTime) &&
2405  (mxData->mnTitleHeight == rSet.mxData->mnTitleHeight) &&
2406  (mxData->mnFloatTitleHeight == rSet.mxData->mnFloatTitleHeight) &&
2407  (mxData->mnScrollBarSize == rSet.mxData->mnScrollBarSize) &&
2408  (mxData->mnMinThumbSize == rSet.mxData->mnMinThumbSize) &&
2409  (mxData->mnSpinSize == rSet.mxData->mnSpinSize) &&
2410  (mxData->mnAntialiasedMin == rSet.mxData->mnAntialiasedMin) &&
2411  (mxData->mbHighContrast == rSet.mxData->mbHighContrast) &&
2412  (mxData->mbUseSystemUIFonts == rSet.mxData->mbUseSystemUIFonts) &&
2413  (mxData->mbUseFontAAFromSystem == rSet.mxData->mbUseFontAAFromSystem) &&
2414  (mxData->mnUseFlatBorders == rSet.mxData->mnUseFlatBorders) &&
2415  (mxData->mnUseFlatMenus == rSet.mxData->mnUseFlatMenus) &&
2416  (mxData->maFaceColor == rSet.mxData->maFaceColor) &&
2417  (mxData->maCheckedColor == rSet.mxData->maCheckedColor) &&
2418  (mxData->maLightColor == rSet.mxData->maLightColor) &&
2419  (mxData->maLightBorderColor == rSet.mxData->maLightBorderColor) &&
2420  (mxData->maShadowColor == rSet.mxData->maShadowColor) &&
2421  (mxData->maDarkShadowColor == rSet.mxData->maDarkShadowColor) &&
2422  (mxData->maButtonTextColor == rSet.mxData->maButtonTextColor) &&
2423  (mxData->maDefaultActionButtonTextColor == rSet.mxData->maDefaultActionButtonTextColor) &&
2424  (mxData->maActionButtonTextColor == rSet.mxData->maActionButtonTextColor) &&
2425  (mxData->maButtonRolloverTextColor == rSet.mxData->maButtonRolloverTextColor) &&
2426  (mxData->maActionButtonRolloverTextColor == rSet.mxData->maActionButtonRolloverTextColor) &&
2427  (mxData->maRadioCheckTextColor == rSet.mxData->maRadioCheckTextColor) &&
2428  (mxData->maGroupTextColor == rSet.mxData->maGroupTextColor) &&
2429  (mxData->maLabelTextColor == rSet.mxData->maLabelTextColor) &&
2430  (mxData->maWindowColor == rSet.mxData->maWindowColor) &&
2431  (mxData->maWindowTextColor == rSet.mxData->maWindowTextColor) &&
2432  (mxData->maDialogColor == rSet.mxData->maDialogColor) &&
2433  (mxData->maDialogTextColor == rSet.mxData->maDialogTextColor) &&
2434  (mxData->maWorkspaceColor == rSet.mxData->maWorkspaceColor) &&
2435  (mxData->maMonoColor == rSet.mxData->maMonoColor) &&
2436  (mxData->maFieldColor == rSet.mxData->maFieldColor) &&
2437  (mxData->maFieldTextColor == rSet.mxData->maFieldTextColor) &&
2438  (mxData->maActiveColor == rSet.mxData->maActiveColor) &&
2439  (mxData->maActiveTextColor == rSet.mxData->maActiveTextColor) &&
2440  (mxData->maActiveBorderColor == rSet.mxData->maActiveBorderColor) &&
2441  (mxData->maDeactiveColor == rSet.mxData->maDeactiveColor) &&
2442  (mxData->maDeactiveTextColor == rSet.mxData->maDeactiveTextColor) &&
2443  (mxData->maDeactiveBorderColor == rSet.mxData->maDeactiveBorderColor) &&
2444  (mxData->maMenuColor == rSet.mxData->maMenuColor) &&
2445  (mxData->maMenuBarColor == rSet.mxData->maMenuBarColor) &&
2446  (mxData->maMenuBarRolloverColor == rSet.mxData->maMenuBarRolloverColor) &&
2447  (mxData->maMenuBorderColor == rSet.mxData->maMenuBorderColor) &&
2448  (mxData->maMenuTextColor == rSet.mxData->maMenuTextColor) &&
2449  (mxData->maMenuBarTextColor == rSet.mxData->maMenuBarTextColor) &&
2450  (mxData->maMenuBarRolloverTextColor == rSet.mxData->maMenuBarRolloverTextColor) &&
2451  (mxData->maMenuHighlightColor == rSet.mxData->maMenuHighlightColor) &&
2452  (mxData->maMenuHighlightTextColor == rSet.mxData->maMenuHighlightTextColor) &&
2453  (mxData->maHighlightColor == rSet.mxData->maHighlightColor) &&
2454  (mxData->maHighlightTextColor == rSet.mxData->maHighlightTextColor) &&
2455  (mxData->maTabTextColor == rSet.mxData->maTabTextColor) &&
2456  (mxData->maTabRolloverTextColor == rSet.mxData->maTabRolloverTextColor) &&
2457  (mxData->maTabHighlightTextColor == rSet.mxData->maTabHighlightTextColor) &&
2458  (mxData->maActiveTabColor == rSet.mxData->maActiveTabColor) &&
2459  (mxData->maInactiveTabColor == rSet.mxData->maInactiveTabColor) &&
2460  (mxData->maDisableColor == rSet.mxData->maDisableColor) &&
2461  (mxData->maHelpColor == rSet.mxData->maHelpColor) &&
2462  (mxData->maHelpTextColor == rSet.mxData->maHelpTextColor) &&
2463  (mxData->maLinkColor == rSet.mxData->maLinkColor) &&
2464  (mxData->maVisitedLinkColor == rSet.mxData->maVisitedLinkColor) &&
2465  (mxData->maToolTextColor == rSet.mxData->maToolTextColor) &&
2466  (mxData->maAppFont == rSet.mxData->maAppFont) &&
2467  (mxData->maHelpFont == rSet.mxData->maHelpFont) &&
2468  (mxData->maTitleFont == rSet.mxData->maTitleFont) &&
2469  (mxData->maFloatTitleFont == rSet.mxData->maFloatTitleFont) &&
2470  (mxData->maMenuFont == rSet.mxData->maMenuFont) &&
2471  (mxData->maToolFont == rSet.mxData->maToolFont) &&
2472  (mxData->maGroupFont == rSet.mxData->maGroupFont) &&
2473  (mxData->maLabelFont == rSet.mxData->maLabelFont) &&
2474  (mxData->maRadioCheckFont == rSet.mxData->maRadioCheckFont) &&
2475  (mxData->maPushButtonFont == rSet.mxData->maPushButtonFont) &&
2476  (mxData->maFieldFont == rSet.mxData->maFieldFont) &&
2477  (mxData->maIconFont == rSet.mxData->maIconFont) &&
2478  (mxData->maTabFont == rSet.mxData->maTabFont) &&
2479  (mxData->meUseImagesInMenus == rSet.mxData->meUseImagesInMenus) &&
2480  (mxData->mbPreferredUseImagesInMenus == rSet.mxData->mbPreferredUseImagesInMenus) &&
2481  (mxData->mbSkipDisabledInMenus == rSet.mxData->mbSkipDisabledInMenus) &&
2482  (mxData->mbHideDisabledMenuItems == rSet.mxData->mbHideDisabledMenuItems) &&
2483  (mxData->mbPreferredContextMenuShortcuts == rSet.mxData->mbPreferredContextMenuShortcuts)&&
2484  (mxData->meContextMenuShortcuts == rSet.mxData->meContextMenuShortcuts) &&
2485  (mxData->mbPrimaryButtonWarpsSlider == rSet.mxData->mbPrimaryButtonWarpsSlider) &&
2486  (mxData->maFontColor == rSet.mxData->maFontColor) &&
2487  (mxData->mnEdgeBlending == rSet.mxData->mnEdgeBlending) &&
2488  (mxData->maEdgeBlendingTopLeftColor == rSet.mxData->maEdgeBlendingTopLeftColor) &&
2489  (mxData->maEdgeBlendingBottomRightColor == rSet.mxData->maEdgeBlendingBottomRightColor) &&
2490  (mxData->mnListBoxMaximumLineCount == rSet.mxData->mnListBoxMaximumLineCount) &&
2491  (mxData->mnColorValueSetColumnCount == rSet.mxData->mnColorValueSetColumnCount) &&
2492  (mxData->maListBoxPreviewDefaultLogicSize == rSet.mxData->maListBoxPreviewDefaultLogicSize) &&
2493  (mxData->maListBoxPreviewDefaultPixelSize == rSet.mxData->maListBoxPreviewDefaultPixelSize) &&
2494  (mxData->mbPreviewUsesCheckeredBackground == rSet.mxData->mbPreviewUsesCheckeredBackground);
2495 }
2496 
2498  mnEnableATT(TRISTATE_INDET),
2499  mnDisablePrinting(TRISTATE_INDET)
2500 {
2501  static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
2502  mbEnableLocalizedDecimalSep = (pEnv != nullptr);
2503 }
2504 
2506  : mxData(std::make_shared<ImplMiscData>())
2507 {
2508 }
2509 
2510 bool MiscSettings::operator ==( const MiscSettings& rSet ) const
2511 {
2512  if ( mxData == rSet.mxData )
2513  return true;
2514 
2515  return (mxData->mnEnableATT == rSet.mxData->mnEnableATT ) &&
2516  (mxData->mnDisablePrinting == rSet.mxData->mnDisablePrinting ) &&
2517  (mxData->mbEnableLocalizedDecimalSep == rSet.mxData->mbEnableLocalizedDecimalSep );
2518 }
2519 
2520 bool
2522 {
2523  return !(*this == rSet);
2524 }
2525 
2527 {
2528  if( mxData->mnDisablePrinting == TRISTATE_INDET )
2529  {
2530  OUString aEnable =
2532  getValue( "DesktopManagement",
2533  "DisablePrinting" );
2534  mxData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2535  }
2536 
2537  return mxData->mnDisablePrinting != TRISTATE_FALSE;
2538 }
2539 
2541 {
2542 
2543 #ifdef _WIN32
2544  if( mxData->mnEnableATT == TRISTATE_INDET )
2545  {
2546  // Check in the Windows registry if an AT tool wants Accessibility support to
2547  // be activated ..
2548  HKEY hkey;
2549 
2550  if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2551  L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2552  &hkey) )
2553  {
2554  DWORD dwType;
2555  wchar_t Data[6]; // possible values: "true", "false", "1", "0", DWORD
2556  DWORD cbData = sizeof(Data);
2557 
2558  if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2559  nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2560  {
2561  switch (dwType)
2562  {
2563  case REG_SZ:
2564  mxData->mnEnableATT = ((0 == wcsicmp(Data, L"1")) || (0 == wcsicmp(Data, L"true"))) ? TRISTATE_TRUE : TRISTATE_FALSE;
2565  break;
2566  case REG_DWORD:
2567  switch (reinterpret_cast<DWORD *>(Data)[0]) {
2568  case 0:
2569  mxData->mnEnableATT = TRISTATE_FALSE;
2570  break;
2571  case 1:
2572  mxData->mnEnableATT = TRISTATE_TRUE;
2573  break;
2574  default:
2575  mxData->mnEnableATT = TRISTATE_INDET;
2576  //TODO: or TRISTATE_TRUE?
2577  break;
2578  }
2579  break;
2580  default:
2581  // Unsupported registry type
2582  break;
2583  }
2584  }
2585 
2586  RegCloseKey(hkey);
2587  }
2588  }
2589 #endif
2590 
2591  if( mxData->mnEnableATT == TRISTATE_INDET )
2592  {
2593  static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
2594  if( !pEnv || !*pEnv )
2595  {
2596  OUString aEnable =
2598  getValue( "Accessibility",
2599  "EnableATToolSupport" );
2600  mxData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
2601  }
2602  else
2603  {
2604  mxData->mnEnableATT = TRISTATE_TRUE;
2605  }
2606  }
2607 
2608  return mxData->mnEnableATT != TRISTATE_FALSE;
2609 }
2610 
2611 #ifdef _WIN32
2612 void MiscSettings::SetEnableATToolSupport( bool bEnable )
2613 {
2614  if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mxData->mnEnableATT )
2615  {
2616  if( bEnable && !ImplInitAccessBridge() )
2617  return;
2618 
2619  HKEY hkey;
2620 
2621  // If the accessibility key in the Windows registry exists, change it synchronously
2622  if( ERROR_SUCCESS == RegOpenKeyW(HKEY_CURRENT_USER,
2623  L"Software\\LibreOffice\\Accessibility\\AtToolSupport",
2624  &hkey) )
2625  {
2626  DWORD dwType;
2627  wchar_t Data[6]; // possible values: "true", "false", 1, 0
2628  DWORD cbData = sizeof(Data);
2629 
2630  if( ERROR_SUCCESS == RegQueryValueExW(hkey, L"SupportAssistiveTechnology",
2631  nullptr, &dwType, reinterpret_cast<LPBYTE>(Data), &cbData) )
2632  {
2633  switch (dwType)
2634  {
2635  case REG_SZ:
2636  RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2637  0, dwType,
2638  reinterpret_cast<const BYTE*>(bEnable ? L"true" : L"false"),
2639  bEnable ? sizeof(L"true") : sizeof(L"false"));
2640  break;
2641  case REG_DWORD:
2642  reinterpret_cast<DWORD *>(Data)[0] = bEnable ? 1 : 0;
2643  RegSetValueExW(hkey, L"SupportAssistiveTechnology",
2644  0, dwType, reinterpret_cast<const BYTE*>(Data), sizeof(DWORD));
2645  break;
2646  default:
2647  // Unsupported registry type
2648  break;
2649  }
2650  }
2651 
2652  RegCloseKey(hkey);
2653  }
2654 
2656  setValue( "Accessibility",
2657  "EnableATToolSupport",
2658  bEnable ? OUString("true") : OUString("false" ) );
2659  mxData->mnEnableATT = bEnable ? TRISTATE_TRUE : TRISTATE_FALSE;
2660  }
2661 }
2662 #endif
2663 
2665 {
2666  // copy if other references exist
2667  if (mxData.use_count() > 1)
2668  {
2669  mxData = std::make_shared<ImplMiscData>(*mxData);
2670  }
2671  mxData->mbEnableLocalizedDecimalSep = bEnable;
2672 }
2673 
2675 {
2676  return mxData->mbEnableLocalizedDecimalSep;
2677 }
2678 
2680  : mxData(std::make_shared<ImplHelpData>())
2681 {
2682 }
2683 
2684 bool HelpSettings::operator ==( const HelpSettings& rSet ) const
2685 {
2686  if ( mxData == rSet.mxData )
2687  return true;
2688 
2689  return (mxData->mnTipTimeout == rSet.mxData->mnTipTimeout );
2690 }
2691 
2692 sal_Int32
2694 {
2695  return 500;
2696 }
2697 
2698 void
2699 HelpSettings::SetTipTimeout( sal_Int32 nTipTimeout )
2700 {
2701  // copy if other references exist
2702  if (mxData.use_count() > 1)
2703  {
2704  mxData = std::make_shared<ImplHelpData>(*mxData);
2705  }
2706  mxData->mnTipTimeout = nTipTimeout;
2707 }
2708 
2709 sal_Int32
2711 {
2712  return mxData->mnTipTimeout;
2713 }
2714 
2715 sal_Int32
2717 {
2718  return 1500;
2719 }
2720 
2721 bool
2723 {
2724  return !(*this == rSet);
2725 }
2726 
2728  :
2729  maLocale( LANGUAGE_SYSTEM ),
2730  maUILocale( LANGUAGE_SYSTEM )
2731 {
2734 }
2735 
2737  maMouseSettings( rData.maMouseSettings ),
2738  maStyleSettings( rData.maStyleSettings ),
2739  maMiscSettings( rData.maMiscSettings ),
2740  maHelpSettings( rData.maHelpSettings ),
2741  maLocale( rData.maLocale ),
2742  maUILocale( rData.maUILocale )
2743 {
2744  // Create the cache objects new when their getter is called.
2745 }
2746 
2748 {
2749  mpLocaleDataWrapper.reset();
2750  mpUILocaleDataWrapper.reset();
2752  mpI18nHelper.reset();
2753  mpUII18nHelper.reset();
2754 }
2755 
2757  : mxData(std::make_shared<ImplAllSettingsData>())
2758 {
2759 }
2760 
2762 {
2763  // copy if other references exist
2764  if (mxData.use_count() > 1)
2765  {
2766  mxData = std::make_shared<ImplAllSettingsData>(*mxData);
2767  }
2768 
2769 }
2770 
2772 {
2773 
2775 
2776  if ( nFlags & AllSettingsFlags::MOUSE )
2777  {
2778  if ( mxData->maMouseSettings != rSet.mxData->maMouseSettings )
2779  {
2780  CopyData();
2781  mxData->maMouseSettings = rSet.mxData->maMouseSettings;
2782  nChangeFlags |= AllSettingsFlags::MOUSE;
2783  }
2784  }
2785 
2786  if ( nFlags & AllSettingsFlags::STYLE )
2787  {
2788  if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2789  {
2790  CopyData();
2791  mxData->maStyleSettings = rSet.mxData->maStyleSettings;
2792  nChangeFlags |= AllSettingsFlags::STYLE;
2793  }
2794  }
2795 
2796  if ( nFlags & AllSettingsFlags::MISC )
2797  {
2798  if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2799  {
2800  CopyData();
2801  mxData->maMiscSettings = rSet.mxData->maMiscSettings;
2802  nChangeFlags |= AllSettingsFlags::MISC;
2803  }
2804  }
2805 
2806  if ( nFlags & AllSettingsFlags::LOCALE )
2807  {
2808  if ( mxData->maLocale != rSet.mxData->maLocale )
2809  {
2810  SetLanguageTag( rSet.mxData->maLocale );
2811  nChangeFlags |= AllSettingsFlags::LOCALE;
2812  }
2813  }
2814 
2815  return nChangeFlags;
2816 }
2817 
2819 {
2820 
2822 
2823  if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
2824  nChangeFlags |= AllSettingsFlags::STYLE;
2825 
2826  if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings )
2827  nChangeFlags |= AllSettingsFlags::MISC;
2828 
2829  if ( mxData->maLocale != rSet.mxData->maLocale )
2830  nChangeFlags |= AllSettingsFlags::LOCALE;
2831 
2832  return nChangeFlags;
2833 }
2834 
2835 bool AllSettings::operator ==( const AllSettings& rSet ) const
2836 {
2837  if ( mxData == rSet.mxData )
2838  return true;
2839 
2840  if ( (mxData->maMouseSettings == rSet.mxData->maMouseSettings) &&
2841  (mxData->maStyleSettings == rSet.mxData->maStyleSettings) &&
2842  (mxData->maMiscSettings == rSet.mxData->maMiscSettings) &&
2843  (mxData->maHelpSettings == rSet.mxData->maHelpSettings) &&
2844  (mxData->maLocale == rSet.mxData->maLocale) )
2845  {
2846  return true;
2847  }
2848 
2849  return false;
2850 }
2851 
2852 void AllSettings::SetLanguageTag(const OUString& rLanguage, bool bCanonicalize)
2853 {
2854  SetLanguageTag(LanguageTag(rLanguage, bCanonicalize));
2855 }
2856 
2857 void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag )
2858 {
2859  if (mxData->maLocale == rLanguageTag)
2860  return;
2861 
2862  CopyData();
2863 
2864  mxData->maLocale = rLanguageTag;
2865 
2866  if ( mxData->mpLocaleDataWrapper )
2867  {
2868  mxData->mpLocaleDataWrapper.reset();
2869  }
2870  if ( mxData->mpI18nHelper )
2871  {
2872  mxData->mpI18nHelper.reset();
2873  }
2874 }
2875 
2876 namespace
2877 {
2878  bool GetConfigLayoutRTL(bool bMath)
2879  {
2880  static const char* pEnv = getenv("SAL_RTL_ENABLED" );
2881  static int nUIMirroring = -1; // -1: undef, 0: auto, 1: on 2: off
2882 
2883  // environment always overrides
2884  if( pEnv )
2885  return true;
2886 
2887  bool bRTL = false;
2888 
2889  if( nUIMirroring == -1 )
2890  {
2891  nUIMirroring = 0; // ask configuration only once
2894  "org.openoffice.Office.Common/I18N/CTL" ); // note: case sensitive !
2895  if ( aNode.isValid() )
2896  {
2897  bool bTmp = bool();
2898  css::uno::Any aValue = aNode.getNodeValue( "UIMirroring" );
2899  if( aValue >>= bTmp )
2900  {
2901  // found true or false; if it was nil, nothing is changed
2902  nUIMirroring = bTmp ? 1 : 2;
2903  }
2904  }
2905  }
2906 
2907  if( nUIMirroring == 0 ) // no config found (eg, setup) or default (nil) was set: check language
2908  {
2910  if (bMath)
2911  bRTL = MsLangId::isRightToLeftMath( aLang );
2912  else
2913  bRTL = MsLangId::isRightToLeft( aLang );
2914  }
2915  else
2916  bRTL = (nUIMirroring == 1);
2917 
2918  return bRTL;
2919  }
2920 }
2921 
2923 {
2925  return false;
2926  return GetConfigLayoutRTL(false);
2927 }
2928 
2930 {
2932  return false;
2933  return GetConfigLayoutRTL(true);
2934 }
2935 
2937 {
2939  {
2940  static LanguageTag aRet("en-US");
2941  return aRet;
2942  }
2943 
2946 
2947  // SYSTEM locale means: use settings from SvtSysLocale that is resolved
2948  if ( mxData->maLocale.isSystemLocale() )
2949  mxData->maLocale = mxData->maSysLocale.GetLanguageTag();
2950 
2951  return mxData->maLocale;
2952 }
2953 
2955 {
2957  {
2958  static LanguageTag aRet("en-US");
2959  return aRet;
2960  }
2961 
2964 
2965  // the UILocale is never changed
2966  if ( mxData->maUILocale.isSystemLocale() )
2967  mxData->maUILocale = mxData->maSysLocale.GetUILanguageTag();
2968 
2969  return mxData->maUILocale;
2970 }
2971 
2973 {
2974  if ( !mxData->mpLocaleDataWrapper )
2975  const_cast<AllSettings*>(this)->mxData->mpLocaleDataWrapper.reset( new LocaleDataWrapper(
2977  return *mxData->mpLocaleDataWrapper;
2978 }
2979 
2981 {
2982  if ( !mxData->mpUILocaleDataWrapper )
2983  const_cast<AllSettings*>(this)->mxData->mpUILocaleDataWrapper.reset( new LocaleDataWrapper(
2985  return *mxData->mpUILocaleDataWrapper;
2986 }
2987 
2989 {
2990  if ( !mxData->mpNeutralLocaleDataWrapper )
2991  const_cast<AllSettings*>(this)->mxData->mpNeutralLocaleDataWrapper.reset( new LocaleDataWrapper(
2993  return *mxData->mpNeutralLocaleDataWrapper;
2994 }
2995 
2997 {
2998  if ( !mxData->mpI18nHelper ) {
2999  const_cast<AllSettings*>(this)->mxData->mpI18nHelper.reset( new vcl::I18nHelper(
3001  }
3002  return *mxData->mpI18nHelper;
3003 }
3004 
3006 {
3007  if ( !mxData->mpUII18nHelper ) {
3008  const_cast<AllSettings*>(this)->mxData->mpUII18nHelper.reset( new vcl::I18nHelper(
3010  }
3011  return *mxData->mpUII18nHelper;
3012 }
3013 
3015 {
3016  AllSettings aAllSettings( Application::GetSettings() );
3017  if ( nHint & ConfigurationHints::DecSep )
3018  {
3019  MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
3020  bool bIsDecSepAsLocale = aAllSettings.mxData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale();
3021  if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale )
3022  {
3023  aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale );
3024  aAllSettings.SetMiscSettings( aMiscSettings );
3025  }
3026  }
3027 
3028  if ( nHint & ConfigurationHints::Locale )
3029  aAllSettings.SetLanguageTag( aAllSettings.mxData->maSysLocale.GetOptions().GetLanguageTag() );
3030 
3031  Application::SetSettings( aAllSettings );
3032 }
3033 
3034 const StyleSettings&
3036 {
3037  return mxData->maStyleSettings;
3038 }
3039 
3042 {
3043  return mxData->mnOptions;
3044 }
3045 
3046 std::vector<vcl::IconThemeInfo> const &
3048 {
3049  if (!mxData->mIconThemeScanner) {
3051  }
3052  return mxData->mIconThemeScanner->GetFoundIconThemes();
3053 }
3054 
3055 /*static*/ OUString
3057 {
3058  OUString desktopEnvironment = Application::GetDesktopEnvironment();
3059  if (!mxData->mIconThemeScanner) {
3061  }
3062  OUString themeName = mxData->mIconThemeSelector->SelectIconThemeForDesktopEnvironment(
3063  mxData->mIconThemeScanner->GetFoundIconThemes(),
3064  desktopEnvironment
3065  );
3066  return themeName;
3067 }
3068 
3069 void
3070 StyleSettings::SetIconTheme(const OUString& theme)
3071 {
3072  CopyData();
3073  mxData->mIconTheme = theme;
3074 }
3075 
3076 OUString
3078 {
3079  OUString sTheme(mxData->mIconTheme);
3080  if (sTheme.isEmpty())
3081  {
3083  sTheme = "colibre";
3084  else
3085  {
3086  // read from the configuration, or fallback to what the desktop wants
3087  uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
3088  if (xContext.is())
3089  {
3090  sTheme = officecfg::Office::Common::Misc::SymbolStyle::get(xContext);
3091 
3092  if (sTheme.isEmpty() || sTheme == "auto")
3094  }
3095  }
3096  }
3097 
3098  if (!mxData->mIconThemeScanner) {
3100  }
3101  OUString r = mxData->mIconThemeSelector->SelectIconTheme(
3102  mxData->mIconThemeScanner->GetFoundIconThemes(),
3103  sTheme);
3104  return r;
3105 }
3106 
3107 void
3109 {
3110  if (mxData->mbHighContrast == bHighContrast) {
3111  return;
3112  }
3113 
3114  CopyData();
3115  mxData->mbHighContrast = bHighContrast;
3116  mxData->mIconThemeSelector->SetUseHighContrastTheme(bHighContrast);
3117 }
3118 
3119 bool
3121 {
3122  return mxData->mbHighContrast;
3123 }
3124 
3125 void
3126 StyleSettings::SetPreferredIconTheme(const OUString& theme, bool bDarkIconTheme)
3127 {
3128  mxData->mIconThemeSelector->SetPreferredIconTheme(theme, bDarkIconTheme);
3129 }
3130 
3131 void
3133 {
3134  CopyData();
3135  mxData->maMouseSettings = rSet;
3136 }
3137 
3138 const MouseSettings&
3140 {
3141  return mxData->maMouseSettings;
3142 }
3143 
3144 void
3146 {
3147  CopyData();
3148  mxData->maStyleSettings = rSet;
3149 }
3150 
3151 void
3153 {
3154  CopyData();
3155  mxData->maMiscSettings = rSet;
3156 }
3157 
3158 const MiscSettings&
3160 {
3161  return mxData->maMiscSettings;
3162 }
3163 
3164 void
3166 {
3167  CopyData();
3168  mxData->maHelpSettings = rSet;
3169 }
3170 
3171 const HelpSettings&
3173 {
3174  return mxData->maHelpSettings;
3175 }
3176 
3177 bool
3179 {
3180  return !(*this == rSet);
3181 }
3182 
3183 SvtSysLocale&
3185 {
3186  return mxData->maSysLocale;
3187 }
3188 
3189 
3191  bool bCheckedColorSpecialCase )
3192 {
3193  Set3DColors( aBackColor );
3194  SetFaceColor( aBackColor );
3195  SetDialogColor( aBackColor );
3196  SetWorkspaceColor( aBackColor );
3197 
3198  if (bCheckedColorSpecialCase)
3200 }
3201 
3203  const vcl::Font& aLabelFont )
3204 {
3205  SetAppFont( aAppFont );
3206  SetPushButtonFont( aAppFont );
3207  SetToolFont( aAppFont );
3208  SetHelpFont( aAppFont );
3209 
3210  SetMenuFont( aLabelFont );
3211  SetTabFont( aLabelFont );
3212  SetLabelFont( aLabelFont );
3213  SetRadioCheckFont( aLabelFont );
3214  SetFieldFont( aLabelFont );
3215  SetGroupFont( aLabelFont );
3216  SetIconFont( aLabelFont );
3217 }
3218 
3219 /* 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:223
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:137
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:1606
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:658
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
Definition: svapp.cxx:1073
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:74
#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:115
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:675
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
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:1550
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
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:643
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:623
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