cui/source/options/optgdlg.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit db59ba7360507db722bcec5f0a4fb93017d379b0
Author:     Balazs Varga <balazs.varga.ext...@allotropia.de>
AuthorDate: Tue Feb 25 15:08:43 2025 +0100
Commit:     Balazs Varga <balazs.varga.ext...@allotropia.de>
CommitDate: Tue Feb 25 19:43:36 2025 +0100

    tdf#165443 fix Locked config of ForceSafeServiceImpl ignored for SKIA
    
    "Use hardware acceleration" should always be insensitive in case
    of readonly config key.
    
    Change-Id: I42476c167bed11ae5f2c98a68334daf8083402e9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182177
    Tested-by: Jenkins
    Reviewed-by: Balazs Varga <balazs.varga.ext...@allotropia.de>

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 47e125e2d1a0..e50c71b998df 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1062,11 +1062,12 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
 void OfaViewTabPage::UpdateHardwareAccelStatus()
 {
     // #i95644# HW accel (unified to disable mechanism)
+    bool bHardwareAccRO = pCanvasSettings->IsHardwareAccelerationRO();
     if(pCanvasSettings->IsHardwareAccelerationAvailable())
     {
         
m_xUseHardwareAccell->set_active(pCanvasSettings->IsHardwareAccelerationEnabled());
-        
m_xUseHardwareAccell->set_sensitive(!pCanvasSettings->IsHardwareAccelerationRO());
-        
m_xUseHardwareAccellImg->set_visible(pCanvasSettings->IsHardwareAccelerationRO());
+        m_xUseHardwareAccell->set_sensitive(!bHardwareAccRO);
+        m_xUseHardwareAccellImg->set_visible(bHardwareAccRO);
     }
     else
     {
@@ -1075,7 +1076,7 @@ void OfaViewTabPage::UpdateHardwareAccelStatus()
         m_xUseHardwareAccellImg->set_visible(true);
     }
 #if HAVE_FEATURE_SKIA
-    m_xUseHardwareAccell->set_sensitive(!m_xUseSkia->get_active());
+    m_xUseHardwareAccell->set_sensitive(!bHardwareAccRO && 
!m_xUseSkia->get_active());
 #endif
 }
 

Reply via email to