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