include/svtools/accessibilityoptions.hxx | 5 ----- sc/source/ui/view/output.cxx | 4 ++-- sd/source/ui/annotations/annotationwindow.cxx | 3 ++- sd/source/ui/view/outlview.cxx | 3 ++- svtools/source/config/accessibilityoptions.cxx | 16 ---------------- svx/source/sdr/contact/objectcontactofpageview.cxx | 5 +++-- svx/source/svdraw/svdedxv.cxx | 5 +++-- sw/source/core/view/viewsh.cxx | 7 +++---- sw/source/uibase/config/viewopt.cxx | 3 +-- 9 files changed, 16 insertions(+), 35 deletions(-)
New commits: commit ba12e22f28150ec00d55e4fb99838710a3973e57 Author: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> AuthorDate: Wed Dec 13 01:18:40 2023 +0100 Commit: Gabor Kelemen <kelem...@ubuntu.com> CommitDate: Sun Dec 24 12:14:58 2023 +0100 Drop some wrapper methods from SvtAccessibilityOptions just use the wrapped officecfg methods instead of: GetIsAllowAnimatedGraphics GetIsAllowAnimatedText GetIsAutomaticFontColor IsSelectionInReadonly Change-Id: I74de75fc9ff2f9a36ef376255e937bb373055587 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161236 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelem...@ubuntu.com> diff --git a/include/svtools/accessibilityoptions.hxx b/include/svtools/accessibilityoptions.hxx index cb4596228bee..6cebf4e005c9 100644 --- a/include/svtools/accessibilityoptions.hxx +++ b/include/svtools/accessibilityoptions.hxx @@ -35,11 +35,6 @@ public: virtual ~SvtAccessibilityOptions() override; // get & set config entries - static bool GetIsAllowAnimatedGraphics(); - static bool GetIsAllowAnimatedText(); - static bool GetIsAutomaticFontColor(); - static bool IsSelectionInReadonly(); - static void SetVCLSettings(); }; diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 7eeec493219c..be482d70d03e 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -26,11 +26,11 @@ #include <tools/poly.hxx> #include <vcl/svapp.hxx> #include <vcl/pdfextoutdevdata.hxx> -#include <svtools/accessibilityoptions.hxx> #include <svx/framelinkarray.hxx> #include <drawinglayer/geometry/viewinformation2d.hxx> #include <drawinglayer/processor2d/baseprocessor2d.hxx> #include <drawinglayer/processor2d/processor2dtools.hxx> +#include <officecfg/Office/Common.hxx> #include <vcl/lineinfo.hxx> #include <vcl/gradient.hxx> #include <vcl/settings.hxx> @@ -170,7 +170,7 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType, bPagebreakMode( false ), bSolidBackground( false ), mbUseStyleColor( false ), - mbForceAutoColor( SvtAccessibilityOptions::GetIsAutomaticFontColor() ), + mbForceAutoColor( officecfg::Office::Common::Accessibility::IsAutomaticFontColor::get() ), mbSyntaxMode( false ), aGridColor( COL_BLACK ), mbShowNullValues( true ), diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 02495794aefa..99a58a085376 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -29,6 +29,7 @@ #include <editeng/wghtitem.hxx> #include <editeng/crossedoutitem.hxx> #include <editeng/editund2.hxx> +#include <officecfg/Office/Common.hxx> #include <svx/svxids.hrc> #include <unotools/useroptions.hxx> @@ -551,7 +552,7 @@ void AnnotationWindow::SetColor() maColorLight = AnnotationManagerImpl::GetColorLight( nAuthorIdx ); } - mpOutliner->ForceAutoColor( bHighContrast || SvtAccessibilityOptions::GetIsAutomaticFontColor() ); + mpOutliner->ForceAutoColor( bHighContrast || officecfg::Office::Common::Accessibility::IsAutomaticFontColor::get() ); 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 d424f0117c27..087aa50ee86e 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -35,6 +35,7 @@ #include <editeng/editeng.hxx> #include <xmloff/autolayout.hxx> #include <tools/debug.hxx> +#include <officecfg/Office/Common.hxx> #include <editeng/editobj.hxx> #include <editeng/editund2.hxx> @@ -154,7 +155,7 @@ OutlineView::~OutlineView() EEControlBits nCntrl = mrOutliner.GetControlWord(); mrOutliner.SetUpdateLayout(false); // otherwise there will be drawn on SetControlWord mrOutliner.SetControlWord(nCntrl & ~EEControlBits::NOCOLORS); - mrOutliner.ForceAutoColor( SvtAccessibilityOptions::GetIsAutomaticFontColor() ); + mrOutliner.ForceAutoColor( officecfg::Office::Common::Accessibility::IsAutomaticFontColor::get() ); mrOutliner.Clear(); } } diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx index 460354cae319..877b0653335d 100644 --- a/svtools/source/config/accessibilityoptions.cxx +++ b/svtools/source/config/accessibilityoptions.cxx @@ -194,22 +194,6 @@ SvtAccessibilityOptions::~SvtAccessibilityOptions() sm_pSingleImplConfig = nullptr; } } -bool SvtAccessibilityOptions::GetIsAllowAnimatedGraphics() -{ - return officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::get(); -} -bool SvtAccessibilityOptions::GetIsAllowAnimatedText() -{ - return officecfg::Office::Common::Accessibility::IsAllowAnimatedText::get(); -} -bool SvtAccessibilityOptions::GetIsAutomaticFontColor() -{ - return officecfg::Office::Common::Accessibility::IsAutomaticFontColor::get(); -} -bool SvtAccessibilityOptions::IsSelectionInReadonly() -{ - return officecfg::Office::Common::Accessibility::IsSelectionInReadonly::get(); -} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index c777d069eaf2..5379f50b8eec 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -34,6 +34,7 @@ #include <drawinglayer/processor2d/baseprocessor2d.hxx> #include <drawinglayer/processor2d/processor2dtools.hxx> #include <osl/diagnose.h> +#include <officecfg/Office/Common.hxx> #include <svx/unoapi.hxx> #include <unotools/configmgr.hxx> #include <vcl/canvastools.hxx> @@ -362,7 +363,7 @@ namespace sdr::contact { if (utl::ConfigManager::IsFuzzing()) return true; - return SvtAccessibilityOptions::GetIsAllowAnimatedText(); + return officecfg::Office::Common::Accessibility::IsAllowAnimatedText::get(); } // check if graphic animation is allowed. @@ -372,7 +373,7 @@ namespace sdr::contact return true; // Related tdf#156630 respect system animation setting - return SvtAccessibilityOptions::GetIsAllowAnimatedGraphics() && !MiscSettings::GetUseReducedAnimation(); + return officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::get() && !MiscSettings::GetUseReducedAnimation(); } // print? diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index c2d35cc75b6b..b4b98dde2e15 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -25,10 +25,10 @@ #include <editeng/outlobj.hxx> #include <editeng/unotext.hxx> #include <o3tl/deleter.hxx> +#include <officecfg/Office/Common.hxx> #include <svl/itemiter.hxx> #include <svl/style.hxx> #include <svl/whiter.hxx> -#include <svtools/accessibilityoptions.hxx> #include <svx/sdtfchim.hxx> #include <svx/selectioncontroller.hxx> #include <svx/svdedxv.hxx> @@ -1307,7 +1307,8 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W = SdrMakeOutliner(OutlinerMode::TextObject, pObj->getSdrModelFromSdrObject()); { - mpTextEditOutliner->ForceAutoColor(SvtAccessibilityOptions::GetIsAutomaticFontColor()); + mpTextEditOutliner->ForceAutoColor( + officecfg::Office::Common::Accessibility::IsAutomaticFontColor::get()); } aOldCalcFieldValueLink = mpTextEditOutliner->GetCalcFieldValueHdl(); diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 7a322ed7a45f..ac32a6187ee2 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -57,7 +57,6 @@ #include <ndindex.hxx> #include <accmap.hxx> #include <vcl/bitmapex.hxx> -#include <svtools/accessibilityoptions.hxx> #include <accessibilityoptions.hxx> #include <strings.hrc> #include <bitmaps.hlst> @@ -2651,12 +2650,12 @@ void SwViewShell::ApplyAccessibilityOptions() } else { - mpAccOptions->SetAlwaysAutoColor(SvtAccessibilityOptions::GetIsAutomaticFontColor()); - mpAccOptions->SetStopAnimatedGraphics(! SvtAccessibilityOptions::GetIsAllowAnimatedGraphics()); + mpAccOptions->SetAlwaysAutoColor(officecfg::Office::Common::Accessibility::IsAutomaticFontColor::get()); + mpAccOptions->SetStopAnimatedGraphics(! officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::get()); // Form view // Always set this option, not only if document is read-only: - mpOpt->SetSelectionInReadonly(SvtAccessibilityOptions::IsSelectionInReadonly()); + mpOpt->SetSelectionInReadonly(officecfg::Office::Common::Accessibility::IsSelectionInReadonly::get()); } } #endif // ENABLE_WASM_STRIP_ACCESSIBILITY diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index 538efd4a86f0..2b6a5c500e6f 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -35,7 +35,6 @@ #include <crstate.hxx> #include <authratr.hxx> #include <svtools/colorcfg.hxx> -#include <svtools/accessibilityoptions.hxx> #include <unotools/configmgr.hxx> #include <unotools/syslocale.hxx> @@ -286,7 +285,7 @@ SwViewOption::SwViewOption() : } m_nDivisionX = m_nDivisionY = 1; - m_bSelectionInReadonly = utl::ConfigManager::IsFuzzing() || SvtAccessibilityOptions::IsSelectionInReadonly(); + m_bSelectionInReadonly = utl::ConfigManager::IsFuzzing() || officecfg::Office::Common::Accessibility::IsSelectionInReadonly::get(); m_bIdle = true;