accessibilityoptions.cxx (a68b38df) | accessibilityoptions.cxx (e2020f46) |
---|---|
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 --- 74 unchanged lines hidden (view full) --- 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; | 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 --- 74 unchanged lines hidden (view full) --- 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 sal_Int16 GetColorValueSetColumnCount() 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); | 92 93 void SetAutoDetectSystemHC(sal_Bool bSet); 94 void SetIsForPagePreviews(sal_Bool bSet); 95 void SetIsHelpTipsDisappear(sal_Bool bSet); 96 void SetIsAllowAnimatedGraphics(sal_Bool bSet); 97 void SetIsAllowAnimatedText(sal_Bool bSet); 98 void SetIsAutomaticFontColor(sal_Bool bSet); 99 void SetIsSystemFont(sal_Bool bSet); 100 void SetHelpTipSeconds(sal_Int16 nSet); 101 void SetSelectionInReadonly(sal_Bool bSet); 102 void SetEdgeBlending(sal_Int16 nSet); 103 void SetListBoxMaximumLineCount(sal_Int16 nSet); |
104 void SetColorValueSetColumnCount(sal_Int16 nSet); |
|
103 104 sal_Bool IsModified() const { return bIsModified; }; 105}; 106 107// initialization of static members -------------------------------------- 108 109SvtAccessibilityOptions_Impl* volatile SvtAccessibilityOptions::sm_pSingleImplConfig =NULL; 110sal_Int32 volatile SvtAccessibilityOptions::sm_nAccessibilityRefCount(0); --- 224 unchanged lines hidden (view full) --- 335 catch(const css::uno::Exception& ex) 336 { 337 LogHelper::logIt(ex); 338 } 339 340 return nRet; 341} 342 | 105 106 sal_Bool IsModified() const { return bIsModified; }; 107}; 108 109// initialization of static members -------------------------------------- 110 111SvtAccessibilityOptions_Impl* volatile SvtAccessibilityOptions::sm_pSingleImplConfig =NULL; 112sal_Int32 volatile SvtAccessibilityOptions::sm_nAccessibilityRefCount(0); --- 224 unchanged lines hidden (view full) --- 337 catch(const css::uno::Exception& ex) 338 { 339 LogHelper::logIt(ex); 340 } 341 342 return nRet; 343} 344 |
345sal_Int16 SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() const 346{ 347 css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); 348 sal_Int16 nRet = 12; 349 350 try 351 { 352 if(xNode.is()) 353 xNode->getPropertyValue(s_sColorValueSetColumnCount) >>= nRet; 354 } 355 catch(const css::uno::Exception& ex) 356 { 357 LogHelper::logIt(ex); 358 } 359 360 return nRet; 361} 362 |
|
343void 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 { --- 200 unchanged lines hidden (view full) --- 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 | 363void SvtAccessibilityOptions_Impl::SetAutoDetectSystemHC(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_sAutoDetectSystemHC)!=bSet) 370 { --- 200 unchanged lines hidden (view full) --- 571 const sal_uInt16 nMaxLineCountB(static_cast< sal_uInt16 >(nMaxLineCountA >= 0 ? nMaxLineCountA : 0)); 572 573 if(aStyleSettings.GetListBoxMaximumLineCount() != nMaxLineCountB) 574 { 575 aStyleSettings.SetListBoxMaximumLineCount(nMaxLineCountB); 576 StyleSettingsChanged = true; 577 } 578 |
579 const sal_Int16 nMaxColumnCountA(GetColorValueSetColumnCount()); 580 OSL_ENSURE(nMaxColumnCountA >= 0, "OOps, negative values for ColorValueSetColumnCount are not allowed (!)"); 581 const sal_uInt16 nMaxColumnCountB(static_cast< sal_uInt16 >(nMaxColumnCountA >= 0 ? nMaxColumnCountA : 0)); 582 583 if(aStyleSettings.GetColorValueSetColumnCount() != nMaxColumnCountB) 584 { 585 aStyleSettings.SetColorValueSetColumnCount(nMaxColumnCountB); 586 StyleSettingsChanged = true; 587 } 588 |
|
559 if(StyleSettingsChanged) 560 { 561 aAllSettings.SetStyleSettings(aStyleSettings); 562 Application::MergeSystemSettings(aAllSettings); 563 } 564 565 Application::SetSettings(aAllSettings); 566} --- 33 unchanged lines hidden (view full) --- 600 } 601 } 602 catch(const css::uno::Exception& ex) 603 { 604 LogHelper::logIt(ex); 605 } 606} 607 | 589 if(StyleSettingsChanged) 590 { 591 aAllSettings.SetStyleSettings(aStyleSettings); 592 Application::MergeSystemSettings(aAllSettings); 593 } 594 595 Application::SetSettings(aAllSettings); 596} --- 33 unchanged lines hidden (view full) --- 630 } 631 } 632 catch(const css::uno::Exception& ex) 633 { 634 LogHelper::logIt(ex); 635 } 636} 637 |
638void SvtAccessibilityOptions_Impl::SetColorValueSetColumnCount(sal_Int16 nSet) 639{ 640 css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); 641 642 try 643 { 644 if(xNode.is() && xNode->getPropertyValue(s_sColorValueSetColumnCount)!=nSet) 645 { 646 xNode->setPropertyValue(s_sColorValueSetColumnCount, css::uno::makeAny(nSet)); 647 ::comphelper::ConfigurationHelper::flush(m_xCfg); 648 649 bIsModified = sal_True; 650 } 651 } 652 catch(const css::uno::Exception& ex) 653 { 654 LogHelper::logIt(ex); 655 } 656} 657 |
|
608// ----------------------------------------------------------------------- 609// class SvtAccessibilityOptions -------------------------------------------------- 610 611SvtAccessibilityOptions::SvtAccessibilityOptions() 612{ 613 { 614 ::osl::MutexGuard aGuard( SingletonMutex::get() ); 615 if(!sm_pSingleImplConfig) --- 94 unchanged lines hidden (view full) --- 710sal_Int16 SvtAccessibilityOptions::GetEdgeBlending() const 711{ 712 return sm_pSingleImplConfig->GetEdgeBlending(); 713} 714sal_Int16 SvtAccessibilityOptions::GetListBoxMaximumLineCount() const 715{ 716 return sm_pSingleImplConfig->GetListBoxMaximumLineCount(); 717} | 658// ----------------------------------------------------------------------- 659// class SvtAccessibilityOptions -------------------------------------------------- 660 661SvtAccessibilityOptions::SvtAccessibilityOptions() 662{ 663 { 664 ::osl::MutexGuard aGuard( SingletonMutex::get() ); 665 if(!sm_pSingleImplConfig) --- 94 unchanged lines hidden (view full) --- 760sal_Int16 SvtAccessibilityOptions::GetEdgeBlending() const 761{ 762 return sm_pSingleImplConfig->GetEdgeBlending(); 763} 764sal_Int16 SvtAccessibilityOptions::GetListBoxMaximumLineCount() const 765{ 766 return sm_pSingleImplConfig->GetListBoxMaximumLineCount(); 767} |
768sal_Int16 SvtAccessibilityOptions::GetColorValueSetColumnCount() const 769{ 770 return sm_pSingleImplConfig->GetColorValueSetColumnCount(); 771} |
|
718 719// ----------------------------------------------------------------------- 720void SvtAccessibilityOptions::SetAutoDetectSystemHC(sal_Bool bSet) 721{ 722 sm_pSingleImplConfig->SetAutoDetectSystemHC(bSet); 723} 724void SvtAccessibilityOptions::SetIsForPagePreviews(sal_Bool bSet) 725{ --- 34 unchanged lines hidden (view full) --- 760void SvtAccessibilityOptions::SetEdgeBlending(sal_Int16 nSet) 761{ 762 sm_pSingleImplConfig->SetEdgeBlending(nSet); 763} 764void SvtAccessibilityOptions::SetListBoxMaximumLineCount(sal_Int16 nSet) 765{ 766 sm_pSingleImplConfig->SetListBoxMaximumLineCount(nSet); 767} | 772 773// ----------------------------------------------------------------------- 774void SvtAccessibilityOptions::SetAutoDetectSystemHC(sal_Bool bSet) 775{ 776 sm_pSingleImplConfig->SetAutoDetectSystemHC(bSet); 777} 778void SvtAccessibilityOptions::SetIsForPagePreviews(sal_Bool bSet) 779{ --- 34 unchanged lines hidden (view full) --- 814void SvtAccessibilityOptions::SetEdgeBlending(sal_Int16 nSet) 815{ 816 sm_pSingleImplConfig->SetEdgeBlending(nSet); 817} 818void SvtAccessibilityOptions::SetListBoxMaximumLineCount(sal_Int16 nSet) 819{ 820 sm_pSingleImplConfig->SetListBoxMaximumLineCount(nSet); 821} |
822void SvtAccessibilityOptions::SetColorValueSetColumnCount(sal_Int16 nSet) 823{ 824 sm_pSingleImplConfig->SetColorValueSetColumnCount(nSet); 825} 826 |
|
768// ----------------------------------------------------------------------- | 827// ----------------------------------------------------------------------- |