From 8f008bf4b968f219d2fe97ef8175ef6be0555943 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 29 Jul 2024 08:40:58 +0100 Subject: cid#1554812 COPY_INSTEAD_OF_MOVE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and cid#1555227 COPY_INSTEAD_OF_MOVE cid#1555329 COPY_INSTEAD_OF_MOVE cid#1555384 COPY_INSTEAD_OF_MOVE cid#1555387 COPY_INSTEAD_OF_MOVE cid#1555399 COPY_INSTEAD_OF_MOVE cid#1555400 COPY_INSTEAD_OF_MOVE cid#1555406 COPY_INSTEAD_OF_MOVE Change-Id: I85dc45e2686c6b3e8b97a23872cb26416edc27c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171178 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- drawinglayer/inc/texture/texture.hxx | 14 +++++++------- drawinglayer/source/texture/texture.cxx | 24 ++++++++++++------------ 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'drawinglayer') diff --git a/drawinglayer/inc/texture/texture.hxx b/drawinglayer/inc/texture/texture.hxx index 5128a30cf2a8..aa6e79515b37 100644 --- a/drawinglayer/inc/texture/texture.hxx +++ b/drawinglayer/inc/texture/texture.hxx @@ -69,7 +69,7 @@ namespace drawinglayer::texture // virtual base methods virtual void appendTransformationsAndColors( - std::function aCallback) = 0; + const std::function& rCallback) = 0; }; class GeoTexSvxGradientLinear final : public GeoTexSvxGradient @@ -89,7 +89,7 @@ namespace drawinglayer::texture virtual ~GeoTexSvxGradientLinear() override; virtual void appendTransformationsAndColors( - std::function aCallback) override; + const std::function& rCallback) override; virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; }; @@ -109,7 +109,7 @@ namespace drawinglayer::texture virtual ~GeoTexSvxGradientAxial() override; virtual void appendTransformationsAndColors( - std::function aCallback) override; + const std::function& rCallback) override; virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; }; @@ -126,7 +126,7 @@ namespace drawinglayer::texture virtual ~GeoTexSvxGradientRadial() override; virtual void appendTransformationsAndColors( - std::function aCallback) override; + const std::function& rCallback) override; virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; }; @@ -144,7 +144,7 @@ namespace drawinglayer::texture virtual ~GeoTexSvxGradientElliptical() override; virtual void appendTransformationsAndColors( - std::function aCallback) override; + const std::function& rCallback) override; virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; }; @@ -162,7 +162,7 @@ namespace drawinglayer::texture virtual ~GeoTexSvxGradientSquare() override; virtual void appendTransformationsAndColors( - std::function aCallback) override; + const std::function& rCallback) override; virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; }; @@ -180,7 +180,7 @@ namespace drawinglayer::texture virtual ~GeoTexSvxGradientRect() override; virtual void appendTransformationsAndColors( - std::function aCallback) override; + const std::function& rCallback) override; virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; }; diff --git a/drawinglayer/source/texture/texture.cxx b/drawinglayer/source/texture/texture.cxx index b965e0e4b933..d0210dbc7b24 100644 --- a/drawinglayer/source/texture/texture.cxx +++ b/drawinglayer/source/texture/texture.cxx @@ -133,7 +133,7 @@ namespace drawinglayer::texture } void GeoTexSvxGradientLinear::appendTransformationsAndColors( - std::function aCallback) + const std::function& rCallback) { // no color at all, done if (mnColorStops.empty()) @@ -216,7 +216,7 @@ namespace drawinglayer::texture aNew.translate(0.0, fPos); // set and add at target - aCallback( + rCallback( maGradientInfo.getTextureTransform() * aNew, 1 == nSteps ? aCStart : basegfx::BColor(interpolate(aCStart, aCEnd, double(innerLoop) / double(nSteps - 1)))); } @@ -285,7 +285,7 @@ namespace drawinglayer::texture } void GeoTexSvxGradientAxial::appendTransformationsAndColors( - std::function aCallback) + const std::function& rCallback) { // no color at all, done if (mnColorStops.empty()) @@ -349,7 +349,7 @@ namespace drawinglayer::texture aNew.scale(1.0, 1.0 - fPos); // set and add at target - aCallback( + rCallback( maGradientInfo.getTextureTransform() * aNew, 1 == nSteps ? aCStart : basegfx::BColor(interpolate(aCStart, aCEnd, double(innerLoop) / double(nSteps - 1)))); } @@ -405,7 +405,7 @@ namespace drawinglayer::texture } void GeoTexSvxGradientRadial::appendTransformationsAndColors( - std::function aCallback) + const std::function& rCallback) { // no color at all, done if (mnColorStops.empty()) @@ -453,7 +453,7 @@ namespace drawinglayer::texture const double fSize(1.0 - (fOffsetStart + (fStripeWidth * innerLoop))); // set and add at target - aCallback( + rCallback( maGradientInfo.getTextureTransform() * basegfx::utils::createScaleB2DHomMatrix(fSize, fSize), 1 == nSteps ? aCStart : basegfx::BColor(interpolate(aCStart, aCEnd, double(innerLoop) / double(nSteps - 1)))); } @@ -508,7 +508,7 @@ namespace drawinglayer::texture } void GeoTexSvxGradientElliptical::appendTransformationsAndColors( - std::function aCallback) + const std::function& rCallback) { // no color at all, done if (mnColorStops.empty()) @@ -560,7 +560,7 @@ namespace drawinglayer::texture const double fSize(fOffsetStart + (fStripeWidth * innerLoop)); // set and add at target - aCallback( + rCallback( maGradientInfo.getTextureTransform() * basegfx::utils::createScaleB2DHomMatrix( 1.0 - (bMTO ? fSize / fAR : fSize), @@ -618,7 +618,7 @@ namespace drawinglayer::texture } void GeoTexSvxGradientSquare::appendTransformationsAndColors( - std::function aCallback) + const std::function& rCallback) { // no color at all, done if (mnColorStops.empty()) @@ -666,7 +666,7 @@ namespace drawinglayer::texture const double fSize(1.0 - (fOffsetStart + (fStripeWidth * innerLoop))); // set and add at target - aCallback( + rCallback( maGradientInfo.getTextureTransform() * basegfx::utils::createScaleB2DHomMatrix(fSize, fSize), 1 == nSteps ? aCStart : basegfx::BColor(interpolate(aCStart, aCEnd, double(innerLoop) / double(nSteps - 1)))); } @@ -721,7 +721,7 @@ namespace drawinglayer::texture } void GeoTexSvxGradientRect::appendTransformationsAndColors( - std::function aCallback) + const std::function& rCallback) { // no color at all, done if (mnColorStops.empty()) @@ -773,7 +773,7 @@ namespace drawinglayer::texture const double fSize(fOffsetStart + (fStripeWidth * innerLoop)); // set and add at target - aCallback( + rCallback( maGradientInfo.getTextureTransform() * basegfx::utils::createScaleB2DHomMatrix( 1.0 - (bMTO ? fSize / fAR : fSize), -- cgit v1.2.3