drawinglayer/Library_drawinglayer.mk | 4 ++ drawinglayer/source/primitive2d/controlprimitive2d.cxx | 4 +- drawinglayer/source/primitive2d/sceneprimitive2d.cxx | 3 + drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 6 +-- include/svtools/optionsdrawinglayer.hxx | 6 --- svtools/source/config/optionsdrawinglayer.cxx | 31 ---------------- svx/source/sdr/overlay/overlayselection.cxx | 3 + svx/source/svdraw/svddrgv.cxx | 6 +-- 8 files changed, 16 insertions(+), 47 deletions(-)
New commits: commit a87b0e96447e7554eb47d0e1969a85d05837acd1 Author: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> AuthorDate: Mon Nov 13 02:36:26 2023 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Feb 23 11:02:44 2024 +0100 Drop some wrapper methods from SvtOptionsDrawinglayer just use the wrapped officecfg methods instead of: IsSolidDragCreate IsRenderDecoratedTextDirect IsRenderSimpleTextDirect GetQuadratic3DRenderLimit GetQuadraticFormControlRenderLimit IsTransparentSelection Change-Id: Ie0f3ec0f8fdbbf08facfff1a372c666c8a0c8979 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160654 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163793 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk index 8945e1c462c8..8b0b8f19ea5b 100644 --- a/drawinglayer/Library_drawinglayer.mk +++ b/drawinglayer/Library_drawinglayer.mk @@ -52,6 +52,10 @@ $(eval $(call gb_Library_use_libraries,drawinglayer,\ vcl \ )) +$(eval $(call gb_Library_use_custom_headers,drawinglayer,\ + officecfg/registry \ +)) + $(eval $(call gb_Library_add_exception_objects,drawinglayer,\ drawinglayer/source/animation/animationtiming \ drawinglayer/source/attribute/fillgraphicattribute \ diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx index 765a21afacfb..09f9b5cb59e8 100644 --- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx @@ -36,10 +36,10 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <drawinglayer/primitive2d/PolygonHairlinePrimitive2D.hxx> #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> -#include <svtools/optionsdrawinglayer.hxx> #include <vcl/window.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <toolkit/helper/vclunohelper.hxx> +#include <officecfg/Office/Common.hxx> using namespace com::sun::star; @@ -98,7 +98,7 @@ namespace drawinglayer::primitive2d basegfx::B2DVector aDiscreteSize(rViewInformation.getObjectToViewTransformation() * aScale); // limit to a maximum square size, e.g. 300x150 pixels (45000) - const double fDiscreteMax(SvtOptionsDrawinglayer::GetQuadraticFormControlRenderLimit()); + const double fDiscreteMax(officecfg::Office::Common::Drawinglayer::QuadraticFormControlRenderLimit::get()); const double fDiscreteQuadratic(aDiscreteSize.getX() * aDiscreteSize.getY()); const bool bScaleUsed(fDiscreteQuadratic > fDiscreteMax); double fFactor(1.0); diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx index e2f44b690aa5..78402a22ba3f 100644 --- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx @@ -36,6 +36,7 @@ #include <comphelper/threadpool.hxx> #include <comphelper/lok.hxx> #include <toolkit/helper/vclunohelper.hxx> +#include <officecfg/Office/Common.hxx> using namespace com::sun::star; @@ -243,7 +244,7 @@ namespace drawinglayer::primitive2d double fViewSizeX(aVisibleDiscreteRange.getWidth()); double fViewSizeY(aVisibleDiscreteRange.getHeight()); const double fViewVisibleArea(fViewSizeX * fViewSizeY); - const double fMaximumVisibleArea(SvtOptionsDrawinglayer::GetQuadratic3DRenderLimit()); + const double fMaximumVisibleArea(officecfg::Office::Common::Drawinglayer::Quadratic3DRenderLimit::get()); double fReduceFactor(1.0); if(fViewVisibleArea > fMaximumVisibleArea) diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 43b8a4fa55bc..b812060d712e 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -63,7 +63,7 @@ #include <com/sun/star/awt/XWindow2.hpp> #include <com/sun/star/awt/XControl.hpp> -#include <svtools/optionsdrawinglayer.hxx> +#include <officecfg/Office/Common.hxx> #include <vcl/gradient.hxx> using namespace com::sun::star; @@ -403,7 +403,7 @@ void VclPixelProcessor2D::processTextSimplePortionPrimitive2D( const DrawModeFlags nOriginalDrawMode(mpOutputDevice->GetDrawMode()); adaptTextToFillDrawMode(); - if (SvtOptionsDrawinglayer::IsRenderSimpleTextDirect()) + if (officecfg::Office::Common::Drawinglayer::RenderSimpleTextDirect::get()) { RenderTextSimpleOrDecoratedPortionPrimitive2D(rCandidate); } @@ -423,7 +423,7 @@ void VclPixelProcessor2D::processTextDecoratedPortionPrimitive2D( const DrawModeFlags nOriginalDrawMode(mpOutputDevice->GetDrawMode()); adaptTextToFillDrawMode(); - if (SvtOptionsDrawinglayer::IsRenderDecoratedTextDirect()) + if (officecfg::Office::Common::Drawinglayer::RenderDecoratedTextDirect::get()) { RenderTextSimpleOrDecoratedPortionPrimitive2D(rCandidate); } diff --git a/include/svtools/optionsdrawinglayer.hxx b/include/svtools/optionsdrawinglayer.hxx index 5d6316aa30e6..d5a0856763c3 100644 --- a/include/svtools/optionsdrawinglayer.hxx +++ b/include/svtools/optionsdrawinglayer.hxx @@ -80,16 +80,10 @@ SVT_DLLPUBLIC bool IsAAPossibleOnThisSystem(); // primitives SVT_DLLPUBLIC bool IsAntiAliasing(); SVT_DLLPUBLIC bool IsSnapHorVerLinesToDiscrete(); -SVT_DLLPUBLIC bool IsSolidDragCreate(); -SVT_DLLPUBLIC bool IsRenderDecoratedTextDirect(); -SVT_DLLPUBLIC bool IsRenderSimpleTextDirect(); -SVT_DLLPUBLIC sal_uInt32 GetQuadratic3DRenderLimit(); -SVT_DLLPUBLIC sal_uInt32 GetQuadraticFormControlRenderLimit(); SVT_DLLPUBLIC void SetAntiAliasing( bool bOn, bool bTemporary ); // #i97672# selection settings -SVT_DLLPUBLIC bool IsTransparentSelection(); SVT_DLLPUBLIC sal_uInt16 GetTransparentSelectionPercent(); SVT_DLLPUBLIC sal_uInt16 GetSelectionMaximumLuminancePercent(); diff --git a/svtools/source/config/optionsdrawinglayer.cxx b/svtools/source/config/optionsdrawinglayer.cxx index 0564adffa94c..32c6f9f2a00b 100644 --- a/svtools/source/config/optionsdrawinglayer.cxx +++ b/svtools/source/config/optionsdrawinglayer.cxx @@ -210,37 +210,6 @@ bool IsSnapHorVerLinesToDiscrete() return bRetval; } -bool IsSolidDragCreate() -{ - return officecfg::Office::Common::Drawinglayer::SolidDragCreate::get(); -} - -bool IsRenderDecoratedTextDirect() -{ - return officecfg::Office::Common::Drawinglayer::RenderDecoratedTextDirect::get(); -} - -bool IsRenderSimpleTextDirect() -{ - return officecfg::Office::Common::Drawinglayer::RenderSimpleTextDirect::get(); -} - -sal_uInt32 GetQuadratic3DRenderLimit() -{ - return officecfg::Office::Common::Drawinglayer::Quadratic3DRenderLimit::get(); -} - -sal_uInt32 GetQuadraticFormControlRenderLimit() -{ - return officecfg::Office::Common::Drawinglayer::QuadraticFormControlRenderLimit::get(); -} - -// #i97672# selection settings -bool IsTransparentSelection() -{ - return officecfg::Office::Common::Drawinglayer::TransparentSelection::get(); -} - sal_uInt16 GetTransparentSelectionPercent() { sal_uInt16 aRetval = officecfg::Office::Common::Drawinglayer::TransparentSelectionPercent::get(); diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index 8319a259bc4b..9d805fdb25c7 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -30,6 +30,7 @@ #include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx> #include <basegfx/polygon/b2dpolypolygoncutter.hxx> #include <svx/sdr/overlay/overlaymanager.hxx> +#include <officecfg/Office/Common.hxx> namespace sdr::overlay @@ -63,7 +64,7 @@ namespace sdr::overlay { if(OverlayType::Invert != aOverlayType) { - if(!SvtOptionsDrawinglayer::IsTransparentSelection()) + if(!officecfg::Office::Common::Drawinglayer::TransparentSelection::get()) { // not possible when switched off by user return OverlayType::Invert; diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index 27b62dd17946..fc8a6a6da562 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -34,11 +34,11 @@ #include <svx/svdoashp.hxx> #include <svx/sdrpaintwindow.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> -#include <svtools/optionsdrawinglayer.hxx> #include <svx/sdr/overlay/overlaymanager.hxx> #include <svx/sdrpagewindow.hxx> #include <unotools/configmgr.hxx> #include <comphelper/lok.hxx> +#include <officecfg/Office/Common.hxx> using namespace sdr; @@ -52,7 +52,7 @@ SdrDragView::SdrDragView(SdrModel& rSdrModel, OutputDevice* pOut) , mbDragLimit(false) , mbDragHdl(false) , mbDragStripes(false) - , mbSolidDragging(utl::ConfigManager::IsFuzzing() || SvtOptionsDrawinglayer::IsSolidDragCreate()) + , mbSolidDragging(utl::ConfigManager::IsFuzzing() || officecfg::Office::Common::Drawinglayer::SolidDragCreate::get()) , mbResizeAtCenter(false) , mbCrookAtCenter(false) , mbDragWithCopy(false) @@ -913,7 +913,7 @@ bool SdrDragView::IsSolidDragging() const { // allow each user to disable by having a local setting, but using AND for // checking allowance - return mbSolidDragging && SvtOptionsDrawinglayer::IsSolidDragCreate(); + return mbSolidDragging && officecfg::Office::Common::Drawinglayer::SolidDragCreate::get(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */