xref: /trunk/main/svtools/source/config/accessibilityoptions.cxx (revision ca6f8f21e03a1e9ac62b338511a842c56acedb29)
15900e8ecSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
35900e8ecSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
45900e8ecSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
55900e8ecSAndrew Rist  * distributed with this work for additional information
65900e8ecSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
75900e8ecSAndrew Rist  * to you under the Apache License, Version 2.0 (the
85900e8ecSAndrew Rist  * "License"); you may not use this file except in compliance
95900e8ecSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
115900e8ecSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
135900e8ecSAndrew Rist  * Unless required by applicable law or agreed to in writing,
145900e8ecSAndrew Rist  * software distributed under the License is distributed on an
155900e8ecSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
165900e8ecSAndrew Rist  * KIND, either express or implied.  See the License for the
175900e8ecSAndrew Rist  * specific language governing permissions and limitations
185900e8ecSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
205900e8ecSAndrew Rist  *************************************************************/
215900e8ecSAndrew Rist 
225900e8ecSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_svtools.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <svtools/accessibilityoptions.hxx>
28cdf0e10cSrcweir #include "configitems/accessibilityoptions_const.hxx"
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #include <unotools/configmgr.hxx>
31cdf0e10cSrcweir #include <tools/debug.hxx>
32cdf0e10cSrcweir #include <com/sun/star/uno/Any.hxx>
33cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx>
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
36cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
37cdf0e10cSrcweir #endif
38cdf0e10cSrcweir #ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
39cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp>
40cdf0e10cSrcweir #endif
41cdf0e10cSrcweir #ifndef _COMPHELPER_CONFIGURATIONHELPER_HXX_
42cdf0e10cSrcweir #include <comphelper/configurationhelper.hxx>
43cdf0e10cSrcweir #endif
44cdf0e10cSrcweir #ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
45cdf0e10cSrcweir #include <unotools/processfactory.hxx>
46cdf0e10cSrcweir #endif
47cdf0e10cSrcweir #ifndef _SVT_LOGHELPER_HXX_
48cdf0e10cSrcweir #include <unotools/loghelper.hxx>
49cdf0e10cSrcweir #endif
50cdf0e10cSrcweir 
51cdf0e10cSrcweir #include <svl/smplhint.hxx>
52cdf0e10cSrcweir 
53cdf0e10cSrcweir #include <vcl/settings.hxx>
54cdf0e10cSrcweir #include <vcl/svapp.hxx>
55cdf0e10cSrcweir #include <rtl/instance.hxx>
56cdf0e10cSrcweir 
57cdf0e10cSrcweir #include <itemholder2.hxx>
58cdf0e10cSrcweir 
59cdf0e10cSrcweir using namespace utl;
60cdf0e10cSrcweir using namespace rtl;
61cdf0e10cSrcweir using namespace com::sun::star::uno;
62cdf0e10cSrcweir namespace css = com::sun::star;
63cdf0e10cSrcweir 
64cdf0e10cSrcweir #define HELP_TIP_TIMEOUT 0xffff     // max. timeout setting to pretend a non-timeout
65cdf0e10cSrcweir 
66cdf0e10cSrcweir 
67cdf0e10cSrcweir // class SvtAccessibilityOptions_Impl ---------------------------------------------
68cdf0e10cSrcweir 
69cdf0e10cSrcweir class SvtAccessibilityOptions_Impl
70cdf0e10cSrcweir {
71cdf0e10cSrcweir private:
72cdf0e10cSrcweir     css::uno::Reference< css::container::XNameAccess > m_xCfg;
73cdf0e10cSrcweir     sal_Bool                                           bIsModified;
74cdf0e10cSrcweir 
75cdf0e10cSrcweir public:
76cdf0e10cSrcweir     SvtAccessibilityOptions_Impl();
77cdf0e10cSrcweir     ~SvtAccessibilityOptions_Impl();
78cdf0e10cSrcweir 
79cdf0e10cSrcweir     void        SetVCLSettings();
80cdf0e10cSrcweir     sal_Bool    GetAutoDetectSystemHC();
81cdf0e10cSrcweir     sal_Bool    GetIsForPagePreviews() const;
82cdf0e10cSrcweir     sal_Bool    GetIsHelpTipsDisappear() const;
83cdf0e10cSrcweir     sal_Bool    GetIsAllowAnimatedGraphics() const;
84cdf0e10cSrcweir     sal_Bool    GetIsAllowAnimatedText() const;
85cdf0e10cSrcweir     sal_Bool    GetIsAutomaticFontColor() const;
86cdf0e10cSrcweir     sal_Bool    GetIsSystemFont() const;
87cdf0e10cSrcweir     sal_Int16   GetHelpTipSeconds() const;
88cdf0e10cSrcweir     sal_Bool    IsSelectionInReadonly() const;
89*ca6f8f21SArmin Le Grand     sal_Int16   GetColorValueSetMaximumRowCount() const;
90*ca6f8f21SArmin Le Grand     sal_Int16   GetColorValueSetEntryEdgeLength() const;
91*ca6f8f21SArmin Le Grand     sal_Int16   GetColorValueSetColumnCount() const;
92*ca6f8f21SArmin Le Grand     sal_Int16   GetEdgeBlending() const;
93cdf0e10cSrcweir 
94cdf0e10cSrcweir     void        SetAutoDetectSystemHC(sal_Bool bSet);
95cdf0e10cSrcweir     void        SetIsForPagePreviews(sal_Bool bSet);
96cdf0e10cSrcweir     void        SetIsHelpTipsDisappear(sal_Bool bSet);
97cdf0e10cSrcweir     void        SetIsAllowAnimatedGraphics(sal_Bool bSet);
98cdf0e10cSrcweir     void        SetIsAllowAnimatedText(sal_Bool bSet);
99cdf0e10cSrcweir     void        SetIsAutomaticFontColor(sal_Bool bSet);
100cdf0e10cSrcweir     void        SetIsSystemFont(sal_Bool bSet);
101cdf0e10cSrcweir     void        SetHelpTipSeconds(sal_Int16 nSet);
102cdf0e10cSrcweir     void        SetSelectionInReadonly(sal_Bool bSet);
103*ca6f8f21SArmin Le Grand     void        SetColorValueSetMaximumRowCount(sal_Int16 nSet);
104*ca6f8f21SArmin Le Grand     void        SetColorValueSetEntryEdgeLength(sal_Int16 nSet);
105*ca6f8f21SArmin Le Grand     void        SetColorValueSetColumnCount(sal_Int16 nSet);
106*ca6f8f21SArmin Le Grand     void        SetEdgeBlending(sal_Int16 nSet);
107cdf0e10cSrcweir 
108cdf0e10cSrcweir     sal_Bool    IsModified() const { return bIsModified; };
109cdf0e10cSrcweir };
110cdf0e10cSrcweir 
111cdf0e10cSrcweir // initialization of static members --------------------------------------
112cdf0e10cSrcweir 
113cdf0e10cSrcweir SvtAccessibilityOptions_Impl* volatile  SvtAccessibilityOptions::sm_pSingleImplConfig =NULL;
114cdf0e10cSrcweir sal_Int32                     volatile  SvtAccessibilityOptions::sm_nAccessibilityRefCount(0);
115cdf0e10cSrcweir 
116cdf0e10cSrcweir namespace
117cdf0e10cSrcweir {
118cdf0e10cSrcweir     struct SingletonMutex
119cdf0e10cSrcweir         : public rtl::Static< ::osl::Mutex, SingletonMutex > {};
120cdf0e10cSrcweir }
121cdf0e10cSrcweir 
122cdf0e10cSrcweir // -----------------------------------------------------------------------
123cdf0e10cSrcweir // class SvtAccessibilityOptions_Impl ---------------------------------------------
124cdf0e10cSrcweir 
125cdf0e10cSrcweir SvtAccessibilityOptions_Impl::SvtAccessibilityOptions_Impl()
126cdf0e10cSrcweir {
127cdf0e10cSrcweir     try
128cdf0e10cSrcweir     {
129cdf0e10cSrcweir         m_xCfg = css::uno::Reference< css::container::XNameAccess >(
130cdf0e10cSrcweir             ::comphelper::ConfigurationHelper::openConfig(
131cdf0e10cSrcweir             utl::getProcessServiceFactory(),
132cdf0e10cSrcweir             s_sAccessibility,
133cdf0e10cSrcweir             ::comphelper::ConfigurationHelper::E_STANDARD),
134cdf0e10cSrcweir             css::uno::UNO_QUERY);
135cdf0e10cSrcweir 
136cdf0e10cSrcweir         bIsModified = sal_False;
137cdf0e10cSrcweir     }
138cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
139cdf0e10cSrcweir     {
140cdf0e10cSrcweir         m_xCfg.clear();
141cdf0e10cSrcweir         LogHelper::logIt(ex);
142cdf0e10cSrcweir     }
143cdf0e10cSrcweir }
144cdf0e10cSrcweir 
145cdf0e10cSrcweir SvtAccessibilityOptions_Impl::~SvtAccessibilityOptions_Impl()
146cdf0e10cSrcweir {
147cdf0e10cSrcweir }
148cdf0e10cSrcweir 
149cdf0e10cSrcweir // -----------------------------------------------------------------------
150cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetAutoDetectSystemHC()
151cdf0e10cSrcweir {
152cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
153cdf0e10cSrcweir     sal_Bool                                        bRet = sal_True;
154cdf0e10cSrcweir 
155cdf0e10cSrcweir     try
156cdf0e10cSrcweir     {
157cdf0e10cSrcweir         if(xNode.is())
158cdf0e10cSrcweir             xNode->getPropertyValue(s_sAutoDetectSystemHC) >>= bRet;
159cdf0e10cSrcweir     }
160cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
161cdf0e10cSrcweir     {
162cdf0e10cSrcweir         LogHelper::logIt(ex);
163cdf0e10cSrcweir     }
164cdf0e10cSrcweir 
165cdf0e10cSrcweir     return bRet;
166cdf0e10cSrcweir }
167cdf0e10cSrcweir 
168cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetIsForPagePreviews() const
169cdf0e10cSrcweir {
170cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
171cdf0e10cSrcweir     sal_Bool                                        bRet = sal_True;
172cdf0e10cSrcweir 
173cdf0e10cSrcweir     try
174cdf0e10cSrcweir     {
175cdf0e10cSrcweir         if(xNode.is())
176cdf0e10cSrcweir             xNode->getPropertyValue(s_sIsForPagePreviews) >>= bRet;
177cdf0e10cSrcweir     }
178cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
179cdf0e10cSrcweir     {
180cdf0e10cSrcweir         LogHelper::logIt(ex);
181cdf0e10cSrcweir     }
182cdf0e10cSrcweir     return bRet;
183cdf0e10cSrcweir }
184cdf0e10cSrcweir 
185cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetIsHelpTipsDisappear() const
186cdf0e10cSrcweir {
187cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
188cdf0e10cSrcweir     sal_Bool                                        bRet = sal_True;
189cdf0e10cSrcweir 
190cdf0e10cSrcweir     try
191cdf0e10cSrcweir     {
192cdf0e10cSrcweir         if(xNode.is())
193cdf0e10cSrcweir             xNode->getPropertyValue(s_sIsHelpTipsDisappear) >>= bRet;
194cdf0e10cSrcweir     }
195cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
196cdf0e10cSrcweir     {
197cdf0e10cSrcweir         LogHelper::logIt(ex);
198cdf0e10cSrcweir     }
199cdf0e10cSrcweir 
200cdf0e10cSrcweir     return bRet;
201cdf0e10cSrcweir }
202cdf0e10cSrcweir 
203cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedGraphics() const
204cdf0e10cSrcweir {
205cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
206cdf0e10cSrcweir     sal_Bool                                        bRet = sal_True;
207cdf0e10cSrcweir 
208cdf0e10cSrcweir     try
209cdf0e10cSrcweir     {
210cdf0e10cSrcweir         if(xNode.is())
211cdf0e10cSrcweir             xNode->getPropertyValue(s_sIsAllowAnimatedGraphics) >>= bRet;
212cdf0e10cSrcweir     }
213cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
214cdf0e10cSrcweir     {
215cdf0e10cSrcweir         LogHelper::logIt(ex);
216cdf0e10cSrcweir     }
217cdf0e10cSrcweir 
218cdf0e10cSrcweir     return bRet;
219cdf0e10cSrcweir }
220cdf0e10cSrcweir 
221cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedText() const
222cdf0e10cSrcweir {
223cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
224cdf0e10cSrcweir     sal_Bool                                        bRet = sal_True;
225cdf0e10cSrcweir 
226cdf0e10cSrcweir     try
227cdf0e10cSrcweir     {
228cdf0e10cSrcweir         if(xNode.is())
229cdf0e10cSrcweir             xNode->getPropertyValue(s_sIsAllowAnimatedText) >>= bRet;
230cdf0e10cSrcweir     }
231cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
232cdf0e10cSrcweir     {
233cdf0e10cSrcweir         LogHelper::logIt(ex);
234cdf0e10cSrcweir     }
235cdf0e10cSrcweir 
236cdf0e10cSrcweir     return bRet;
237cdf0e10cSrcweir }
238cdf0e10cSrcweir 
239cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetIsAutomaticFontColor() const
240cdf0e10cSrcweir {
241cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
242cdf0e10cSrcweir     sal_Bool                                        bRet = sal_False;
243cdf0e10cSrcweir 
244cdf0e10cSrcweir     try
245cdf0e10cSrcweir     {
246cdf0e10cSrcweir         if(xNode.is())
247cdf0e10cSrcweir             xNode->getPropertyValue(s_sIsAutomaticFontColor) >>= bRet;
248cdf0e10cSrcweir     }
249cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
250cdf0e10cSrcweir     {
251cdf0e10cSrcweir         LogHelper::logIt(ex);
252cdf0e10cSrcweir     }
253cdf0e10cSrcweir 
254cdf0e10cSrcweir     return bRet;
255cdf0e10cSrcweir }
256cdf0e10cSrcweir 
257cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetIsSystemFont() const
258cdf0e10cSrcweir {
259cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
260cdf0e10cSrcweir     sal_Bool                                        bRet = sal_True;
261cdf0e10cSrcweir 
262cdf0e10cSrcweir     try
263cdf0e10cSrcweir     {
264cdf0e10cSrcweir         if(xNode.is())
265cdf0e10cSrcweir             xNode->getPropertyValue(s_sIsSystemFont) >>= bRet;
266cdf0e10cSrcweir     }
267cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
268cdf0e10cSrcweir     {
269cdf0e10cSrcweir         LogHelper::logIt(ex);
270cdf0e10cSrcweir     }
271cdf0e10cSrcweir 
272cdf0e10cSrcweir     return bRet;
273cdf0e10cSrcweir }
274cdf0e10cSrcweir 
275cdf0e10cSrcweir sal_Int16 SvtAccessibilityOptions_Impl::GetHelpTipSeconds() const
276cdf0e10cSrcweir {
277cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
278cdf0e10cSrcweir     sal_Int16                                       nRet = 4;
279cdf0e10cSrcweir 
280cdf0e10cSrcweir     try
281cdf0e10cSrcweir     {
282cdf0e10cSrcweir         if(xNode.is())
283cdf0e10cSrcweir             xNode->getPropertyValue(s_sHelpTipSeconds) >>= nRet;
284cdf0e10cSrcweir     }
285cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
286cdf0e10cSrcweir     {
287cdf0e10cSrcweir         LogHelper::logIt(ex);
288cdf0e10cSrcweir     }
289cdf0e10cSrcweir 
290cdf0e10cSrcweir     return nRet;
291cdf0e10cSrcweir }
292cdf0e10cSrcweir 
293cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::IsSelectionInReadonly() const
294cdf0e10cSrcweir {
295cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
296cdf0e10cSrcweir     sal_Bool                                        bRet = sal_False;
297cdf0e10cSrcweir 
298cdf0e10cSrcweir     try
299cdf0e10cSrcweir     {
300cdf0e10cSrcweir         if(xNode.is())
301cdf0e10cSrcweir             xNode->getPropertyValue(s_sIsSelectionInReadonly) >>= bRet;
302cdf0e10cSrcweir     }
303cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
304cdf0e10cSrcweir     {
305cdf0e10cSrcweir         LogHelper::logIt(ex);
306cdf0e10cSrcweir     }
307cdf0e10cSrcweir 
308cdf0e10cSrcweir     return bRet;
309cdf0e10cSrcweir }
310cdf0e10cSrcweir 
311*ca6f8f21SArmin Le Grand sal_Int16 SvtAccessibilityOptions_Impl::GetColorValueSetMaximumRowCount() const
312*ca6f8f21SArmin Le Grand {
313*ca6f8f21SArmin Le Grand     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
314*ca6f8f21SArmin Le Grand     sal_Int16 nRet = 40;
315*ca6f8f21SArmin Le Grand 
316*ca6f8f21SArmin Le Grand     try
317*ca6f8f21SArmin Le Grand     {
318*ca6f8f21SArmin Le Grand         if(xNode.is())
319*ca6f8f21SArmin Le Grand             xNode->getPropertyValue(s_sColorValueSetMaximumRowCount) >>= nRet;
320*ca6f8f21SArmin Le Grand     }
321*ca6f8f21SArmin Le Grand     catch(const css::uno::Exception& ex)
322*ca6f8f21SArmin Le Grand     {
323*ca6f8f21SArmin Le Grand         LogHelper::logIt(ex);
324*ca6f8f21SArmin Le Grand     }
325*ca6f8f21SArmin Le Grand 
326*ca6f8f21SArmin Le Grand     return nRet;
327*ca6f8f21SArmin Le Grand }
328*ca6f8f21SArmin Le Grand 
329*ca6f8f21SArmin Le Grand sal_Int16 SvtAccessibilityOptions_Impl::GetColorValueSetEntryEdgeLength() const
330*ca6f8f21SArmin Le Grand {
331*ca6f8f21SArmin Le Grand     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
332*ca6f8f21SArmin Le Grand     sal_Int16 nRet = 14;
333*ca6f8f21SArmin Le Grand 
334*ca6f8f21SArmin Le Grand     try
335*ca6f8f21SArmin Le Grand     {
336*ca6f8f21SArmin Le Grand         if(xNode.is())
337*ca6f8f21SArmin Le Grand             xNode->getPropertyValue(s_sColorValueSetEntryEdgeLength) >>= nRet;
338*ca6f8f21SArmin Le Grand     }
339*ca6f8f21SArmin Le Grand     catch(const css::uno::Exception& ex)
340*ca6f8f21SArmin Le Grand     {
341*ca6f8f21SArmin Le Grand         LogHelper::logIt(ex);
342*ca6f8f21SArmin Le Grand     }
343*ca6f8f21SArmin Le Grand 
344*ca6f8f21SArmin Le Grand     return nRet;
345*ca6f8f21SArmin Le Grand }
346*ca6f8f21SArmin Le Grand 
347*ca6f8f21SArmin Le Grand sal_Int16 SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() const
348*ca6f8f21SArmin Le Grand {
349*ca6f8f21SArmin Le Grand     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
350*ca6f8f21SArmin Le Grand     sal_Int16 nRet = 12;
351*ca6f8f21SArmin Le Grand 
352*ca6f8f21SArmin Le Grand     try
353*ca6f8f21SArmin Le Grand     {
354*ca6f8f21SArmin Le Grand         if(xNode.is())
355*ca6f8f21SArmin Le Grand             xNode->getPropertyValue(s_sColorValueSetColumnCount) >>= nRet;
356*ca6f8f21SArmin Le Grand     }
357*ca6f8f21SArmin Le Grand     catch(const css::uno::Exception& ex)
358*ca6f8f21SArmin Le Grand     {
359*ca6f8f21SArmin Le Grand         LogHelper::logIt(ex);
360*ca6f8f21SArmin Le Grand     }
361*ca6f8f21SArmin Le Grand 
362*ca6f8f21SArmin Le Grand     return nRet;
363*ca6f8f21SArmin Le Grand }
364*ca6f8f21SArmin Le Grand 
365*ca6f8f21SArmin Le Grand sal_Int16 SvtAccessibilityOptions_Impl::GetEdgeBlending() const
366*ca6f8f21SArmin Le Grand {
367*ca6f8f21SArmin Le Grand     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
368*ca6f8f21SArmin Le Grand     sal_Int16 nRet = 35;
369*ca6f8f21SArmin Le Grand 
370*ca6f8f21SArmin Le Grand     try
371*ca6f8f21SArmin Le Grand     {
372*ca6f8f21SArmin Le Grand         if(xNode.is())
373*ca6f8f21SArmin Le Grand             xNode->getPropertyValue(s_sEdgeBlending) >>= nRet;
374*ca6f8f21SArmin Le Grand     }
375*ca6f8f21SArmin Le Grand     catch(const css::uno::Exception& ex)
376*ca6f8f21SArmin Le Grand     {
377*ca6f8f21SArmin Le Grand         LogHelper::logIt(ex);
378*ca6f8f21SArmin Le Grand     }
379*ca6f8f21SArmin Le Grand 
380*ca6f8f21SArmin Le Grand     return nRet;
381*ca6f8f21SArmin Le Grand }
382*ca6f8f21SArmin Le Grand 
383cdf0e10cSrcweir void SvtAccessibilityOptions_Impl::SetAutoDetectSystemHC(sal_Bool bSet)
384cdf0e10cSrcweir {
385cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
386cdf0e10cSrcweir 
387cdf0e10cSrcweir     try
388cdf0e10cSrcweir     {
389cdf0e10cSrcweir         if(xNode.is() && xNode->getPropertyValue(s_sAutoDetectSystemHC)!=bSet)
390cdf0e10cSrcweir         {
391cdf0e10cSrcweir             xNode->setPropertyValue(s_sAutoDetectSystemHC, css::uno::makeAny(bSet));
392cdf0e10cSrcweir             ::comphelper::ConfigurationHelper::flush(m_xCfg);
393cdf0e10cSrcweir 
394cdf0e10cSrcweir             bIsModified = sal_True;
395cdf0e10cSrcweir         }
396cdf0e10cSrcweir     }
397cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
398cdf0e10cSrcweir     {
399cdf0e10cSrcweir         LogHelper::logIt(ex);
400cdf0e10cSrcweir     }
401cdf0e10cSrcweir }
402cdf0e10cSrcweir 
403cdf0e10cSrcweir void SvtAccessibilityOptions_Impl::SetIsForPagePreviews(sal_Bool bSet)
404cdf0e10cSrcweir {
405cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
406cdf0e10cSrcweir 
407cdf0e10cSrcweir     try
408cdf0e10cSrcweir     {
409cdf0e10cSrcweir         if(xNode.is() && xNode->getPropertyValue(s_sIsForPagePreviews)!=bSet)
410cdf0e10cSrcweir         {
411cdf0e10cSrcweir             xNode->setPropertyValue(s_sIsForPagePreviews, css::uno::makeAny(bSet));
412cdf0e10cSrcweir             ::comphelper::ConfigurationHelper::flush(m_xCfg);
413cdf0e10cSrcweir 
414cdf0e10cSrcweir             bIsModified = sal_True;
415cdf0e10cSrcweir         }
416cdf0e10cSrcweir     }
417cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
418cdf0e10cSrcweir     {
419cdf0e10cSrcweir         LogHelper::logIt(ex);
420cdf0e10cSrcweir     }
421cdf0e10cSrcweir }
422cdf0e10cSrcweir 
423cdf0e10cSrcweir void SvtAccessibilityOptions_Impl::SetIsHelpTipsDisappear(sal_Bool bSet)
424cdf0e10cSrcweir {
425cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
426cdf0e10cSrcweir 
427cdf0e10cSrcweir     try
428cdf0e10cSrcweir     {
429cdf0e10cSrcweir         if(xNode.is() && xNode->getPropertyValue(s_sIsHelpTipsDisappear)!=bSet)
430cdf0e10cSrcweir         {
431cdf0e10cSrcweir             xNode->setPropertyValue(s_sIsHelpTipsDisappear, css::uno::makeAny(bSet));
432cdf0e10cSrcweir             ::comphelper::ConfigurationHelper::flush(m_xCfg);
433cdf0e10cSrcweir 
434cdf0e10cSrcweir             bIsModified = sal_True;
435cdf0e10cSrcweir         }
436cdf0e10cSrcweir     }
437cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
438cdf0e10cSrcweir     {
439cdf0e10cSrcweir         LogHelper::logIt(ex);
440cdf0e10cSrcweir     }
441cdf0e10cSrcweir }
442cdf0e10cSrcweir 
443cdf0e10cSrcweir void SvtAccessibilityOptions_Impl::SetIsAllowAnimatedGraphics(sal_Bool bSet)
444cdf0e10cSrcweir {
445cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
446cdf0e10cSrcweir 
447cdf0e10cSrcweir     try
448cdf0e10cSrcweir     {
449cdf0e10cSrcweir         if(xNode.is() && xNode->getPropertyValue(s_sIsAllowAnimatedGraphics)!=bSet)
450cdf0e10cSrcweir         {
451cdf0e10cSrcweir             xNode->setPropertyValue(s_sIsAllowAnimatedGraphics, css::uno::makeAny(bSet));
452cdf0e10cSrcweir             ::comphelper::ConfigurationHelper::flush(m_xCfg);
453cdf0e10cSrcweir 
454cdf0e10cSrcweir             bIsModified = sal_True;
455cdf0e10cSrcweir         }
456cdf0e10cSrcweir     }
457cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
458cdf0e10cSrcweir     {
459cdf0e10cSrcweir         LogHelper::logIt(ex);
460cdf0e10cSrcweir     }
461cdf0e10cSrcweir }
462cdf0e10cSrcweir 
463cdf0e10cSrcweir void SvtAccessibilityOptions_Impl::SetIsAllowAnimatedText(sal_Bool bSet)
464cdf0e10cSrcweir {
465cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
466cdf0e10cSrcweir 
467cdf0e10cSrcweir     try
468cdf0e10cSrcweir     {
469cdf0e10cSrcweir         if(xNode.is() && xNode->getPropertyValue(s_sIsAllowAnimatedText)!=bSet)
470cdf0e10cSrcweir         {
471cdf0e10cSrcweir             xNode->setPropertyValue(s_sIsAllowAnimatedText, css::uno::makeAny(bSet));
472cdf0e10cSrcweir             ::comphelper::ConfigurationHelper::flush(m_xCfg);
473cdf0e10cSrcweir 
474cdf0e10cSrcweir             bIsModified = sal_True;
475cdf0e10cSrcweir         }
476cdf0e10cSrcweir     }
477cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
478cdf0e10cSrcweir     {
479cdf0e10cSrcweir         LogHelper::logIt(ex);
480cdf0e10cSrcweir     }
481cdf0e10cSrcweir }
482cdf0e10cSrcweir 
483cdf0e10cSrcweir void SvtAccessibilityOptions_Impl::SetIsAutomaticFontColor(sal_Bool bSet)
484cdf0e10cSrcweir {
485cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
486cdf0e10cSrcweir 
487cdf0e10cSrcweir     try
488cdf0e10cSrcweir     {
489cdf0e10cSrcweir         if(xNode.is() && xNode->getPropertyValue(s_sIsAutomaticFontColor)!=bSet)
490cdf0e10cSrcweir         {
491cdf0e10cSrcweir             xNode->setPropertyValue(s_sIsAutomaticFontColor, css::uno::makeAny(bSet));
492cdf0e10cSrcweir             ::comphelper::ConfigurationHelper::flush(m_xCfg);
493cdf0e10cSrcweir 
494cdf0e10cSrcweir             bIsModified = sal_True;
495cdf0e10cSrcweir         }
496cdf0e10cSrcweir     }
497cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
498cdf0e10cSrcweir     {
499cdf0e10cSrcweir         LogHelper::logIt(ex);
500cdf0e10cSrcweir     }
501cdf0e10cSrcweir }
502cdf0e10cSrcweir 
503cdf0e10cSrcweir void SvtAccessibilityOptions_Impl::SetIsSystemFont(sal_Bool bSet)
504cdf0e10cSrcweir {
505cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
506cdf0e10cSrcweir 
507cdf0e10cSrcweir     try
508cdf0e10cSrcweir     {
509cdf0e10cSrcweir         if(xNode.is() && xNode->getPropertyValue(s_sIsSystemFont)!=bSet)
510cdf0e10cSrcweir         {
511cdf0e10cSrcweir             xNode->setPropertyValue(s_sIsSystemFont, css::uno::makeAny(bSet));
512cdf0e10cSrcweir             ::comphelper::ConfigurationHelper::flush(m_xCfg);
513cdf0e10cSrcweir 
514cdf0e10cSrcweir             bIsModified = sal_True;
515cdf0e10cSrcweir         }
516cdf0e10cSrcweir     }
517cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
518cdf0e10cSrcweir     {
519cdf0e10cSrcweir         LogHelper::logIt(ex);
520cdf0e10cSrcweir     }
521cdf0e10cSrcweir }
522cdf0e10cSrcweir 
523cdf0e10cSrcweir void SvtAccessibilityOptions_Impl::SetHelpTipSeconds(sal_Int16 nSet)
524cdf0e10cSrcweir {
525cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
526cdf0e10cSrcweir 
527cdf0e10cSrcweir     try
528cdf0e10cSrcweir     {
529cdf0e10cSrcweir         if(xNode.is() && xNode->getPropertyValue(s_sHelpTipSeconds)!=nSet)
530cdf0e10cSrcweir         {
531cdf0e10cSrcweir             xNode->setPropertyValue(s_sHelpTipSeconds, css::uno::makeAny(nSet));
532cdf0e10cSrcweir             ::comphelper::ConfigurationHelper::flush(m_xCfg);
533cdf0e10cSrcweir 
534cdf0e10cSrcweir             bIsModified = sal_True;
535cdf0e10cSrcweir         }
536cdf0e10cSrcweir     }
537cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
538cdf0e10cSrcweir     {
539cdf0e10cSrcweir         LogHelper::logIt(ex);
540cdf0e10cSrcweir     }
541cdf0e10cSrcweir }
542cdf0e10cSrcweir 
543cdf0e10cSrcweir void SvtAccessibilityOptions_Impl::SetSelectionInReadonly(sal_Bool bSet)
544cdf0e10cSrcweir {
545cdf0e10cSrcweir     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
546cdf0e10cSrcweir 
547cdf0e10cSrcweir     try
548cdf0e10cSrcweir     {
549cdf0e10cSrcweir         if(xNode.is() && xNode->getPropertyValue(s_sIsSelectionInReadonly)!=bSet)
550cdf0e10cSrcweir         {
551cdf0e10cSrcweir             xNode->setPropertyValue(s_sIsSelectionInReadonly, css::uno::makeAny(bSet));
552cdf0e10cSrcweir             ::comphelper::ConfigurationHelper::flush(m_xCfg);
553cdf0e10cSrcweir 
554cdf0e10cSrcweir             bIsModified = sal_True;
555cdf0e10cSrcweir         }
556cdf0e10cSrcweir     }
557cdf0e10cSrcweir     catch(const css::uno::Exception& ex)
558cdf0e10cSrcweir     {
559cdf0e10cSrcweir         LogHelper::logIt(ex);
560cdf0e10cSrcweir     }
561cdf0e10cSrcweir }
562cdf0e10cSrcweir 
563cdf0e10cSrcweir void SvtAccessibilityOptions_Impl::SetVCLSettings()
564cdf0e10cSrcweir {
565cdf0e10cSrcweir     AllSettings aAllSettings = Application::GetSettings();
566cdf0e10cSrcweir     HelpSettings aHelpSettings = aAllSettings.GetHelpSettings();
567cdf0e10cSrcweir     aHelpSettings.SetTipTimeout( GetIsHelpTipsDisappear() ? GetHelpTipSeconds() * 1000 : HELP_TIP_TIMEOUT);
568cdf0e10cSrcweir     aAllSettings.SetHelpSettings(aHelpSettings);
569cdf0e10cSrcweir     if(aAllSettings.GetStyleSettings().GetUseSystemUIFonts() != GetIsSystemFont() )
570cdf0e10cSrcweir     {
571cdf0e10cSrcweir         StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
572cdf0e10cSrcweir         aStyleSettings.SetUseSystemUIFonts( GetIsSystemFont()  );
573cdf0e10cSrcweir         aAllSettings.SetStyleSettings(aStyleSettings);
574cdf0e10cSrcweir         Application::MergeSystemSettings( aAllSettings );
575cdf0e10cSrcweir     }
576cdf0e10cSrcweir 
577cdf0e10cSrcweir     Application::SetSettings(aAllSettings);
578cdf0e10cSrcweir }
579cdf0e10cSrcweir 
580*ca6f8f21SArmin Le Grand void SvtAccessibilityOptions_Impl::SetColorValueSetMaximumRowCount(sal_Int16 nSet)
581*ca6f8f21SArmin Le Grand {
582*ca6f8f21SArmin Le Grand     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
583*ca6f8f21SArmin Le Grand 
584*ca6f8f21SArmin Le Grand     try
585*ca6f8f21SArmin Le Grand     {
586*ca6f8f21SArmin Le Grand         if(xNode.is() && xNode->getPropertyValue(s_sColorValueSetMaximumRowCount)!=nSet)
587*ca6f8f21SArmin Le Grand         {
588*ca6f8f21SArmin Le Grand             xNode->setPropertyValue(s_sColorValueSetMaximumRowCount, css::uno::makeAny(nSet));
589*ca6f8f21SArmin Le Grand             ::comphelper::ConfigurationHelper::flush(m_xCfg);
590*ca6f8f21SArmin Le Grand 
591*ca6f8f21SArmin Le Grand             bIsModified = sal_True;
592*ca6f8f21SArmin Le Grand         }
593*ca6f8f21SArmin Le Grand     }
594*ca6f8f21SArmin Le Grand     catch(const css::uno::Exception& ex)
595*ca6f8f21SArmin Le Grand     {
596*ca6f8f21SArmin Le Grand         LogHelper::logIt(ex);
597*ca6f8f21SArmin Le Grand     }
598*ca6f8f21SArmin Le Grand }
599*ca6f8f21SArmin Le Grand 
600*ca6f8f21SArmin Le Grand void SvtAccessibilityOptions_Impl::SetColorValueSetEntryEdgeLength(sal_Int16 nSet)
601*ca6f8f21SArmin Le Grand {
602*ca6f8f21SArmin Le Grand     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
603*ca6f8f21SArmin Le Grand 
604*ca6f8f21SArmin Le Grand     try
605*ca6f8f21SArmin Le Grand     {
606*ca6f8f21SArmin Le Grand         if(xNode.is() && xNode->getPropertyValue(s_sColorValueSetEntryEdgeLength)!=nSet)
607*ca6f8f21SArmin Le Grand         {
608*ca6f8f21SArmin Le Grand             xNode->setPropertyValue(s_sColorValueSetEntryEdgeLength, css::uno::makeAny(nSet));
609*ca6f8f21SArmin Le Grand             ::comphelper::ConfigurationHelper::flush(m_xCfg);
610*ca6f8f21SArmin Le Grand 
611*ca6f8f21SArmin Le Grand             bIsModified = sal_True;
612*ca6f8f21SArmin Le Grand         }
613*ca6f8f21SArmin Le Grand     }
614*ca6f8f21SArmin Le Grand     catch(const css::uno::Exception& ex)
615*ca6f8f21SArmin Le Grand     {
616*ca6f8f21SArmin Le Grand         LogHelper::logIt(ex);
617*ca6f8f21SArmin Le Grand     }
618*ca6f8f21SArmin Le Grand }
619*ca6f8f21SArmin Le Grand 
620*ca6f8f21SArmin Le Grand void SvtAccessibilityOptions_Impl::SetColorValueSetColumnCount(sal_Int16 nSet)
621*ca6f8f21SArmin Le Grand {
622*ca6f8f21SArmin Le Grand     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
623*ca6f8f21SArmin Le Grand 
624*ca6f8f21SArmin Le Grand     try
625*ca6f8f21SArmin Le Grand     {
626*ca6f8f21SArmin Le Grand         if(xNode.is() && xNode->getPropertyValue(s_sColorValueSetColumnCount)!=nSet)
627*ca6f8f21SArmin Le Grand         {
628*ca6f8f21SArmin Le Grand             xNode->setPropertyValue(s_sColorValueSetColumnCount, css::uno::makeAny(nSet));
629*ca6f8f21SArmin Le Grand             ::comphelper::ConfigurationHelper::flush(m_xCfg);
630*ca6f8f21SArmin Le Grand 
631*ca6f8f21SArmin Le Grand             bIsModified = sal_True;
632*ca6f8f21SArmin Le Grand         }
633*ca6f8f21SArmin Le Grand     }
634*ca6f8f21SArmin Le Grand     catch(const css::uno::Exception& ex)
635*ca6f8f21SArmin Le Grand     {
636*ca6f8f21SArmin Le Grand         LogHelper::logIt(ex);
637*ca6f8f21SArmin Le Grand     }
638*ca6f8f21SArmin Le Grand }
639*ca6f8f21SArmin Le Grand 
640*ca6f8f21SArmin Le Grand void SvtAccessibilityOptions_Impl::SetEdgeBlending(sal_Int16 nSet)
641*ca6f8f21SArmin Le Grand {
642*ca6f8f21SArmin Le Grand     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
643*ca6f8f21SArmin Le Grand 
644*ca6f8f21SArmin Le Grand     try
645*ca6f8f21SArmin Le Grand     {
646*ca6f8f21SArmin Le Grand         if(xNode.is() && xNode->getPropertyValue(s_sEdgeBlending)!=nSet)
647*ca6f8f21SArmin Le Grand         {
648*ca6f8f21SArmin Le Grand             xNode->setPropertyValue(s_sEdgeBlending, css::uno::makeAny(nSet));
649*ca6f8f21SArmin Le Grand             ::comphelper::ConfigurationHelper::flush(m_xCfg);
650*ca6f8f21SArmin Le Grand 
651*ca6f8f21SArmin Le Grand             bIsModified = sal_True;
652*ca6f8f21SArmin Le Grand         }
653*ca6f8f21SArmin Le Grand     }
654*ca6f8f21SArmin Le Grand     catch(const css::uno::Exception& ex)
655*ca6f8f21SArmin Le Grand     {
656*ca6f8f21SArmin Le Grand         LogHelper::logIt(ex);
657*ca6f8f21SArmin Le Grand     }
658*ca6f8f21SArmin Le Grand }
659*ca6f8f21SArmin Le Grand 
660cdf0e10cSrcweir // -----------------------------------------------------------------------
661cdf0e10cSrcweir // class SvtAccessibilityOptions --------------------------------------------------
662cdf0e10cSrcweir 
663cdf0e10cSrcweir SvtAccessibilityOptions::SvtAccessibilityOptions()
664cdf0e10cSrcweir {
665cdf0e10cSrcweir     {
666cdf0e10cSrcweir         ::osl::MutexGuard aGuard( SingletonMutex::get() );
667cdf0e10cSrcweir         if(!sm_pSingleImplConfig)
668cdf0e10cSrcweir         {
669cdf0e10cSrcweir             sm_pSingleImplConfig = new SvtAccessibilityOptions_Impl;
670cdf0e10cSrcweir             ItemHolder2::holdConfigItem(E_ACCESSIBILITYOPTIONS);
671cdf0e10cSrcweir         }
672cdf0e10cSrcweir         ++sm_nAccessibilityRefCount;
673cdf0e10cSrcweir     }
674cdf0e10cSrcweir     //StartListening( *sm_pSingleImplConfig, sal_True );
675cdf0e10cSrcweir }
676cdf0e10cSrcweir 
677cdf0e10cSrcweir // -----------------------------------------------------------------------
678cdf0e10cSrcweir 
679cdf0e10cSrcweir SvtAccessibilityOptions::~SvtAccessibilityOptions()
680cdf0e10cSrcweir {
681cdf0e10cSrcweir     //EndListening( *sm_pSingleImplConfig, sal_True );
682cdf0e10cSrcweir     ::osl::MutexGuard aGuard( SingletonMutex::get() );
683cdf0e10cSrcweir     if( !--sm_nAccessibilityRefCount )
684cdf0e10cSrcweir     {
685cdf0e10cSrcweir         //if( sm_pSingleImplConfig->IsModified() )
686cdf0e10cSrcweir         //  sm_pSingleImplConfig->Commit();
687cdf0e10cSrcweir         DELETEZ( sm_pSingleImplConfig );
688cdf0e10cSrcweir     }
689cdf0e10cSrcweir }
690cdf0e10cSrcweir 
691cdf0e10cSrcweir // -----------------------------------------------------------------------
692cdf0e10cSrcweir 
693cdf0e10cSrcweir void SvtAccessibilityOptions::Notify( SfxBroadcaster&, const SfxHint& rHint )
694cdf0e10cSrcweir {
695cdf0e10cSrcweir     NotifyListeners(0);
696cdf0e10cSrcweir     if ( rHint.IsA(TYPE(SfxSimpleHint)) )
697cdf0e10cSrcweir     {
698cdf0e10cSrcweir         if ( ((SfxSimpleHint&)rHint).GetId()  == SFX_HINT_ACCESSIBILITY_CHANGED )
699cdf0e10cSrcweir             SetVCLSettings();
700cdf0e10cSrcweir     }
701cdf0e10cSrcweir }
702cdf0e10cSrcweir 
703cdf0e10cSrcweir // -----------------------------------------------------------------------
704cdf0e10cSrcweir 
705cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::IsModified() const
706cdf0e10cSrcweir {
707cdf0e10cSrcweir     return sm_pSingleImplConfig->IsModified();
708cdf0e10cSrcweir }
709cdf0e10cSrcweir void SvtAccessibilityOptions::Commit()
710cdf0e10cSrcweir {
711cdf0e10cSrcweir     //sm_pSingleImplConfig->Commit();
712cdf0e10cSrcweir }
713cdf0e10cSrcweir 
714cdf0e10cSrcweir // -----------------------------------------------------------------------
715cdf0e10cSrcweir 
716cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsForDrawings() const
717cdf0e10cSrcweir {
718cdf0e10cSrcweir     DBG_ERROR( "SvtAccessibilityOptions::GetIsForDrawings: is obsolete!" );
719cdf0e10cSrcweir     return sal_False;
720cdf0e10cSrcweir }
721cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsForBorders() const
722cdf0e10cSrcweir {
723cdf0e10cSrcweir     DBG_ERROR( "SvtAccessibilityOptions::GetIsForBorders: is obsolete!" );
724cdf0e10cSrcweir     return sal_False;
725cdf0e10cSrcweir }
726cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetAutoDetectSystemHC() const
727cdf0e10cSrcweir {
728cdf0e10cSrcweir     return sm_pSingleImplConfig->GetAutoDetectSystemHC();
729cdf0e10cSrcweir }
730cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsForPagePreviews() const
731cdf0e10cSrcweir {
732cdf0e10cSrcweir     return sm_pSingleImplConfig->GetIsForPagePreviews();
733cdf0e10cSrcweir }
734cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsHelpTipsDisappear() const
735cdf0e10cSrcweir {
736cdf0e10cSrcweir     return sm_pSingleImplConfig->GetIsHelpTipsDisappear();
737cdf0e10cSrcweir }
738cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsAllowAnimatedGraphics() const
739cdf0e10cSrcweir {
740cdf0e10cSrcweir     return sm_pSingleImplConfig->GetIsAllowAnimatedGraphics();
741cdf0e10cSrcweir }
742cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsAllowAnimatedText() const
743cdf0e10cSrcweir {
744cdf0e10cSrcweir     return sm_pSingleImplConfig->GetIsAllowAnimatedText();
745cdf0e10cSrcweir }
746cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsAutomaticFontColor() const
747cdf0e10cSrcweir {
748cdf0e10cSrcweir     return sm_pSingleImplConfig->GetIsAutomaticFontColor();
749cdf0e10cSrcweir }
750cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsSystemFont() const
751cdf0e10cSrcweir {
752cdf0e10cSrcweir     return sm_pSingleImplConfig->GetIsSystemFont();
753cdf0e10cSrcweir }
754cdf0e10cSrcweir sal_Int16 SvtAccessibilityOptions::GetHelpTipSeconds() const
755cdf0e10cSrcweir {
756cdf0e10cSrcweir     return sm_pSingleImplConfig->GetHelpTipSeconds();
757cdf0e10cSrcweir }
758cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::IsSelectionInReadonly() const
759cdf0e10cSrcweir {
760cdf0e10cSrcweir     return sm_pSingleImplConfig->IsSelectionInReadonly();
761cdf0e10cSrcweir }
762cdf0e10cSrcweir 
763*ca6f8f21SArmin Le Grand sal_Int16 SvtAccessibilityOptions::GetColorValueSetMaximumRowCount() const
764*ca6f8f21SArmin Le Grand {
765*ca6f8f21SArmin Le Grand     return sm_pSingleImplConfig->GetColorValueSetMaximumRowCount();
766*ca6f8f21SArmin Le Grand }
767*ca6f8f21SArmin Le Grand 
768*ca6f8f21SArmin Le Grand sal_Int16 SvtAccessibilityOptions::GetColorValueSetEntryEdgeLength() const
769*ca6f8f21SArmin Le Grand {
770*ca6f8f21SArmin Le Grand     return sm_pSingleImplConfig->GetColorValueSetEntryEdgeLength();
771*ca6f8f21SArmin Le Grand }
772*ca6f8f21SArmin Le Grand 
773*ca6f8f21SArmin Le Grand sal_Int16 SvtAccessibilityOptions::GetColorValueSetColumnCount() const
774*ca6f8f21SArmin Le Grand {
775*ca6f8f21SArmin Le Grand     return sm_pSingleImplConfig->GetColorValueSetColumnCount();
776*ca6f8f21SArmin Le Grand }
777*ca6f8f21SArmin Le Grand 
778*ca6f8f21SArmin Le Grand sal_Int16 SvtAccessibilityOptions::GetEdgeBlending() const
779*ca6f8f21SArmin Le Grand {
780*ca6f8f21SArmin Le Grand     return sm_pSingleImplConfig->GetEdgeBlending();
781*ca6f8f21SArmin Le Grand }
782*ca6f8f21SArmin Le Grand 
783cdf0e10cSrcweir // -----------------------------------------------------------------------
784cdf0e10cSrcweir void SvtAccessibilityOptions::SetAutoDetectSystemHC(sal_Bool bSet)
785cdf0e10cSrcweir {
786cdf0e10cSrcweir     sm_pSingleImplConfig->SetAutoDetectSystemHC(bSet);
787cdf0e10cSrcweir }
788cdf0e10cSrcweir void SvtAccessibilityOptions::SetIsForPagePreviews(sal_Bool bSet)
789cdf0e10cSrcweir {
790cdf0e10cSrcweir     sm_pSingleImplConfig->SetIsForPagePreviews(bSet);
791cdf0e10cSrcweir }
792cdf0e10cSrcweir void SvtAccessibilityOptions::SetIsHelpTipsDisappear(sal_Bool bSet)
793cdf0e10cSrcweir {
794cdf0e10cSrcweir     sm_pSingleImplConfig->SetIsHelpTipsDisappear(bSet);
795cdf0e10cSrcweir }
796cdf0e10cSrcweir void SvtAccessibilityOptions::SetIsAllowAnimatedGraphics(sal_Bool bSet)
797cdf0e10cSrcweir {
798cdf0e10cSrcweir     sm_pSingleImplConfig->SetIsAllowAnimatedGraphics(bSet);
799cdf0e10cSrcweir }
800cdf0e10cSrcweir void SvtAccessibilityOptions::SetIsAllowAnimatedText(sal_Bool bSet)
801cdf0e10cSrcweir {
802cdf0e10cSrcweir     sm_pSingleImplConfig->SetIsAllowAnimatedText(bSet);
803cdf0e10cSrcweir }
804cdf0e10cSrcweir void SvtAccessibilityOptions::SetIsAutomaticFontColor(sal_Bool bSet)
805cdf0e10cSrcweir {
806cdf0e10cSrcweir     sm_pSingleImplConfig->SetIsAutomaticFontColor(bSet);
807cdf0e10cSrcweir }
808cdf0e10cSrcweir void SvtAccessibilityOptions::SetIsSystemFont(sal_Bool bSet)
809cdf0e10cSrcweir {
810cdf0e10cSrcweir     sm_pSingleImplConfig->SetIsSystemFont(bSet);
811cdf0e10cSrcweir }
812cdf0e10cSrcweir void SvtAccessibilityOptions::SetHelpTipSeconds(sal_Int16 nSet)
813cdf0e10cSrcweir {
814cdf0e10cSrcweir     sm_pSingleImplConfig->SetHelpTipSeconds(nSet);
815cdf0e10cSrcweir }
816cdf0e10cSrcweir void SvtAccessibilityOptions::SetSelectionInReadonly(sal_Bool bSet)
817cdf0e10cSrcweir {
818cdf0e10cSrcweir     sm_pSingleImplConfig->SetSelectionInReadonly(bSet);
819cdf0e10cSrcweir }
820cdf0e10cSrcweir void SvtAccessibilityOptions::SetVCLSettings()
821cdf0e10cSrcweir {
822cdf0e10cSrcweir     sm_pSingleImplConfig->SetVCLSettings();
823cdf0e10cSrcweir }
824*ca6f8f21SArmin Le Grand void SvtAccessibilityOptions::SetColorValueSetMaximumRowCount(sal_Int16 nSet)
825*ca6f8f21SArmin Le Grand {
826*ca6f8f21SArmin Le Grand     sm_pSingleImplConfig->SetColorValueSetMaximumRowCount(nSet);
827*ca6f8f21SArmin Le Grand }
828*ca6f8f21SArmin Le Grand void SvtAccessibilityOptions::SetColorValueSetEntryEdgeLength(sal_Int16 nSet)
829*ca6f8f21SArmin Le Grand {
830*ca6f8f21SArmin Le Grand     sm_pSingleImplConfig->SetColorValueSetEntryEdgeLength(nSet);
831*ca6f8f21SArmin Le Grand }
832*ca6f8f21SArmin Le Grand void SvtAccessibilityOptions::SetColorValueSetColumnCount(sal_Int16 nSet)
833*ca6f8f21SArmin Le Grand {
834*ca6f8f21SArmin Le Grand     sm_pSingleImplConfig->SetColorValueSetColumnCount(nSet);
835*ca6f8f21SArmin Le Grand }
836*ca6f8f21SArmin Le Grand void SvtAccessibilityOptions::SetEdgeBlending(sal_Int16 nSet)
837*ca6f8f21SArmin Le Grand {
838*ca6f8f21SArmin Le Grand     sm_pSingleImplConfig->SetEdgeBlending(nSet);
839*ca6f8f21SArmin Le Grand }
840cdf0e10cSrcweir // -----------------------------------------------------------------------
841