desktop/source/app/app.cxx                         |    3 
 include/svtools/accessibilityoptions.hxx           |   12 
 sc/source/ui/view/output.cxx                       |    2 
 sd/source/ui/annotations/annotationwindow.cxx      |    5 
 sd/source/ui/view/outlview.cxx                     |    3 
 svtools/source/config/accessibilityoptions.cxx     |  264 +++------------------
 svx/source/sdr/contact/objectcontactofpageview.cxx |    8 
 svx/source/svdraw/svdedxv.cxx                      |    3 
 sw/inc/view.hxx                                    |    2 
 sw/inc/viewsh.hxx                                  |    2 
 sw/source/core/view/viewsh.cxx                     |    8 
 sw/source/uibase/app/apphdl.cxx                    |    4 
 sw/source/uibase/config/viewopt.cxx                |    2 
 sw/source/uibase/inc/pview.hxx                     |    2 
 sw/source/uibase/uiview/pview.cxx                  |    6 
 sw/source/uibase/uiview/view.cxx                   |    2 
 sw/source/uibase/uiview/view0.cxx                  |    5 
 17 files changed, 73 insertions(+), 260 deletions(-)

New commits:
commit 1527fa8435ef415678b2e4a6972f5e378ee5cab1
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Jun 6 11:20:17 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Jun 6 19:32:38 2023 +0200

    convert SvtAccessibilityOptions to officecfg where possible
    
    Change-Id: Ia530086fe35e64379e55135d392020304b466325
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152649
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 4e3daca9893b..c0b30c2ae2fd 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1528,8 +1528,7 @@ int Desktop::Main()
 
     SvtTabAppearanceCfg::SetInitialized();
     SvtTabAppearanceCfg::SetApplicationDefaults( this );
-    SvtAccessibilityOptions aOptions;
-    aOptions.SetVCLSettings();
+    SvtAccessibilityOptions::SetVCLSettings();
     SetSplashScreenProgress(60);
 
     if ( !pExecGlobals->bRestartRequested )
diff --git a/include/svtools/accessibilityoptions.hxx 
b/include/svtools/accessibilityoptions.hxx
index 2733cfa0e7ee..cb4596228bee 100644
--- a/include/svtools/accessibilityoptions.hxx
+++ b/include/svtools/accessibilityoptions.hxx
@@ -23,7 +23,7 @@
 
 class SvtAccessibilityOptions_Impl;
 
-class SVT_DLLPUBLIC SvtAccessibilityOptions final :
+class SAL_WARN_UNUSED SVT_DLLPUBLIC SvtAccessibilityOptions final :
     public utl::detail::Options
 {
 private:
@@ -35,12 +35,12 @@ public:
     virtual ~SvtAccessibilityOptions() override;
 
     // get & set config entries
-    bool        GetIsAllowAnimatedGraphics() const;
-    bool        GetIsAllowAnimatedText() const;
-    bool        GetIsAutomaticFontColor() const;
-    bool        IsSelectionInReadonly() const;
+    static bool GetIsAllowAnimatedGraphics();
+    static bool GetIsAllowAnimatedText();
+    static bool GetIsAutomaticFontColor();
+    static bool IsSelectionInReadonly();
 
-    void        SetVCLSettings();
+    static void SetVCLSettings();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 8608817b6099..c43a903484cd 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -169,7 +169,7 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, 
ScOutputType eNewType,
     bPagebreakMode( false ),
     bSolidBackground( false ),
     mbUseStyleColor( false ),
-    mbForceAutoColor( SC_MOD()->GetAccessOptions().GetIsAutomaticFontColor() ),
+    mbForceAutoColor( SvtAccessibilityOptions::GetIsAutomaticFontColor() ),
     mbSyntaxMode( false ),
     aGridColor( COL_BLACK ),
     mbShowNullValues( true ),
diff --git a/sd/source/ui/annotations/annotationwindow.cxx 
b/sd/source/ui/annotations/annotationwindow.cxx
index bc6304529e43..a5ab1eb0b784 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -550,10 +550,7 @@ void AnnotationWindow::SetColor()
         maColorLight = AnnotationManagerImpl::GetColorLight( nAuthorIdx );
     }
 
-    {
-        SvtAccessibilityOptions aOptions;
-        mpOutliner->ForceAutoColor( bHighContrast || 
aOptions.GetIsAutomaticFontColor() );
-    }
+    mpOutliner->ForceAutoColor( bHighContrast || 
SvtAccessibilityOptions::GetIsAutomaticFontColor() );
 
     mxPopover->set_background(maColor);
     mxMenuButton->set_background(maColor);
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 4ddc3be230bd..8ce0a5dcb874 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -154,8 +154,7 @@ OutlineView::~OutlineView()
         EEControlBits nCntrl = mrOutliner.GetControlWord();
         mrOutliner.SetUpdateLayout(false); // otherwise there will be drawn on 
SetControlWord
         mrOutliner.SetControlWord(nCntrl & ~EEControlBits::NOCOLORS);
-        SvtAccessibilityOptions aOptions;
-        mrOutliner.ForceAutoColor( aOptions.GetIsAutomaticFontColor() );
+        mrOutliner.ForceAutoColor( 
SvtAccessibilityOptions::GetIsAutomaticFontColor() );
         mrOutliner.Clear();
     }
 }
diff --git a/svtools/source/config/accessibilityoptions.cxx 
b/svtools/source/config/accessibilityoptions.cxx
index f10be38bed2f..1afe6113f297 100644
--- a/svtools/source/config/accessibilityoptions.cxx
+++ b/svtools/source/config/accessibilityoptions.cxx
@@ -31,6 +31,8 @@
 #include <vcl/settings.hxx>
 #include <vcl/svapp.hxx>
 #include <comphelper/diagnose_ex.hxx>
+#include <officecfg/Office/Common.hxx>
+
 #include <mutex>
 
 #include "itemholder2.hxx"
@@ -50,18 +52,6 @@ private:
 
 public:
     SvtAccessibilityOptions_Impl();
-
-    void        SetVCLSettings();
-    bool        GetIsHelpTipsDisappear() const;
-    bool        GetIsAllowAnimatedGraphics() const;
-    bool        GetIsAllowAnimatedText() const;
-    bool        GetIsAutomaticFontColor() const;
-    sal_Int16   GetHelpTipSeconds() const;
-    bool        IsSelectionInReadonly() const;
-    sal_Int16   GetEdgeBlending() const;
-    sal_Int16   GetListBoxMaximumLineCount() const;
-    sal_Int16   GetColorValueSetColumnCount() const;
-    bool        GetPreviewUsesCheckeredBackground() const;
 };
 
 // initialization of static members --------------------------------------
@@ -100,222 +90,63 @@ 
SvtAccessibilityOptions_Impl::SvtAccessibilityOptions_Impl()
     }
 }
 
-bool SvtAccessibilityOptions_Impl::GetIsHelpTipsDisappear() const
-{
-    bool                                            bRet = true;
-
-    try
-    {
-        if(m_xNode.is())
-            m_xNode->getPropertyValue("IsHelpTipsDisappear") >>= bRet;
-    }
-    catch(const css::uno::Exception&)
-    {
-        DBG_UNHANDLED_EXCEPTION("svtools.config");
-    }
-
-    return bRet;
-}
-
-bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedGraphics() const
-{
-    bool                                            bRet = true;
-
-    try
-    {
-        if(m_xNode.is())
-            m_xNode->getPropertyValue("IsAllowAnimatedGraphics") >>= bRet;
-    }
-    catch(const css::uno::Exception&)
-    {
-        DBG_UNHANDLED_EXCEPTION("svtools.config");
-    }
-
-    return bRet;
-}
-
-bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedText() const
-{
-    bool                                            bRet = true;
-
-    try
-    {
-        static constexpr OUStringLiteral PROPNAME = u"IsAllowAnimatedText";
-        if(m_xNode.is())
-            m_xNode->getPropertyValue(PROPNAME) >>= bRet;
-    }
-    catch(const css::uno::Exception&)
-    {
-        DBG_UNHANDLED_EXCEPTION("svtools.config");
-    }
-
-    return bRet;
-}
-
-bool SvtAccessibilityOptions_Impl::GetIsAutomaticFontColor() const
-{
-    bool                                            bRet = false;
-
-    try
-    {
-        if(m_xNode.is())
-            m_xNode->getPropertyValue("IsAutomaticFontColor") >>= bRet;
-    }
-    catch(const css::uno::Exception&)
-    {
-        DBG_UNHANDLED_EXCEPTION("svtools.config");
-    }
-
-    return bRet;
-}
-
-sal_Int16 SvtAccessibilityOptions_Impl::GetHelpTipSeconds() const
-{
-    sal_Int16                                       nRet = 4;
-
-    try
-    {
-        if(m_xNode.is())
-            m_xNode->getPropertyValue("HelpTipSeconds") >>= nRet;
-    }
-    catch(const css::uno::Exception&)
-    {
-        DBG_UNHANDLED_EXCEPTION("svtools.config");
-    }
-
-    return nRet;
-}
-
-bool SvtAccessibilityOptions_Impl::IsSelectionInReadonly() const
-{
-    bool                                            bRet = false;
-
-    try
-    {
-        if(m_xNode.is())
-            m_xNode->getPropertyValue("IsSelectionInReadonly") >>= bRet;
-    }
-    catch(const css::uno::Exception&)
-    {
-        DBG_UNHANDLED_EXCEPTION("svtools.config");
-    }
-
-    return bRet;
-}
-
-sal_Int16 SvtAccessibilityOptions_Impl::GetEdgeBlending() const
-{
-    sal_Int16 nRet = 35;
-
-    try
-    {
-        if(m_xNode.is())
-            m_xNode->getPropertyValue("EdgeBlending") >>= nRet;
-    }
-    catch(const css::uno::Exception&)
-    {
-        DBG_UNHANDLED_EXCEPTION("svtools.config");
-    }
-
-    return nRet;
-}
-
-sal_Int16 SvtAccessibilityOptions_Impl::GetListBoxMaximumLineCount() const
-{
-    sal_Int16 nRet = 25;
-
-    try
-    {
-        if(m_xNode.is())
-            m_xNode->getPropertyValue("ListBoxMaximumLineCount") >>= nRet;
-    }
-    catch(const css::uno::Exception&)
-    {
-        DBG_UNHANDLED_EXCEPTION("svtools.config");
-    }
-
-    return nRet;
-}
-
-sal_Int16 SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() const
-{
-#ifdef IOS
-    return 4;
-#else
-    sal_Int16 nRet = 12;
-
-    try
-    {
-        if(m_xNode.is())
-            m_xNode->getPropertyValue("ColorValueSetColumnCount") >>= nRet;
-    }
-    catch(const css::uno::Exception&)
-    {
-        DBG_UNHANDLED_EXCEPTION("svtools.config");
-    }
-
-    return nRet;
-#endif
-}
-
-bool SvtAccessibilityOptions_Impl::GetPreviewUsesCheckeredBackground() const
-{
-    bool bRet = false;
-
-    try
-    {
-        if(m_xNode.is())
-            m_xNode->getPropertyValue("PreviewUsesCheckeredBackground") >>= 
bRet;
-    }
-    catch(const css::uno::Exception&)
-    {
-        DBG_UNHANDLED_EXCEPTION("svtools.config");
-    }
-
-    return bRet;
-}
-
-void SvtAccessibilityOptions_Impl::SetVCLSettings()
+void SvtAccessibilityOptions::SetVCLSettings()
 {
     AllSettings aAllSettings(Application::GetSettings());
     StyleSettings aStyleSettings(aAllSettings.GetStyleSettings());
     HelpSettings aHelpSettings(aAllSettings.GetHelpSettings());
     bool StyleSettingsChanged(false);
 
-    aHelpSettings.SetTipTimeout( GetIsHelpTipsDisappear() ? 
GetHelpTipSeconds() * 1000 : HELP_TIP_TIMEOUT);
+    bool bHelpTipsDisappear = 
officecfg::Office::Common::Accessibility::IsHelpTipsDisappear::get();
+    sal_Int16 nHelpTipSeconds = 
officecfg::Office::Common::Accessibility::HelpTipSeconds::get();
+    aHelpSettings.SetTipTimeout( bHelpTipsDisappear ? nHelpTipSeconds * 1000 : 
HELP_TIP_TIMEOUT);
     aAllSettings.SetHelpSettings(aHelpSettings);
 
-    const sal_Int16 nEdgeBlendingCountA(GetEdgeBlending());
-    OSL_ENSURE(nEdgeBlendingCountA >= 0, "OOps, negative values for 
EdgeBlending are not allowed (!)");
-    const sal_uInt16 nEdgeBlendingCountB(static_cast< sal_uInt16 
>(nEdgeBlendingCountA >= 0 ? nEdgeBlendingCountA : 0));
+    std::optional<sal_Int16> 
nEdgeBlendingCount(officecfg::Office::Common::Accessibility::EdgeBlending::get());
+    if (!nEdgeBlendingCount)
+        nEdgeBlendingCount = 35;
+    OSL_ENSURE(*nEdgeBlendingCount >= 0, "OOps, negative values for 
EdgeBlending are not allowed (!)");
+    if (*nEdgeBlendingCount < 0)
+        nEdgeBlendingCount = 0;
 
-    if(aStyleSettings.GetEdgeBlending() != nEdgeBlendingCountB)
+    if(aStyleSettings.GetEdgeBlending() != *nEdgeBlendingCount)
     {
-        aStyleSettings.SetEdgeBlending(nEdgeBlendingCountB);
+        aStyleSettings.SetEdgeBlending(*nEdgeBlendingCount);
         StyleSettingsChanged = true;
     }
 
-    const sal_Int16 nMaxLineCountA(GetListBoxMaximumLineCount());
-    OSL_ENSURE(nMaxLineCountA >= 0, "OOps, negative values for 
ListBoxMaximumLineCount are not allowed (!)");
-    const sal_uInt16 nMaxLineCountB(static_cast< sal_uInt16 >(nMaxLineCountA 
>= 0 ? nMaxLineCountA : 0));
+    std::optional<sal_Int16> 
nMaxLineCount(officecfg::Office::Common::Accessibility::ListBoxMaximumLineCount::get());
+    if (!nMaxLineCount)
+        nMaxLineCount = 25;
+    OSL_ENSURE(*nMaxLineCount >= 0, "OOps, negative values for 
ListBoxMaximumLineCount are not allowed (!)");
+    if (*nMaxLineCount < 0)
+        nMaxLineCount = 0;
 
-    if(aStyleSettings.GetListBoxMaximumLineCount() != nMaxLineCountB)
+    if(aStyleSettings.GetListBoxMaximumLineCount() != *nMaxLineCount)
     {
-        aStyleSettings.SetListBoxMaximumLineCount(nMaxLineCountB);
+        aStyleSettings.SetListBoxMaximumLineCount(*nMaxLineCount);
         StyleSettingsChanged = true;
     }
 
-    const sal_Int16 nMaxColumnCountA(GetColorValueSetColumnCount());
-    OSL_ENSURE(nMaxColumnCountA >= 0, "OOps, negative values for 
ColorValueSetColumnCount are not allowed (!)");
-    const sal_uInt16 nMaxColumnCountB(static_cast< sal_uInt16 
>(nMaxColumnCountA >= 0 ? nMaxColumnCountA : 0));
+#ifdef IOS
+    std::optional<sal_Int16> nMaxColumnCount = 4;
+#else
+    std::optional<sal_Int16> 
nMaxColumnCount(officecfg::Office::Common::Accessibility::ColorValueSetColumnCount::get());
+    if (!nMaxColumnCount)
+        nMaxColumnCount = 12;
+#endif
+
+    OSL_ENSURE(*nMaxColumnCount >= 0, "OOps, negative values for 
ColorValueSetColumnCount are not allowed (!)");
+    if (*nMaxColumnCount < 0)
+        nMaxColumnCount = 0;
 
-    if(aStyleSettings.GetColorValueSetColumnCount() != nMaxColumnCountB)
+    if(aStyleSettings.GetColorValueSetColumnCount() != *nMaxColumnCount)
     {
-        aStyleSettings.SetColorValueSetColumnCount(nMaxColumnCountB);
+        aStyleSettings.SetColorValueSetColumnCount(*nMaxColumnCount);
         StyleSettingsChanged = true;
     }
 
-    const bool 
bPreviewUsesCheckeredBackground(GetPreviewUsesCheckeredBackground());
+    const bool 
bPreviewUsesCheckeredBackground(officecfg::Office::Common::Accessibility::PreviewUsesCheckeredBackground::get());
 
     if(aStyleSettings.GetPreviewUsesCheckeredBackground() != 
bPreviewUsesCheckeredBackground)
     {
@@ -362,28 +193,21 @@ SvtAccessibilityOptions::~SvtAccessibilityOptions()
         sm_pSingleImplConfig = nullptr;
     }
 }
-
-bool SvtAccessibilityOptions::GetIsAllowAnimatedGraphics() const
-{
-    return sm_pSingleImplConfig->GetIsAllowAnimatedGraphics();
-}
-bool SvtAccessibilityOptions::GetIsAllowAnimatedText() const
+bool SvtAccessibilityOptions::GetIsAllowAnimatedGraphics()
 {
-    return sm_pSingleImplConfig->GetIsAllowAnimatedText();
+    return 
officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::get();
 }
-bool SvtAccessibilityOptions::GetIsAutomaticFontColor() const
+bool SvtAccessibilityOptions::GetIsAllowAnimatedText()
 {
-    return sm_pSingleImplConfig->GetIsAutomaticFontColor();
+    return 
officecfg::Office::Common::Accessibility::IsAllowAnimatedText::get();
 }
-bool SvtAccessibilityOptions::IsSelectionInReadonly() const
+bool SvtAccessibilityOptions::GetIsAutomaticFontColor()
 {
-    return sm_pSingleImplConfig->IsSelectionInReadonly();
+    return 
officecfg::Office::Common::Accessibility::IsAutomaticFontColor::get();
 }
-
-
-void SvtAccessibilityOptions::SetVCLSettings()
+bool SvtAccessibilityOptions::IsSelectionInReadonly()
 {
-    sm_pSingleImplConfig->SetVCLSettings();
+    return 
officecfg::Office::Common::Accessibility::IsSelectionInReadonly::get();
 }
 
 
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx 
b/svx/source/sdr/contact/objectcontactofpageview.cxx
index 26c295472e0b..ce0ca6463370 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -343,9 +343,7 @@ namespace sdr::contact
         {
             if (utl::ConfigManager::IsFuzzing())
                 return true;
-            SdrView& rView = GetPageWindow().GetPageView().GetView();
-            const SvtAccessibilityOptions& rOpt = 
rView.getAccessibilityOptions();
-            return rOpt.GetIsAllowAnimatedText();
+            return SvtAccessibilityOptions::GetIsAllowAnimatedText();
         }
 
         // check if graphic animation is allowed.
@@ -353,9 +351,7 @@ namespace sdr::contact
         {
             if (utl::ConfigManager::IsFuzzing())
                 return true;
-            SdrView& rView = GetPageWindow().GetPageView().GetView();
-            const SvtAccessibilityOptions& rOpt = 
rView.getAccessibilityOptions();
-            return rOpt.GetIsAllowAnimatedGraphics();
+            return SvtAccessibilityOptions::GetIsAllowAnimatedGraphics();
         }
 
         // print?
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 5a996b5721ed..ae19c26496f3 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1311,8 +1311,7 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, 
SdrPageView* pPV, vcl::W
                 = SdrMakeOutliner(OutlinerMode::TextObject, 
pObj->getSdrModelFromSdrObject());
 
         {
-            SvtAccessibilityOptions aOptions;
-            
mpTextEditOutliner->ForceAutoColor(aOptions.GetIsAutomaticFontColor());
+            
mpTextEditOutliner->ForceAutoColor(SvtAccessibilityOptions::GetIsAutomaticFontColor());
         }
 
         aOldCalcFieldValueLink = mpTextEditOutliner->GetCalcFieldValueHdl();
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index 89b5ad6f391b..301ed1a92bb8 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -618,7 +618,7 @@ public:
     // Enable mail merge - mail merge field dialog enabled
     void EnableMailMerge();
     //apply Accessibility options
-    void ApplyAccessibilityOptions(SvtAccessibilityOptions const & 
rAccessibilityOptions);
+    void ApplyAccessibilityOptions();
 
     SwView(SfxViewFrame& rFrame, SfxViewShell*);
     virtual ~SwView() override;
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index e54e294d2f0a..583b795a1b22 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -534,7 +534,7 @@ public:
     void InvalidateAccessibleFocus();
 
     // Apply Accessibility options.
-    void ApplyAccessibilityOptions(SvtAccessibilityOptions const & 
rAccessibilityOptions);
+    void ApplyAccessibilityOptions();
 
     /** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
 
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index b514990bfed3..20cd26c17fb3 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -2624,7 +2624,7 @@ SwAccessibleMap* SwViewShell::GetAccessibleMap()
     return nullptr;
 }
 
-void SwViewShell::ApplyAccessibilityOptions(SvtAccessibilityOptions const & 
rAccessibilityOptions)
+void SwViewShell::ApplyAccessibilityOptions()
 {
     if (utl::ConfigManager::IsFuzzing())
         return;
@@ -2635,12 +2635,12 @@ void 
SwViewShell::ApplyAccessibilityOptions(SvtAccessibilityOptions const & rAcc
     }
     else
     {
-        
mpAccOptions->SetAlwaysAutoColor(rAccessibilityOptions.GetIsAutomaticFontColor());
-        mpAccOptions->SetStopAnimatedGraphics(! 
rAccessibilityOptions.GetIsAllowAnimatedGraphics());
+        
mpAccOptions->SetAlwaysAutoColor(SvtAccessibilityOptions::GetIsAutomaticFontColor());
+        mpAccOptions->SetStopAnimatedGraphics(! 
SvtAccessibilityOptions::GetIsAllowAnimatedGraphics());
 
         // Form view
         // Always set this option, not only if document is read-only:
-        
mpOpt->SetSelectionInReadonly(rAccessibilityOptions.IsSelectionInReadonly());
+        
mpOpt->SetSelectionInReadonly(SvtAccessibilityOptions::IsSelectionInReadonly());
     }
 }
 #endif // ENABLE_WASM_STRIP_ACCESSIBILITY
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 674ea0d8b900..bd4cdbe28f0f 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -1019,9 +1019,9 @@ void SwModule::ConfigurationChanged( 
utl::ConfigurationBroadcaster* pBrdCst, Con
                 auto pPagePreview = dynamic_cast<SwPagePreview *>( pViewShell 
);
 
                 if(pSwView)
-                    
pSwView->ApplyAccessibilityOptions(*m_pAccessibilityOptions);
+                    pSwView->ApplyAccessibilityOptions();
                 else if(pPagePreview)
-                    
pPagePreview->ApplyAccessibilityOptions(*m_pAccessibilityOptions);
+                    pPagePreview->ApplyAccessibilityOptions();
 
                 if(pSwView || pPagePreview || dynamic_cast< const SwSrcView 
*>( pViewShell ) !=  nullptr)
                 {
diff --git a/sw/source/uibase/config/viewopt.cxx 
b/sw/source/uibase/config/viewopt.cxx
index 7e3d7674ab50..b907daf76f9d 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -283,7 +283,7 @@ SwViewOption::SwViewOption() :
     }
     m_nDivisionX = m_nDivisionY = 1;
 
-    m_bSelectionInReadonly = utl::ConfigManager::IsFuzzing() || 
SW_MOD()->GetAccessibilityOptions().IsSelectionInReadonly();
+    m_bSelectionInReadonly = utl::ConfigManager::IsFuzzing() || 
SvtAccessibilityOptions::IsSelectionInReadonly();
 
     m_bIdle = true;
 
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index 6a46814facd6..05e1a2a1c2c3 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -268,7 +268,7 @@ public:
     SwDocShell* GetDocShell();
 
     // apply Accessibility options
-    void ApplyAccessibilityOptions(SvtAccessibilityOptions const & 
rAccessibilityOptions);
+    void ApplyAccessibilityOptions();
 
     // Inline method to request values of new members
     // <mbResetFormDesignMode> and <mbFormDesignModeToReset>
diff --git a/sw/source/uibase/uiview/pview.cxx 
b/sw/source/uibase/uiview/pview.cxx
index 9df4a8828daf..0b03a001d033 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -1127,7 +1127,7 @@ void SwPagePreview::Init()
 
     GetViewShell()->ApplyViewOptions( aOpt );
 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
-    
GetViewShell()->ApplyAccessibilityOptions(SW_MOD()->GetAccessibilityOptions());
+    GetViewShell()->ApplyAccessibilityOptions();
 #endif
 
     // adjust view shell option to the same as for print
@@ -1840,9 +1840,9 @@ uno::Reference< css::accessibility::XAccessible >
     return GetAccessible( false );
 }
 
-void SwPagePreview::ApplyAccessibilityOptions(SvtAccessibilityOptions const & 
rAccessibilityOptions)
+void SwPagePreview::ApplyAccessibilityOptions()
 {
-    GetViewShell()->ApplyAccessibilityOptions(rAccessibilityOptions);
+    GetViewShell()->ApplyAccessibilityOptions();
 }
 
 void SwPagePreview::ShowHScrollbar(bool bShow)
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index dcd88c9e05d4..5e59d75ba043 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1011,7 +1011,7 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* 
pOldSh)
     m_pWrtShell->SetUIOptions( aUsrPref );
     m_pWrtShell->SetReadOnlyAvailable( aUsrPref.IsCursorInProtectedArea() );
 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
-    
m_pWrtShell->ApplyAccessibilityOptions(SW_MOD()->GetAccessibilityOptions());
+    m_pWrtShell->ApplyAccessibilityOptions();
 #endif
 
     if( m_pWrtShell->GetDoc()->getIDocumentState().IsUpdateExpField() )
diff --git a/sw/source/uibase/uiview/view0.cxx 
b/sw/source/uibase/uiview/view0.cxx
index 0a620a0a05e5..ecc718fa8aad 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -115,12 +115,11 @@ view::XSelectionSupplier* SwView::GetUNOObject()
     return m_pViewImpl->GetUNOObject();
 }
 
-void SwView::ApplyAccessibilityOptions(SvtAccessibilityOptions const & 
rAccessibilityOptions)
+void SwView::ApplyAccessibilityOptions()
 {
 #if ENABLE_WASM_STRIP_ACCESSIBILITY
-    (void)rAccessibilityOptions;
 #else
-    m_pWrtShell->ApplyAccessibilityOptions(rAccessibilityOptions);
+    m_pWrtShell->ApplyAccessibilityOptions();
     //to enable the right state of the selection cursor in readonly documents
     if(GetDocShell()->IsReadOnly())
         m_pWrtShell->ShowCursor();

Reply via email to