1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 #include <svtools/accessibilityoptions.hxx>
23 #include <unotools/configmgr.hxx>
24 #include <com/sun/star/uno/Any.hxx>
25 #include <com/sun/star/uno/Sequence.hxx>
27 #include <com/sun/star/beans/XPropertySet.hpp>
28 #include <com/sun/star/container/XNameAccess.hpp>
29 #include <comphelper/configurationhelper.hxx>
30 #include <comphelper/processfactory.hxx>
32 #include <svl/smplhint.hxx>
34 #include <vcl/settings.hxx>
35 #include <vcl/svapp.hxx>
36 #include <rtl/instance.hxx>
38 #include <itemholder2.hxx>
41 using namespace com::sun::star::uno
;
43 #define HELP_TIP_TIMEOUT 0xffff // max. timeout setting to pretend a non-timeout
47 const char s_sAccessibility
[] = "org.openoffice.Office.Common/Accessibility";
48 const char s_sAutoDetectSystemHC
[] = "AutoDetectSystemHC";
49 const char s_sIsForPagePreviews
[] = "IsForPagePreviews";
50 const char s_sIsHelpTipsDisappear
[] = "IsHelpTipsDisappear";
51 const char s_sHelpTipSeconds
[] = "HelpTipSeconds";
52 const char s_sIsAllowAnimatedGraphics
[] = "IsAllowAnimatedGraphics";
53 const char s_sIsAllowAnimatedText
[] = "IsAllowAnimatedText";
54 const char s_sIsAutomaticFontColor
[] = "IsAutomaticFontColor";
55 const char s_sIsSystemFont
[] = "IsSystemFont";
56 const char s_sIsSelectionInReadonly
[] = "IsSelectionInReadonly";
57 const char s_sColorValueSetMaximumRowCount
[] = "ColorValueSetMaximumRowCount";
58 const char s_sColorValueSetEntryEdgeLength
[] = "ColorValueSetEntryEdgeLength";
59 const char s_sColorValueSetColumnCount
[] = "ColorValueSetColumnCount";
60 const char s_sEdgeBlending
[] = "EdgeBlending";
61 const char s_sListBoxMaximumLineCount
[] = "ListBoxMaximumLineCount";
64 // class SvtAccessibilityOptions_Impl ---------------------------------------------
66 class SvtAccessibilityOptions_Impl
69 css::uno::Reference
< css::container::XNameAccess
> m_xCfg
;
73 SvtAccessibilityOptions_Impl();
74 ~SvtAccessibilityOptions_Impl();
76 void SetVCLSettings();
77 sal_Bool
GetAutoDetectSystemHC();
78 sal_Bool
GetIsForPagePreviews() const;
79 sal_Bool
GetIsHelpTipsDisappear() const;
80 sal_Bool
GetIsAllowAnimatedGraphics() const;
81 sal_Bool
GetIsAllowAnimatedText() const;
82 sal_Bool
GetIsAutomaticFontColor() const;
83 sal_Bool
GetIsSystemFont() const;
84 sal_Int16
GetHelpTipSeconds() const;
85 sal_Bool
IsSelectionInReadonly() const;
86 sal_Int16
GetEdgeBlending() const;
87 sal_Int16
GetListBoxMaximumLineCount() const;
88 sal_Int16
GetColorValueSetColumnCount() const;
90 void SetAutoDetectSystemHC(sal_Bool bSet
);
91 void SetIsForPagePreviews(sal_Bool bSet
);
92 void SetIsHelpTipsDisappear(sal_Bool bSet
);
93 void SetIsAllowAnimatedGraphics(sal_Bool bSet
);
94 void SetIsAllowAnimatedText(sal_Bool bSet
);
95 void SetIsAutomaticFontColor(sal_Bool bSet
);
96 void SetIsSystemFont(sal_Bool bSet
);
97 void SetHelpTipSeconds(sal_Int16 nSet
);
98 void SetSelectionInReadonly(sal_Bool bSet
);
99 void SetEdgeBlending(sal_Int16 nSet
);
100 void SetListBoxMaximumLineCount(sal_Int16 nSet
);
101 void SetColorValueSetColumnCount(sal_Int16 nSet
);
103 sal_Bool
IsModified() const { return bIsModified
; };
106 // initialization of static members --------------------------------------
108 SvtAccessibilityOptions_Impl
* SvtAccessibilityOptions::sm_pSingleImplConfig
=NULL
;
109 sal_Int32
SvtAccessibilityOptions::sm_nAccessibilityRefCount(0);
113 struct SingletonMutex
114 : public rtl::Static
< ::osl::Mutex
, SingletonMutex
> {};
117 // -----------------------------------------------------------------------
118 // class SvtAccessibilityOptions_Impl ---------------------------------------------
120 SvtAccessibilityOptions_Impl::SvtAccessibilityOptions_Impl()
124 m_xCfg
= css::uno::Reference
< css::container::XNameAccess
>(
125 ::comphelper::ConfigurationHelper::openConfig(
126 comphelper::getProcessComponentContext(),
128 ::comphelper::ConfigurationHelper::E_STANDARD
),
129 css::uno::UNO_QUERY
);
131 bIsModified
= sal_False
;
133 catch(const css::uno::Exception
& ex
)
136 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
140 SvtAccessibilityOptions_Impl::~SvtAccessibilityOptions_Impl()
144 // -----------------------------------------------------------------------
145 sal_Bool
SvtAccessibilityOptions_Impl::GetAutoDetectSystemHC()
147 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
148 sal_Bool bRet
= sal_True
;
153 xNode
->getPropertyValue(s_sAutoDetectSystemHC
) >>= bRet
;
155 catch(const css::uno::Exception
& ex
)
157 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
163 sal_Bool
SvtAccessibilityOptions_Impl::GetIsForPagePreviews() const
165 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
166 sal_Bool bRet
= sal_True
;
171 xNode
->getPropertyValue(s_sIsForPagePreviews
) >>= bRet
;
173 catch(const css::uno::Exception
& ex
)
175 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
180 sal_Bool
SvtAccessibilityOptions_Impl::GetIsHelpTipsDisappear() const
182 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
183 sal_Bool bRet
= sal_True
;
188 xNode
->getPropertyValue(s_sIsHelpTipsDisappear
) >>= bRet
;
190 catch(const css::uno::Exception
& ex
)
192 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
198 sal_Bool
SvtAccessibilityOptions_Impl::GetIsAllowAnimatedGraphics() const
200 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
201 sal_Bool bRet
= sal_True
;
206 xNode
->getPropertyValue(s_sIsAllowAnimatedGraphics
) >>= bRet
;
208 catch(const css::uno::Exception
& ex
)
210 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
216 sal_Bool
SvtAccessibilityOptions_Impl::GetIsAllowAnimatedText() const
218 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
219 sal_Bool bRet
= sal_True
;
224 xNode
->getPropertyValue(s_sIsAllowAnimatedText
) >>= bRet
;
226 catch(const css::uno::Exception
& ex
)
228 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
234 sal_Bool
SvtAccessibilityOptions_Impl::GetIsAutomaticFontColor() const
236 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
237 sal_Bool bRet
= sal_False
;
242 xNode
->getPropertyValue(s_sIsAutomaticFontColor
) >>= bRet
;
244 catch(const css::uno::Exception
& ex
)
246 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
252 sal_Bool
SvtAccessibilityOptions_Impl::GetIsSystemFont() const
254 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
255 sal_Bool bRet
= sal_True
;
260 xNode
->getPropertyValue(s_sIsSystemFont
) >>= bRet
;
262 catch(const css::uno::Exception
& ex
)
264 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
270 sal_Int16
SvtAccessibilityOptions_Impl::GetHelpTipSeconds() const
272 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
278 xNode
->getPropertyValue(s_sHelpTipSeconds
) >>= nRet
;
280 catch(const css::uno::Exception
& ex
)
282 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
288 sal_Bool
SvtAccessibilityOptions_Impl::IsSelectionInReadonly() const
290 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
291 sal_Bool bRet
= sal_False
;
296 xNode
->getPropertyValue(s_sIsSelectionInReadonly
) >>= bRet
;
298 catch(const css::uno::Exception
& ex
)
300 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
306 sal_Int16
SvtAccessibilityOptions_Impl::GetEdgeBlending() const
308 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
314 xNode
->getPropertyValue(s_sEdgeBlending
) >>= nRet
;
316 catch(const css::uno::Exception
& ex
)
318 SAL_WARN("svtools", "Caught unexpected: " << ex
.Message
);
324 sal_Int16
SvtAccessibilityOptions_Impl::GetListBoxMaximumLineCount() const
326 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
332 xNode
->getPropertyValue(s_sListBoxMaximumLineCount
) >>= nRet
;
334 catch(const css::uno::Exception
& ex
)
336 SAL_WARN("svtools", "Caught unexpected: " << ex
.Message
);
342 sal_Int16
SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() const
344 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
350 xNode
->getPropertyValue(s_sColorValueSetColumnCount
) >>= nRet
;
352 catch(const css::uno::Exception
& ex
)
354 SAL_WARN("svtools", "Caught unexpected: " << ex
.Message
);
360 void SvtAccessibilityOptions_Impl::SetAutoDetectSystemHC(sal_Bool bSet
)
362 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
366 if(xNode
.is() && xNode
->getPropertyValue(s_sAutoDetectSystemHC
)!=bSet
)
368 xNode
->setPropertyValue(s_sAutoDetectSystemHC
, css::uno::makeAny(bSet
));
369 ::comphelper::ConfigurationHelper::flush(m_xCfg
);
371 bIsModified
= sal_True
;
374 catch(const css::uno::Exception
& ex
)
376 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
380 void SvtAccessibilityOptions_Impl::SetIsForPagePreviews(sal_Bool bSet
)
382 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
386 if(xNode
.is() && xNode
->getPropertyValue(s_sIsForPagePreviews
)!=bSet
)
388 xNode
->setPropertyValue(s_sIsForPagePreviews
, css::uno::makeAny(bSet
));
389 ::comphelper::ConfigurationHelper::flush(m_xCfg
);
391 bIsModified
= sal_True
;
394 catch(const css::uno::Exception
& ex
)
396 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
400 void SvtAccessibilityOptions_Impl::SetIsHelpTipsDisappear(sal_Bool bSet
)
402 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
406 if(xNode
.is() && xNode
->getPropertyValue(s_sIsHelpTipsDisappear
)!=bSet
)
408 xNode
->setPropertyValue(s_sIsHelpTipsDisappear
, css::uno::makeAny(bSet
));
409 ::comphelper::ConfigurationHelper::flush(m_xCfg
);
411 bIsModified
= sal_True
;
414 catch(const css::uno::Exception
& ex
)
416 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
420 void SvtAccessibilityOptions_Impl::SetIsAllowAnimatedGraphics(sal_Bool bSet
)
422 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
426 if(xNode
.is() && xNode
->getPropertyValue(s_sIsAllowAnimatedGraphics
)!=bSet
)
428 xNode
->setPropertyValue(s_sIsAllowAnimatedGraphics
, css::uno::makeAny(bSet
));
429 ::comphelper::ConfigurationHelper::flush(m_xCfg
);
431 bIsModified
= sal_True
;
434 catch(const css::uno::Exception
& ex
)
436 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
440 void SvtAccessibilityOptions_Impl::SetIsAllowAnimatedText(sal_Bool bSet
)
442 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
446 if(xNode
.is() && xNode
->getPropertyValue(s_sIsAllowAnimatedText
)!=bSet
)
448 xNode
->setPropertyValue(s_sIsAllowAnimatedText
, css::uno::makeAny(bSet
));
449 ::comphelper::ConfigurationHelper::flush(m_xCfg
);
451 bIsModified
= sal_True
;
454 catch(const css::uno::Exception
& ex
)
456 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
460 void SvtAccessibilityOptions_Impl::SetIsAutomaticFontColor(sal_Bool bSet
)
462 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
466 if(xNode
.is() && xNode
->getPropertyValue(s_sIsAutomaticFontColor
)!=bSet
)
468 xNode
->setPropertyValue(s_sIsAutomaticFontColor
, css::uno::makeAny(bSet
));
469 ::comphelper::ConfigurationHelper::flush(m_xCfg
);
471 bIsModified
= sal_True
;
474 catch(const css::uno::Exception
& ex
)
476 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
480 void SvtAccessibilityOptions_Impl::SetIsSystemFont(sal_Bool bSet
)
482 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
486 if(xNode
.is() && xNode
->getPropertyValue(s_sIsSystemFont
)!=bSet
)
488 xNode
->setPropertyValue(s_sIsSystemFont
, css::uno::makeAny(bSet
));
489 ::comphelper::ConfigurationHelper::flush(m_xCfg
);
491 bIsModified
= sal_True
;
494 catch(const css::uno::Exception
& ex
)
496 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
500 void SvtAccessibilityOptions_Impl::SetHelpTipSeconds(sal_Int16 nSet
)
502 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
506 if(xNode
.is() && xNode
->getPropertyValue(s_sHelpTipSeconds
)!=nSet
)
508 xNode
->setPropertyValue(s_sHelpTipSeconds
, css::uno::makeAny(nSet
));
509 ::comphelper::ConfigurationHelper::flush(m_xCfg
);
511 bIsModified
= sal_True
;
514 catch(const css::uno::Exception
& ex
)
516 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
520 void SvtAccessibilityOptions_Impl::SetSelectionInReadonly(sal_Bool bSet
)
522 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
526 if(xNode
.is() && xNode
->getPropertyValue(s_sIsSelectionInReadonly
)!=bSet
)
528 xNode
->setPropertyValue(s_sIsSelectionInReadonly
, css::uno::makeAny(bSet
));
529 ::comphelper::ConfigurationHelper::flush(m_xCfg
);
531 bIsModified
= sal_True
;
534 catch(const css::uno::Exception
& ex
)
536 SAL_WARN("svtools.config", "Caught unexpected: " << ex
.Message
);
540 void SvtAccessibilityOptions_Impl::SetVCLSettings()
542 AllSettings
aAllSettings(Application::GetSettings());
543 StyleSettings
aStyleSettings(aAllSettings
.GetStyleSettings());
544 HelpSettings
aHelpSettings(aAllSettings
.GetHelpSettings());
545 bool StyleSettingsChanged(false);
547 aHelpSettings
.SetTipTimeout( GetIsHelpTipsDisappear() ? GetHelpTipSeconds() * 1000 : HELP_TIP_TIMEOUT
);
548 aAllSettings
.SetHelpSettings(aHelpSettings
);
550 if(aStyleSettings
.GetUseSystemUIFonts() != GetIsSystemFont())
552 aStyleSettings
.SetUseSystemUIFonts(GetIsSystemFont());
553 StyleSettingsChanged
= true;
556 const sal_Int16
nEdgeBlendingCountA(GetEdgeBlending());
557 OSL_ENSURE(nEdgeBlendingCountA
>= 0, "OOps, negative values for EdgeBlending are not allowed (!)");
558 const sal_uInt16
nEdgeBlendingCountB(static_cast< sal_uInt16
>(nEdgeBlendingCountA
>= 0 ? nEdgeBlendingCountA
: 0));
560 if(aStyleSettings
.GetEdgeBlending() != nEdgeBlendingCountB
)
562 aStyleSettings
.SetEdgeBlending(nEdgeBlendingCountB
);
563 StyleSettingsChanged
= true;
566 const sal_Int16
nMaxLineCountA(GetListBoxMaximumLineCount());
567 OSL_ENSURE(nMaxLineCountA
>= 0, "OOps, negative values for ListBoxMaximumLineCount are not allowed (!)");
568 const sal_uInt16
nMaxLineCountB(static_cast< sal_uInt16
>(nMaxLineCountA
>= 0 ? nMaxLineCountA
: 0));
570 if(aStyleSettings
.GetListBoxMaximumLineCount() != nMaxLineCountB
)
572 aStyleSettings
.SetListBoxMaximumLineCount(nMaxLineCountB
);
573 StyleSettingsChanged
= true;
576 const sal_Int16
nMaxColumnCountA(GetColorValueSetColumnCount());
577 OSL_ENSURE(nMaxColumnCountA
>= 0, "OOps, negative values for ColorValueSetColumnCount are not allowed (!)");
578 const sal_uInt16
nMaxColumnCountB(static_cast< sal_uInt16
>(nMaxColumnCountA
>= 0 ? nMaxColumnCountA
: 0));
580 if(aStyleSettings
.GetColorValueSetColumnCount() != nMaxColumnCountB
)
582 aStyleSettings
.SetColorValueSetColumnCount(nMaxColumnCountB
);
583 StyleSettingsChanged
= true;
586 if(StyleSettingsChanged
)
588 aAllSettings
.SetStyleSettings(aStyleSettings
);
589 Application::MergeSystemSettings(aAllSettings
);
592 Application::SetSettings(aAllSettings
);
595 void SvtAccessibilityOptions_Impl::SetEdgeBlending(sal_Int16 nSet
)
597 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
601 if(xNode
.is() && xNode
->getPropertyValue(s_sEdgeBlending
)!=nSet
)
603 xNode
->setPropertyValue(s_sEdgeBlending
, css::uno::makeAny(nSet
));
604 ::comphelper::ConfigurationHelper::flush(m_xCfg
);
606 bIsModified
= sal_True
;
609 catch(const css::uno::Exception
& ex
)
611 SAL_WARN("svtools", "Caught unexpected: " << ex
.Message
);
615 void SvtAccessibilityOptions_Impl::SetListBoxMaximumLineCount(sal_Int16 nSet
)
617 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
621 if(xNode
.is() && xNode
->getPropertyValue(s_sListBoxMaximumLineCount
)!=nSet
)
623 xNode
->setPropertyValue(s_sListBoxMaximumLineCount
, css::uno::makeAny(nSet
));
624 ::comphelper::ConfigurationHelper::flush(m_xCfg
);
626 bIsModified
= sal_True
;
629 catch(const css::uno::Exception
& ex
)
631 SAL_WARN("svtools", "Caught unexpected: " << ex
.Message
);
635 void SvtAccessibilityOptions_Impl::SetColorValueSetColumnCount(sal_Int16 nSet
)
637 css::uno::Reference
< css::beans::XPropertySet
> xNode(m_xCfg
, css::uno::UNO_QUERY
);
641 if(xNode
.is() && xNode
->getPropertyValue(s_sColorValueSetColumnCount
)!=nSet
)
643 xNode
->setPropertyValue(s_sColorValueSetColumnCount
, css::uno::makeAny(nSet
));
644 ::comphelper::ConfigurationHelper::flush(m_xCfg
);
646 bIsModified
= sal_True
;
649 catch(const css::uno::Exception
& ex
)
651 SAL_WARN("svtools", "Caught unexpected: " << ex
.Message
);
655 // -----------------------------------------------------------------------
656 // class SvtAccessibilityOptions --------------------------------------------------
658 SvtAccessibilityOptions::SvtAccessibilityOptions()
661 ::osl::MutexGuard
aGuard( SingletonMutex::get() );
662 if(!sm_pSingleImplConfig
)
664 sm_pSingleImplConfig
= new SvtAccessibilityOptions_Impl
;
665 svtools::ItemHolder2::holdConfigItem(E_ACCESSIBILITYOPTIONS
);
667 ++sm_nAccessibilityRefCount
;
669 //StartListening( *sm_pSingleImplConfig, sal_True );
672 // -----------------------------------------------------------------------
674 SvtAccessibilityOptions::~SvtAccessibilityOptions()
676 //EndListening( *sm_pSingleImplConfig, sal_True );
677 ::osl::MutexGuard
aGuard( SingletonMutex::get() );
678 if( !--sm_nAccessibilityRefCount
)
680 //if( sm_pSingleImplConfig->IsModified() )
681 // sm_pSingleImplConfig->Commit();
682 DELETEZ( sm_pSingleImplConfig
);
686 // -----------------------------------------------------------------------
688 void SvtAccessibilityOptions::Notify( SfxBroadcaster
&, const SfxHint
& rHint
)
691 if ( rHint
.IsA(TYPE(SfxSimpleHint
)) )
693 if ( ((SfxSimpleHint
&)rHint
).GetId() == SFX_HINT_ACCESSIBILITY_CHANGED
)
698 // -----------------------------------------------------------------------
700 sal_Bool
SvtAccessibilityOptions::IsModified() const
702 return sm_pSingleImplConfig
->IsModified();
704 void SvtAccessibilityOptions::Commit()
706 //sm_pSingleImplConfig->Commit();
709 // -----------------------------------------------------------------------
711 sal_Bool
SvtAccessibilityOptions::GetAutoDetectSystemHC() const
713 return sm_pSingleImplConfig
->GetAutoDetectSystemHC();
715 sal_Bool
SvtAccessibilityOptions::GetIsForPagePreviews() const
717 return sm_pSingleImplConfig
->GetIsForPagePreviews();
719 sal_Bool
SvtAccessibilityOptions::GetIsHelpTipsDisappear() const
721 return sm_pSingleImplConfig
->GetIsHelpTipsDisappear();
723 sal_Bool
SvtAccessibilityOptions::GetIsAllowAnimatedGraphics() const
725 return sm_pSingleImplConfig
->GetIsAllowAnimatedGraphics();
727 sal_Bool
SvtAccessibilityOptions::GetIsAllowAnimatedText() const
729 return sm_pSingleImplConfig
->GetIsAllowAnimatedText();
731 sal_Bool
SvtAccessibilityOptions::GetIsAutomaticFontColor() const
733 return sm_pSingleImplConfig
->GetIsAutomaticFontColor();
735 sal_Bool
SvtAccessibilityOptions::GetIsSystemFont() const
737 return sm_pSingleImplConfig
->GetIsSystemFont();
739 sal_Int16
SvtAccessibilityOptions::GetHelpTipSeconds() const
741 return sm_pSingleImplConfig
->GetHelpTipSeconds();
743 sal_Bool
SvtAccessibilityOptions::IsSelectionInReadonly() const
745 return sm_pSingleImplConfig
->IsSelectionInReadonly();
747 sal_Int16
SvtAccessibilityOptions::GetEdgeBlending() const
749 return sm_pSingleImplConfig
->GetEdgeBlending();
751 sal_Int16
SvtAccessibilityOptions::GetListBoxMaximumLineCount() const
753 return sm_pSingleImplConfig
->GetListBoxMaximumLineCount();
755 sal_Int16
SvtAccessibilityOptions::GetColorValueSetColumnCount() const
757 return sm_pSingleImplConfig
->GetColorValueSetColumnCount();
760 // -----------------------------------------------------------------------
761 void SvtAccessibilityOptions::SetAutoDetectSystemHC(sal_Bool bSet
)
763 sm_pSingleImplConfig
->SetAutoDetectSystemHC(bSet
);
765 void SvtAccessibilityOptions::SetIsForPagePreviews(sal_Bool bSet
)
767 sm_pSingleImplConfig
->SetIsForPagePreviews(bSet
);
769 void SvtAccessibilityOptions::SetIsHelpTipsDisappear(sal_Bool bSet
)
771 sm_pSingleImplConfig
->SetIsHelpTipsDisappear(bSet
);
773 void SvtAccessibilityOptions::SetIsAllowAnimatedGraphics(sal_Bool bSet
)
775 sm_pSingleImplConfig
->SetIsAllowAnimatedGraphics(bSet
);
777 void SvtAccessibilityOptions::SetIsAllowAnimatedText(sal_Bool bSet
)
779 sm_pSingleImplConfig
->SetIsAllowAnimatedText(bSet
);
781 void SvtAccessibilityOptions::SetIsAutomaticFontColor(sal_Bool bSet
)
783 sm_pSingleImplConfig
->SetIsAutomaticFontColor(bSet
);
785 void SvtAccessibilityOptions::SetIsSystemFont(sal_Bool bSet
)
787 sm_pSingleImplConfig
->SetIsSystemFont(bSet
);
789 void SvtAccessibilityOptions::SetHelpTipSeconds(sal_Int16 nSet
)
791 sm_pSingleImplConfig
->SetHelpTipSeconds(nSet
);
793 void SvtAccessibilityOptions::SetSelectionInReadonly(sal_Bool bSet
)
795 sm_pSingleImplConfig
->SetSelectionInReadonly(bSet
);
797 void SvtAccessibilityOptions::SetVCLSettings()
799 sm_pSingleImplConfig
->SetVCLSettings();
801 void SvtAccessibilityOptions::SetEdgeBlending(sal_Int16 nSet
)
803 sm_pSingleImplConfig
->SetEdgeBlending(nSet
);
805 void SvtAccessibilityOptions::SetListBoxMaximumLineCount(sal_Int16 nSet
)
807 sm_pSingleImplConfig
->SetListBoxMaximumLineCount(nSet
);
809 void SvtAccessibilityOptions::SetColorValueSetColumnCount(sal_Int16 nSet
)
811 sm_pSingleImplConfig
->SetColorValueSetColumnCount(nSet
);
814 // -----------------------------------------------------------------------
816 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */