cui/source/tabpages/grfpage.cxx | 3 ++- include/svtools/optionsdrawinglayer.hxx | 4 ---- svtools/source/config/optionsdrawinglayer.cxx | 5 ----- svx/source/svdraw/sdrpaintwindow.cxx | 3 ++- svx/source/svdraw/svddrgmt.cxx | 5 +++-- 5 files changed, 7 insertions(+), 13 deletions(-)
New commits: commit 9a71ac689a7d5929f66df23f9fcc707bdb146e3f Author: Gabor Kelemen <[email protected]> AuthorDate: Thu Nov 2 11:47:07 2023 +0100 Commit: Thorsten Behrens <[email protected]> CommitDate: Sat Dec 16 01:22:24 2023 +0100 Drop some wrapper methods from SvtOptionsDrawinglayer just use the wrapped officecfg methods instead of: GetStripeLength Change-Id: Id29c0b1ecbc513b5d778140b6e59139a507035d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160652 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <[email protected]> diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index fac0bfb6ab05..a12ffb0ea544 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -40,6 +40,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <o3tl/unit_conversion.hxx> +#include <officecfg/Office/Common.hxx> constexpr auto CM_1_TO_TWIP = o3tl::convert(1, o3tl::Length::cm, o3tl::Length::twip); // 567 @@ -774,7 +775,7 @@ void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const ::tools::Re // the former used XOR paint. const Color aColA(SvtOptionsDrawinglayer::GetStripeColorA().getBColor()); const Color aColB(SvtOptionsDrawinglayer::GetStripeColorB().getBColor()); - const double fStripeLength(SvtOptionsDrawinglayer::GetStripeLength()); + const double fStripeLength(officecfg::Office::Common::Drawinglayer::StripeLength::get()); const basegfx::B2DVector aDashVector(rRenderContext.GetInverseViewTransformation() * basegfx::B2DVector(fStripeLength, 0.0)); const double fLogicDashLength(aDashVector.getX()); diff --git a/include/svtools/optionsdrawinglayer.hxx b/include/svtools/optionsdrawinglayer.hxx index 8a0948d9da1b..ef7b96bbba58 100644 --- a/include/svtools/optionsdrawinglayer.hxx +++ b/include/svtools/optionsdrawinglayer.hxx @@ -36,15 +36,11 @@ namespace SvtOptionsDrawinglayer GetStripeColorB() SetStripeColorB() => Set second of two colors which overlay uses to draw stripes - GetStripeLength() - SetStripeLength() => Set length of a single stripe in pixels - @seealso configuration package "org.openoffice.Office.Common/Drawinglayer" *//*-*****************************************************************************************************/ SVT_DLLPUBLIC Color GetStripeColorA(); SVT_DLLPUBLIC Color GetStripeColorB(); -SVT_DLLPUBLIC sal_uInt16 GetStripeLength(); // #i4219# SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperWidth(); diff --git a/svtools/source/config/optionsdrawinglayer.cxx b/svtools/source/config/optionsdrawinglayer.cxx index c041d281cf91..f6beb66fa330 100644 --- a/svtools/source/config/optionsdrawinglayer.cxx +++ b/svtools/source/config/optionsdrawinglayer.cxx @@ -43,11 +43,6 @@ Color GetStripeColorB() return Color(ColorTransparency, officecfg::Office::Common::Drawinglayer::StripeColorB::get()); } -sal_uInt16 GetStripeLength() -{ - return officecfg::Office::Common::Drawinglayer::StripeLength::get(); -} - // #i4219# sal_uInt32 GetMaximumPaperWidth() { diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index ebed55326a57..bf66375f41e6 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -27,6 +27,7 @@ #include <vcl/settings.hxx> #include <vcl/window.hxx> #include <svtools/optionsdrawinglayer.hxx> +#include <officecfg/Office/Common.hxx> #include <set> #include <vector> @@ -187,7 +188,7 @@ void SdrPaintView::InitOverlayManager(rtl::Reference<sdr::overlay::OverlayManage xOverlayManager->setStripeColorA(aColA); xOverlayManager->setStripeColorB(aColB); - xOverlayManager->setStripeLengthPixel(SvtOptionsDrawinglayer::GetStripeLength()); + xOverlayManager->setStripeLengthPixel(officecfg::Office::Common::Drawinglayer::StripeLength::get()); } rtl::Reference<sdr::overlay::OverlayManager> SdrPaintView::CreateOverlayManager(OutputDevice& rOutputDevice) const diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 1d6d379fce85..b80014718257 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -67,6 +67,7 @@ #include <drawinglayer/attribute/sdrlinestartendattribute.hxx> #include <svl/itempool.hxx> #include <svtools/optionsdrawinglayer.hxx> +#include <officecfg/Office/Common.hxx> #include <comphelper/lok.hxx> #include <map> #include <vector> @@ -102,7 +103,7 @@ drawinglayer::primitive2d::Primitive2DContainer SdrDragEntryPolyPolygon::createP rDragMethod.applyCurrentTransformationToPolyPolygon(aCopy); basegfx::BColor aColA(SvtOptionsDrawinglayer::GetStripeColorA().getBColor()); basegfx::BColor aColB(SvtOptionsDrawinglayer::GetStripeColorB().getBColor()); - const double fStripeLength(SvtOptionsDrawinglayer::GetStripeLength()); + const double fStripeLength(officecfg::Office::Common::Drawinglayer::StripeLength::get()); if(Application::GetSettings().GetStyleSettings().GetHighContrastMode()) { @@ -922,7 +923,7 @@ drawinglayer::primitive2d::Primitive2DContainer SdrDragMethod::AddConnectorOverl { basegfx::BColor aColA(SvtOptionsDrawinglayer::GetStripeColorA().getBColor()); basegfx::BColor aColB(SvtOptionsDrawinglayer::GetStripeColorB().getBColor()); - const double fStripeLength(SvtOptionsDrawinglayer::GetStripeLength()); + const double fStripeLength(officecfg::Office::Common::Drawinglayer::StripeLength::get()); if(Application::GetSettings().GetStyleSettings().GetHighContrastMode()) {
