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