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
105900e8ecSAndrew Rist  *
115900e8ecSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
125900e8ecSAndrew Rist  *
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.
195900e8ecSAndrew Rist  *
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;
89ca6f8f21SArmin Le Grand     sal_Int16   GetEdgeBlending() const;
90*a68b38dfSArmin Le Grand     sal_Int16   GetListBoxMaximumLineCount() const;
91cdf0e10cSrcweir 
92cdf0e10cSrcweir 	void		SetAutoDetectSystemHC(sal_Bool bSet);
93cdf0e10cSrcweir 	void		SetIsForPagePreviews(sal_Bool bSet);
94cdf0e10cSrcweir 	void		SetIsHelpTipsDisappear(sal_Bool bSet);
95cdf0e10cSrcweir 	void		SetIsAllowAnimatedGraphics(sal_Bool bSet);
96cdf0e10cSrcweir 	void		SetIsAllowAnimatedText(sal_Bool bSet);
97cdf0e10cSrcweir 	void		SetIsAutomaticFontColor(sal_Bool bSet);
98cdf0e10cSrcweir 	void		SetIsSystemFont(sal_Bool bSet);
99cdf0e10cSrcweir 	void		SetHelpTipSeconds(sal_Int16 nSet);
100cdf0e10cSrcweir 	void		SetSelectionInReadonly(sal_Bool bSet);
101ca6f8f21SArmin Le Grand     void        SetEdgeBlending(sal_Int16 nSet);
102*a68b38dfSArmin Le Grand     void        SetListBoxMaximumLineCount(sal_Int16 nSet);
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 	sal_Bool	IsModified() const { return bIsModified; };
105cdf0e10cSrcweir };
106cdf0e10cSrcweir 
107cdf0e10cSrcweir // initialization of static members --------------------------------------
108cdf0e10cSrcweir 
109cdf0e10cSrcweir SvtAccessibilityOptions_Impl* volatile 	SvtAccessibilityOptions::sm_pSingleImplConfig =NULL;
110cdf0e10cSrcweir sal_Int32					  volatile 	SvtAccessibilityOptions::sm_nAccessibilityRefCount(0);
111cdf0e10cSrcweir 
112cdf0e10cSrcweir namespace
113cdf0e10cSrcweir {
114cdf0e10cSrcweir 	struct SingletonMutex
115cdf0e10cSrcweir 		: public rtl::Static< ::osl::Mutex, SingletonMutex > {};
116cdf0e10cSrcweir }
117cdf0e10cSrcweir 
118cdf0e10cSrcweir // -----------------------------------------------------------------------
119cdf0e10cSrcweir // class SvtAccessibilityOptions_Impl ---------------------------------------------
120cdf0e10cSrcweir 
121cdf0e10cSrcweir SvtAccessibilityOptions_Impl::SvtAccessibilityOptions_Impl()
122cdf0e10cSrcweir {
123cdf0e10cSrcweir 	try
124cdf0e10cSrcweir 	{
125cdf0e10cSrcweir 		m_xCfg = css::uno::Reference< css::container::XNameAccess >(
126cdf0e10cSrcweir 			::comphelper::ConfigurationHelper::openConfig(
127cdf0e10cSrcweir 			utl::getProcessServiceFactory(),
128cdf0e10cSrcweir 			s_sAccessibility,
129cdf0e10cSrcweir 			::comphelper::ConfigurationHelper::E_STANDARD),
130cdf0e10cSrcweir 			css::uno::UNO_QUERY);
131cdf0e10cSrcweir 
132cdf0e10cSrcweir 		bIsModified = sal_False;
133cdf0e10cSrcweir 	}
134cdf0e10cSrcweir 	catch(const css::uno::Exception& ex)
135cdf0e10cSrcweir 	{
136cdf0e10cSrcweir 		m_xCfg.clear();
137cdf0e10cSrcweir 		LogHelper::logIt(ex);
138cdf0e10cSrcweir 	}
139cdf0e10cSrcweir }
140cdf0e10cSrcweir 
141cdf0e10cSrcweir SvtAccessibilityOptions_Impl::~SvtAccessibilityOptions_Impl()
142cdf0e10cSrcweir {
143cdf0e10cSrcweir }
144cdf0e10cSrcweir 
145cdf0e10cSrcweir // -----------------------------------------------------------------------
146cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetAutoDetectSystemHC()
147cdf0e10cSrcweir {
148cdf0e10cSrcweir 	css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
149cdf0e10cSrcweir 	sal_Bool										bRet = sal_True;
150cdf0e10cSrcweir 
151cdf0e10cSrcweir 	try
152cdf0e10cSrcweir 	{
153cdf0e10cSrcweir 		if(xNode.is())
154cdf0e10cSrcweir 			xNode->getPropertyValue(s_sAutoDetectSystemHC) >>= bRet;
155cdf0e10cSrcweir 	}
156cdf0e10cSrcweir 	catch(const css::uno::Exception& ex)
157cdf0e10cSrcweir 	{
158cdf0e10cSrcweir 		LogHelper::logIt(ex);
159cdf0e10cSrcweir 	}
160cdf0e10cSrcweir 
161cdf0e10cSrcweir 	return bRet;
162cdf0e10cSrcweir }
163cdf0e10cSrcweir 
164cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetIsForPagePreviews() const
165cdf0e10cSrcweir {
166cdf0e10cSrcweir 	css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
167cdf0e10cSrcweir 	sal_Bool										bRet = sal_True;
168cdf0e10cSrcweir 
169cdf0e10cSrcweir 	try
170cdf0e10cSrcweir 	{
171cdf0e10cSrcweir 		if(xNode.is())
172cdf0e10cSrcweir 			xNode->getPropertyValue(s_sIsForPagePreviews) >>= bRet;
173cdf0e10cSrcweir 	}
174cdf0e10cSrcweir 	catch(const css::uno::Exception& ex)
175cdf0e10cSrcweir 	{
176cdf0e10cSrcweir 		LogHelper::logIt(ex);
177cdf0e10cSrcweir 	}
178cdf0e10cSrcweir 	return bRet;
179cdf0e10cSrcweir }
180cdf0e10cSrcweir 
181cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetIsHelpTipsDisappear() const
182cdf0e10cSrcweir {
183cdf0e10cSrcweir 	css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
184cdf0e10cSrcweir 	sal_Bool										bRet = sal_True;
185cdf0e10cSrcweir 
186cdf0e10cSrcweir 	try
187cdf0e10cSrcweir 	{
188cdf0e10cSrcweir 		if(xNode.is())
189cdf0e10cSrcweir 			xNode->getPropertyValue(s_sIsHelpTipsDisappear) >>= bRet;
190cdf0e10cSrcweir 	}
191cdf0e10cSrcweir 	catch(const css::uno::Exception& ex)
192cdf0e10cSrcweir 	{
193cdf0e10cSrcweir 		LogHelper::logIt(ex);
194cdf0e10cSrcweir 	}
195cdf0e10cSrcweir 
196cdf0e10cSrcweir 	return bRet;
197cdf0e10cSrcweir }
198cdf0e10cSrcweir 
199cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedGraphics() const
200cdf0e10cSrcweir {
201cdf0e10cSrcweir 	css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
202cdf0e10cSrcweir 	sal_Bool										bRet = sal_True;
203cdf0e10cSrcweir 
204cdf0e10cSrcweir 	try
205cdf0e10cSrcweir 	{
206cdf0e10cSrcweir 		if(xNode.is())
207cdf0e10cSrcweir 			xNode->getPropertyValue(s_sIsAllowAnimatedGraphics) >>= bRet;
208cdf0e10cSrcweir 	}
209cdf0e10cSrcweir 	catch(const css::uno::Exception& ex)
210cdf0e10cSrcweir 	{
211cdf0e10cSrcweir 		LogHelper::logIt(ex);
212cdf0e10cSrcweir 	}
213cdf0e10cSrcweir 
214cdf0e10cSrcweir 	return bRet;
215cdf0e10cSrcweir }
216cdf0e10cSrcweir 
217cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedText() const
218cdf0e10cSrcweir {
219cdf0e10cSrcweir 	css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
220cdf0e10cSrcweir 	sal_Bool										bRet = sal_True;
221cdf0e10cSrcweir 
222cdf0e10cSrcweir 	try
223cdf0e10cSrcweir 	{
224cdf0e10cSrcweir 		if(xNode.is())
225cdf0e10cSrcweir 			xNode->getPropertyValue(s_sIsAllowAnimatedText) >>= bRet;
226cdf0e10cSrcweir 	}
227cdf0e10cSrcweir 	catch(const css::uno::Exception& ex)
228cdf0e10cSrcweir 	{
229cdf0e10cSrcweir 		LogHelper::logIt(ex);
230cdf0e10cSrcweir 	}
231cdf0e10cSrcweir 
232cdf0e10cSrcweir 	return bRet;
233cdf0e10cSrcweir }
234cdf0e10cSrcweir 
235cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetIsAutomaticFontColor() const
236cdf0e10cSrcweir {
237cdf0e10cSrcweir 	css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
238cdf0e10cSrcweir 	sal_Bool										bRet = sal_False;
239cdf0e10cSrcweir 
240cdf0e10cSrcweir 	try
241cdf0e10cSrcweir 	{
242cdf0e10cSrcweir 		if(xNode.is())
243cdf0e10cSrcweir 			xNode->getPropertyValue(s_sIsAutomaticFontColor) >>= bRet;
244cdf0e10cSrcweir 	}
245cdf0e10cSrcweir 	catch(const css::uno::Exception& ex)
246cdf0e10cSrcweir 	{
247cdf0e10cSrcweir 		LogHelper::logIt(ex);
248cdf0e10cSrcweir 	}
249cdf0e10cSrcweir 
250cdf0e10cSrcweir 	return bRet;
251cdf0e10cSrcweir }
252cdf0e10cSrcweir 
253cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::GetIsSystemFont() const
254cdf0e10cSrcweir {
255cdf0e10cSrcweir 	css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
256cdf0e10cSrcweir 	sal_Bool										bRet = sal_True;
257cdf0e10cSrcweir 
258cdf0e10cSrcweir 	try
259cdf0e10cSrcweir 	{
260cdf0e10cSrcweir 		if(xNode.is())
261cdf0e10cSrcweir 			xNode->getPropertyValue(s_sIsSystemFont) >>= bRet;
262cdf0e10cSrcweir 	}
263cdf0e10cSrcweir 	catch(const css::uno::Exception& ex)
264cdf0e10cSrcweir 	{
265cdf0e10cSrcweir 		LogHelper::logIt(ex);
266cdf0e10cSrcweir 	}
267cdf0e10cSrcweir 
268cdf0e10cSrcweir 	return bRet;
269cdf0e10cSrcweir }
270cdf0e10cSrcweir 
271cdf0e10cSrcweir sal_Int16 SvtAccessibilityOptions_Impl::GetHelpTipSeconds() const
272cdf0e10cSrcweir {
273cdf0e10cSrcweir 	css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
274cdf0e10cSrcweir 	sal_Int16										nRet = 4;
275cdf0e10cSrcweir 
276cdf0e10cSrcweir 	try
277cdf0e10cSrcweir 	{
278cdf0e10cSrcweir 		if(xNode.is())
279cdf0e10cSrcweir 			xNode->getPropertyValue(s_sHelpTipSeconds) >>= nRet;
280cdf0e10cSrcweir 	}
281cdf0e10cSrcweir 	catch(const css::uno::Exception& ex)
282cdf0e10cSrcweir 	{
283cdf0e10cSrcweir 		LogHelper::logIt(ex);
284cdf0e10cSrcweir 	}
285cdf0e10cSrcweir 
286cdf0e10cSrcweir 	return nRet;
287cdf0e10cSrcweir }
288cdf0e10cSrcweir 
289cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions_Impl::IsSelectionInReadonly() const
290cdf0e10cSrcweir {
291cdf0e10cSrcweir 	css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
292cdf0e10cSrcweir 	sal_Bool										bRet = sal_False;
293cdf0e10cSrcweir 
294cdf0e10cSrcweir 	try
295cdf0e10cSrcweir 	{
296cdf0e10cSrcweir 		if(xNode.is())
297cdf0e10cSrcweir 			xNode->getPropertyValue(s_sIsSelectionInReadonly) >>= bRet;
298cdf0e10cSrcweir 	}
299cdf0e10cSrcweir 	catch(const css::uno::Exception& ex)
300cdf0e10cSrcweir 	{
301cdf0e10cSrcweir 		LogHelper::logIt(ex);
302cdf0e10cSrcweir 	}
303cdf0e10cSrcweir 
304cdf0e10cSrcweir 	return bRet;
305cdf0e10cSrcweir }
306cdf0e10cSrcweir 
307*a68b38dfSArmin Le Grand sal_Int16 SvtAccessibilityOptions_Impl::GetEdgeBlending() const
308ca6f8f21SArmin Le Grand {
309ca6f8f21SArmin Le Grand     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
310*a68b38dfSArmin Le Grand     sal_Int16 nRet = 35;
311ca6f8f21SArmin Le Grand 
312ca6f8f21SArmin Le Grand     try
313ca6f8f21SArmin Le Grand     {
314ca6f8f21SArmin Le Grand         if(xNode.is())
315*a68b38dfSArmin Le Grand             xNode->getPropertyValue(s_sEdgeBlending) >>= nRet;
316ca6f8f21SArmin Le Grand     }
317ca6f8f21SArmin Le Grand     catch(const css::uno::Exception& ex)
318ca6f8f21SArmin Le Grand     {
319ca6f8f21SArmin Le Grand         LogHelper::logIt(ex);
320ca6f8f21SArmin Le Grand     }
321ca6f8f21SArmin Le Grand 
322ca6f8f21SArmin Le Grand     return nRet;
323ca6f8f21SArmin Le Grand }
324ca6f8f21SArmin Le Grand 
325*a68b38dfSArmin Le Grand sal_Int16 SvtAccessibilityOptions_Impl::GetListBoxMaximumLineCount() const
326ca6f8f21SArmin Le Grand {
327ca6f8f21SArmin Le Grand     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
328*a68b38dfSArmin Le Grand     sal_Int16 nRet = 25;
329ca6f8f21SArmin Le Grand 
330ca6f8f21SArmin Le Grand     try
331ca6f8f21SArmin Le Grand     {
332ca6f8f21SArmin Le Grand         if(xNode.is())
333*a68b38dfSArmin Le Grand             xNode->getPropertyValue(s_sListBoxMaximumLineCount) >>= nRet;
334ca6f8f21SArmin Le Grand     }
335ca6f8f21SArmin Le Grand     catch(const css::uno::Exception& ex)
336ca6f8f21SArmin Le Grand     {
337ca6f8f21SArmin Le Grand         LogHelper::logIt(ex);
338ca6f8f21SArmin Le Grand     }
339ca6f8f21SArmin Le Grand 
340ca6f8f21SArmin Le Grand     return nRet;
341ca6f8f21SArmin Le Grand }
342ca6f8f21SArmin Le Grand 
343cdf0e10cSrcweir void SvtAccessibilityOptions_Impl::SetAutoDetectSystemHC(sal_Bool bSet)
344cdf0e10cSrcweir {
345cdf0e10cSrcweir 	css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
346cdf0e10cSrcweir 
347cdf0e10cSrcweir 	try
348cdf0e10cSrcweir 	{
349cdf0e10cSrcweir 		if(xNode.is() && xNode->getPropertyValue(s_sAutoDetectSystemHC)!=bSet)
350cdf0e10cSrcweir 		{
351cdf0e10cSrcweir 			xNode->setPropertyValue(s_sAutoDetectSystemHC, css::uno::makeAny(bSet));
352cdf0e10cSrcweir 			::comphelper::ConfigurationHelper::flush(m_xCfg);
353cdf0e10cSrcweir 
354cdf0e10cSrcweir 			bIsModified = sal_True;
355cdf0e10cSrcweir 		}
356cdf0e10cSrcweir 	}
357cdf0e10cSrcweir 	catch(const css::uno::Exception& ex)
358cdf0e10cSrcweir 	{
359cdf0e10cSrcweir 		LogHelper::logIt(ex);
360cdf0e10cSrcweir 	}
361cdf0e10cSrcweir }
362cdf0e10cSrcweir 
363cdf0e10cSrcweir void SvtAccessibilityOptions_Impl::SetIsForPagePreviews(sal_Bool bSet)
364cdf0e10cSrcweir {
365cdf0e10cSrcweir 	css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
366cdf0e10cSrcweir 
367cdf0e10cSrcweir 	try
368cdf0e10cSrcweir 	{
369cdf0e10cSrcweir 		if(xNode.is() && xNode->getPropertyValue(s_sIsForPagePreviews)!=bSet)
370cdf0e10cSrcweir 		{
371cdf0e10cSrcweir 			xNode->setPropertyValue(s_sIsForPagePreviews, css::uno::makeAny(bSet));
372cdf0e10cSrcweir 			::comphelper::ConfigurationHelper::flush(m_xCfg);
373cdf0e10cSrcweir 
374cdf0e10cSrcweir 			bIsModified = sal_True;
375cdf0e10cSrcweir 		}
376cdf0e10cSrcweir 	}
377cdf0e10cSrcweir 	catch(const css::uno::Exception& ex)
378cdf0e10cSrcweir 	{
379cdf0e10cSrcweir 		LogHelper::logIt(ex);
380cdf0e10cSrcweir 	}
381cdf0e10cSrcweir }
382cdf0e10cSrcweir 
383cdf0e10cSrcweir void SvtAccessibilityOptions_Impl::SetIsHelpTipsDisappear(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_sIsHelpTipsDisappear)!=bSet)
390cdf0e10cSrcweir 		{
391cdf0e10cSrcweir 			xNode->setPropertyValue(s_sIsHelpTipsDisappear, 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::SetIsAllowAnimatedGraphics(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_sIsAllowAnimatedGraphics)!=bSet)
410cdf0e10cSrcweir 		{
411cdf0e10cSrcweir 			xNode->setPropertyValue(s_sIsAllowAnimatedGraphics, 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::SetIsAllowAnimatedText(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_sIsAllowAnimatedText)!=bSet)
430cdf0e10cSrcweir 		{
431cdf0e10cSrcweir 			xNode->setPropertyValue(s_sIsAllowAnimatedText, 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::SetIsAutomaticFontColor(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_sIsAutomaticFontColor)!=bSet)
450cdf0e10cSrcweir 		{
451cdf0e10cSrcweir 			xNode->setPropertyValue(s_sIsAutomaticFontColor, 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::SetIsSystemFont(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_sIsSystemFont)!=bSet)
470cdf0e10cSrcweir 		{
471cdf0e10cSrcweir 			xNode->setPropertyValue(s_sIsSystemFont, 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::SetHelpTipSeconds(sal_Int16 nSet)
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_sHelpTipSeconds)!=nSet)
490cdf0e10cSrcweir 		{
491cdf0e10cSrcweir 			xNode->setPropertyValue(s_sHelpTipSeconds, css::uno::makeAny(nSet));
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::SetSelectionInReadonly(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_sIsSelectionInReadonly)!=bSet)
510cdf0e10cSrcweir 		{
511cdf0e10cSrcweir 			xNode->setPropertyValue(s_sIsSelectionInReadonly, 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::SetVCLSettings()
524cdf0e10cSrcweir {
525*a68b38dfSArmin Le Grand     AllSettings aAllSettings(Application::GetSettings());
526*a68b38dfSArmin Le Grand     StyleSettings aStyleSettings(aAllSettings.GetStyleSettings());
527*a68b38dfSArmin Le Grand     HelpSettings aHelpSettings(aAllSettings.GetHelpSettings());
528*a68b38dfSArmin Le Grand     bool StyleSettingsChanged(false);
529cdf0e10cSrcweir 
530*a68b38dfSArmin Le Grand     aHelpSettings.SetTipTimeout( GetIsHelpTipsDisappear() ? GetHelpTipSeconds() * 1000 : HELP_TIP_TIMEOUT);
531*a68b38dfSArmin Le Grand     aAllSettings.SetHelpSettings(aHelpSettings);
532cdf0e10cSrcweir 
533*a68b38dfSArmin Le Grand     if(aStyleSettings.GetUseSystemUIFonts() != GetIsSystemFont())
534ca6f8f21SArmin Le Grand     {
535*a68b38dfSArmin Le Grand         aStyleSettings.SetUseSystemUIFonts(GetIsSystemFont());
536*a68b38dfSArmin Le Grand         StyleSettingsChanged = true;
537ca6f8f21SArmin Le Grand     }
538*a68b38dfSArmin Le Grand 
539*a68b38dfSArmin Le Grand     const sal_Int16 nEdgeBlendingCountA(GetEdgeBlending());
540*a68b38dfSArmin Le Grand     OSL_ENSURE(nEdgeBlendingCountA >= 0, "OOps, negative values for EdgeBlending are not allowed (!)");
541*a68b38dfSArmin Le Grand     const sal_uInt16 nEdgeBlendingCountB(static_cast< sal_uInt16 >(nEdgeBlendingCountA >= 0 ? nEdgeBlendingCountA : 0));
542*a68b38dfSArmin Le Grand 
543*a68b38dfSArmin Le Grand     if(aStyleSettings.GetEdgeBlending() != nEdgeBlendingCountB)
544ca6f8f21SArmin Le Grand     {
545*a68b38dfSArmin Le Grand         aStyleSettings.SetEdgeBlending(nEdgeBlendingCountB);
546*a68b38dfSArmin Le Grand         StyleSettingsChanged = true;
547ca6f8f21SArmin Le Grand     }
548ca6f8f21SArmin Le Grand 
549*a68b38dfSArmin Le Grand     const sal_Int16 nMaxLineCountA(GetListBoxMaximumLineCount());
550*a68b38dfSArmin Le Grand     OSL_ENSURE(nMaxLineCountA >= 0, "OOps, negative values for ListBoxMaximumLineCount are not allowed (!)");
551*a68b38dfSArmin Le Grand     const sal_uInt16 nMaxLineCountB(static_cast< sal_uInt16 >(nMaxLineCountA >= 0 ? nMaxLineCountA : 0));
552ca6f8f21SArmin Le Grand 
553*a68b38dfSArmin Le Grand     if(aStyleSettings.GetListBoxMaximumLineCount() != nMaxLineCountB)
554ca6f8f21SArmin Le Grand     {
555*a68b38dfSArmin Le Grand         aStyleSettings.SetListBoxMaximumLineCount(nMaxLineCountB);
556*a68b38dfSArmin Le Grand         StyleSettingsChanged = true;
557ca6f8f21SArmin Le Grand     }
558*a68b38dfSArmin Le Grand 
559*a68b38dfSArmin Le Grand     if(StyleSettingsChanged)
560ca6f8f21SArmin Le Grand     {
561*a68b38dfSArmin Le Grand         aAllSettings.SetStyleSettings(aStyleSettings);
562*a68b38dfSArmin Le Grand         Application::MergeSystemSettings(aAllSettings);
563ca6f8f21SArmin Le Grand     }
564*a68b38dfSArmin Le Grand 
565*a68b38dfSArmin Le Grand     Application::SetSettings(aAllSettings);
566ca6f8f21SArmin Le Grand }
567ca6f8f21SArmin Le Grand 
568*a68b38dfSArmin Le Grand void SvtAccessibilityOptions_Impl::SetEdgeBlending(sal_Int16 nSet)
569ca6f8f21SArmin Le Grand {
570ca6f8f21SArmin Le Grand     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
571ca6f8f21SArmin Le Grand 
572ca6f8f21SArmin Le Grand     try
573ca6f8f21SArmin Le Grand     {
574*a68b38dfSArmin Le Grand         if(xNode.is() && xNode->getPropertyValue(s_sEdgeBlending)!=nSet)
575ca6f8f21SArmin Le Grand         {
576*a68b38dfSArmin Le Grand             xNode->setPropertyValue(s_sEdgeBlending, css::uno::makeAny(nSet));
577ca6f8f21SArmin Le Grand             ::comphelper::ConfigurationHelper::flush(m_xCfg);
578ca6f8f21SArmin Le Grand 
579ca6f8f21SArmin Le Grand             bIsModified = sal_True;
580ca6f8f21SArmin Le Grand         }
581ca6f8f21SArmin Le Grand     }
582ca6f8f21SArmin Le Grand     catch(const css::uno::Exception& ex)
583ca6f8f21SArmin Le Grand     {
584ca6f8f21SArmin Le Grand         LogHelper::logIt(ex);
585ca6f8f21SArmin Le Grand     }
586ca6f8f21SArmin Le Grand }
587ca6f8f21SArmin Le Grand 
588*a68b38dfSArmin Le Grand void SvtAccessibilityOptions_Impl::SetListBoxMaximumLineCount(sal_Int16 nSet)
589ca6f8f21SArmin Le Grand {
590ca6f8f21SArmin Le Grand     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
591ca6f8f21SArmin Le Grand 
592ca6f8f21SArmin Le Grand     try
593ca6f8f21SArmin Le Grand     {
594*a68b38dfSArmin Le Grand         if(xNode.is() && xNode->getPropertyValue(s_sListBoxMaximumLineCount)!=nSet)
595ca6f8f21SArmin Le Grand         {
596*a68b38dfSArmin Le Grand             xNode->setPropertyValue(s_sListBoxMaximumLineCount, css::uno::makeAny(nSet));
597ca6f8f21SArmin Le Grand             ::comphelper::ConfigurationHelper::flush(m_xCfg);
598ca6f8f21SArmin Le Grand 
599ca6f8f21SArmin Le Grand             bIsModified = sal_True;
600ca6f8f21SArmin Le Grand         }
601ca6f8f21SArmin Le Grand     }
602ca6f8f21SArmin Le Grand     catch(const css::uno::Exception& ex)
603ca6f8f21SArmin Le Grand     {
604ca6f8f21SArmin Le Grand         LogHelper::logIt(ex);
605ca6f8f21SArmin Le Grand     }
606ca6f8f21SArmin Le Grand }
607ca6f8f21SArmin Le Grand 
608cdf0e10cSrcweir // -----------------------------------------------------------------------
609cdf0e10cSrcweir // class SvtAccessibilityOptions --------------------------------------------------
610cdf0e10cSrcweir 
611cdf0e10cSrcweir SvtAccessibilityOptions::SvtAccessibilityOptions()
612cdf0e10cSrcweir {
613cdf0e10cSrcweir 	{
614cdf0e10cSrcweir 		::osl::MutexGuard aGuard( SingletonMutex::get() );
615cdf0e10cSrcweir 		if(!sm_pSingleImplConfig)
616cdf0e10cSrcweir 		{
617cdf0e10cSrcweir 			sm_pSingleImplConfig = new SvtAccessibilityOptions_Impl;
618cdf0e10cSrcweir 			ItemHolder2::holdConfigItem(E_ACCESSIBILITYOPTIONS);
619cdf0e10cSrcweir 		}
620cdf0e10cSrcweir 		++sm_nAccessibilityRefCount;
621cdf0e10cSrcweir 	}
622cdf0e10cSrcweir 	//StartListening( *sm_pSingleImplConfig, sal_True );
623cdf0e10cSrcweir }
624cdf0e10cSrcweir 
625cdf0e10cSrcweir // -----------------------------------------------------------------------
626cdf0e10cSrcweir 
627cdf0e10cSrcweir SvtAccessibilityOptions::~SvtAccessibilityOptions()
628cdf0e10cSrcweir {
629cdf0e10cSrcweir 	//EndListening( *sm_pSingleImplConfig, sal_True );
630cdf0e10cSrcweir 	::osl::MutexGuard aGuard( SingletonMutex::get() );
631cdf0e10cSrcweir 	if( !--sm_nAccessibilityRefCount )
632cdf0e10cSrcweir 	{
633cdf0e10cSrcweir 		//if( sm_pSingleImplConfig->IsModified() )
634cdf0e10cSrcweir 		//	sm_pSingleImplConfig->Commit();
635cdf0e10cSrcweir 		DELETEZ( sm_pSingleImplConfig );
636cdf0e10cSrcweir 	}
637cdf0e10cSrcweir }
638cdf0e10cSrcweir 
639cdf0e10cSrcweir // -----------------------------------------------------------------------
640cdf0e10cSrcweir 
641cdf0e10cSrcweir void SvtAccessibilityOptions::Notify( SfxBroadcaster&, const SfxHint& rHint )
642cdf0e10cSrcweir {
643cdf0e10cSrcweir 	NotifyListeners(0);
644cdf0e10cSrcweir 	if ( rHint.IsA(TYPE(SfxSimpleHint)) )
645cdf0e10cSrcweir 	{
646cdf0e10cSrcweir 		if ( ((SfxSimpleHint&)rHint).GetId()  == SFX_HINT_ACCESSIBILITY_CHANGED )
647cdf0e10cSrcweir 			SetVCLSettings();
648cdf0e10cSrcweir 	}
649cdf0e10cSrcweir }
650cdf0e10cSrcweir 
651cdf0e10cSrcweir // -----------------------------------------------------------------------
652cdf0e10cSrcweir 
653cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::IsModified() const
654cdf0e10cSrcweir {
655cdf0e10cSrcweir 	return sm_pSingleImplConfig->IsModified();
656cdf0e10cSrcweir }
657cdf0e10cSrcweir void SvtAccessibilityOptions::Commit()
658cdf0e10cSrcweir {
659cdf0e10cSrcweir 	//sm_pSingleImplConfig->Commit();
660cdf0e10cSrcweir }
661cdf0e10cSrcweir 
662cdf0e10cSrcweir // -----------------------------------------------------------------------
663cdf0e10cSrcweir 
664cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsForDrawings() const
665cdf0e10cSrcweir {
666cdf0e10cSrcweir 	DBG_ERROR( "SvtAccessibilityOptions::GetIsForDrawings: is obsolete!" );
667cdf0e10cSrcweir     return sal_False;
668cdf0e10cSrcweir }
669cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsForBorders() const
670cdf0e10cSrcweir {
671cdf0e10cSrcweir 	DBG_ERROR( "SvtAccessibilityOptions::GetIsForBorders: is obsolete!" );
672cdf0e10cSrcweir     return sal_False;
673cdf0e10cSrcweir }
674cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetAutoDetectSystemHC() const
675cdf0e10cSrcweir {
676cdf0e10cSrcweir 	return sm_pSingleImplConfig->GetAutoDetectSystemHC();
677cdf0e10cSrcweir }
678cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsForPagePreviews() const
679cdf0e10cSrcweir {
680cdf0e10cSrcweir 	return sm_pSingleImplConfig->GetIsForPagePreviews();
681cdf0e10cSrcweir }
682cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsHelpTipsDisappear() const
683cdf0e10cSrcweir {
684cdf0e10cSrcweir 	return sm_pSingleImplConfig->GetIsHelpTipsDisappear();
685cdf0e10cSrcweir }
686cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsAllowAnimatedGraphics() const
687cdf0e10cSrcweir {
688cdf0e10cSrcweir 	return sm_pSingleImplConfig->GetIsAllowAnimatedGraphics();
689cdf0e10cSrcweir }
690cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsAllowAnimatedText() const
691cdf0e10cSrcweir {
692cdf0e10cSrcweir 	return sm_pSingleImplConfig->GetIsAllowAnimatedText();
693cdf0e10cSrcweir }
694cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsAutomaticFontColor() const
695cdf0e10cSrcweir {
696cdf0e10cSrcweir 	return sm_pSingleImplConfig->GetIsAutomaticFontColor();
697cdf0e10cSrcweir }
698cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::GetIsSystemFont() const
699cdf0e10cSrcweir {
700cdf0e10cSrcweir 	return sm_pSingleImplConfig->GetIsSystemFont();
701cdf0e10cSrcweir }
702cdf0e10cSrcweir sal_Int16 SvtAccessibilityOptions::GetHelpTipSeconds() const
703cdf0e10cSrcweir {
704cdf0e10cSrcweir 	return sm_pSingleImplConfig->GetHelpTipSeconds();
705cdf0e10cSrcweir }
706cdf0e10cSrcweir sal_Bool SvtAccessibilityOptions::IsSelectionInReadonly() const
707cdf0e10cSrcweir {
708cdf0e10cSrcweir 	return sm_pSingleImplConfig->IsSelectionInReadonly();
709cdf0e10cSrcweir }
710ca6f8f21SArmin Le Grand sal_Int16 SvtAccessibilityOptions::GetEdgeBlending() const
711ca6f8f21SArmin Le Grand {
712ca6f8f21SArmin Le Grand     return sm_pSingleImplConfig->GetEdgeBlending();
713ca6f8f21SArmin Le Grand }
714*a68b38dfSArmin Le Grand sal_Int16 SvtAccessibilityOptions::GetListBoxMaximumLineCount() const
715*a68b38dfSArmin Le Grand {
716*a68b38dfSArmin Le Grand     return sm_pSingleImplConfig->GetListBoxMaximumLineCount();
717*a68b38dfSArmin Le Grand }
718ca6f8f21SArmin Le Grand 
719cdf0e10cSrcweir // -----------------------------------------------------------------------
720cdf0e10cSrcweir void SvtAccessibilityOptions::SetAutoDetectSystemHC(sal_Bool bSet)
721cdf0e10cSrcweir {
722cdf0e10cSrcweir 	sm_pSingleImplConfig->SetAutoDetectSystemHC(bSet);
723cdf0e10cSrcweir }
724cdf0e10cSrcweir void SvtAccessibilityOptions::SetIsForPagePreviews(sal_Bool bSet)
725cdf0e10cSrcweir {
726cdf0e10cSrcweir 	sm_pSingleImplConfig->SetIsForPagePreviews(bSet);
727cdf0e10cSrcweir }
728cdf0e10cSrcweir void SvtAccessibilityOptions::SetIsHelpTipsDisappear(sal_Bool bSet)
729cdf0e10cSrcweir {
730cdf0e10cSrcweir 	sm_pSingleImplConfig->SetIsHelpTipsDisappear(bSet);
731cdf0e10cSrcweir }
732cdf0e10cSrcweir void SvtAccessibilityOptions::SetIsAllowAnimatedGraphics(sal_Bool bSet)
733cdf0e10cSrcweir {
734cdf0e10cSrcweir 	sm_pSingleImplConfig->SetIsAllowAnimatedGraphics(bSet);
735cdf0e10cSrcweir }
736cdf0e10cSrcweir void SvtAccessibilityOptions::SetIsAllowAnimatedText(sal_Bool bSet)
737cdf0e10cSrcweir {
738cdf0e10cSrcweir 	sm_pSingleImplConfig->SetIsAllowAnimatedText(bSet);
739cdf0e10cSrcweir }
740cdf0e10cSrcweir void SvtAccessibilityOptions::SetIsAutomaticFontColor(sal_Bool bSet)
741cdf0e10cSrcweir {
742cdf0e10cSrcweir 	sm_pSingleImplConfig->SetIsAutomaticFontColor(bSet);
743cdf0e10cSrcweir }
744cdf0e10cSrcweir void SvtAccessibilityOptions::SetIsSystemFont(sal_Bool bSet)
745cdf0e10cSrcweir {
746cdf0e10cSrcweir 	sm_pSingleImplConfig->SetIsSystemFont(bSet);
747cdf0e10cSrcweir }
748cdf0e10cSrcweir void SvtAccessibilityOptions::SetHelpTipSeconds(sal_Int16 nSet)
749cdf0e10cSrcweir {
750cdf0e10cSrcweir 	sm_pSingleImplConfig->SetHelpTipSeconds(nSet);
751cdf0e10cSrcweir }
752cdf0e10cSrcweir void SvtAccessibilityOptions::SetSelectionInReadonly(sal_Bool bSet)
753cdf0e10cSrcweir {
754cdf0e10cSrcweir 	sm_pSingleImplConfig->SetSelectionInReadonly(bSet);
755cdf0e10cSrcweir }
756cdf0e10cSrcweir void SvtAccessibilityOptions::SetVCLSettings()
757cdf0e10cSrcweir {
758cdf0e10cSrcweir 	sm_pSingleImplConfig->SetVCLSettings();
759cdf0e10cSrcweir }
760ca6f8f21SArmin Le Grand void SvtAccessibilityOptions::SetEdgeBlending(sal_Int16 nSet)
761ca6f8f21SArmin Le Grand {
762ca6f8f21SArmin Le Grand     sm_pSingleImplConfig->SetEdgeBlending(nSet);
763ca6f8f21SArmin Le Grand }
764*a68b38dfSArmin Le Grand void SvtAccessibilityOptions::SetListBoxMaximumLineCount(sal_Int16 nSet)
765*a68b38dfSArmin Le Grand {
766*a68b38dfSArmin Le Grand     sm_pSingleImplConfig->SetListBoxMaximumLineCount(nSet);
767*a68b38dfSArmin Le Grand }
768cdf0e10cSrcweir // -----------------------------------------------------------------------
769