summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-29 08:40:58 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-29 14:50:38 +0200
commit8f008bf4b968f219d2fe97ef8175ef6be0555943 (patch)
treeec7e20919414854bdf95e50a1113b223fa3cbc94 /drawinglayer
parent4993539cacdee41b7b10fc0dc14d92b7aee9ae5b (diff)
cid#1554812 COPY_INSTEAD_OF_MOVE
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 <caolan.mcnamara@collabora.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/inc/texture/texture.hxx14
-rw-r--r--drawinglayer/source/texture/texture.cxx24
2 files changed, 19 insertions, 19 deletions
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<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback) = 0;
+ const std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)>& rCallback) = 0;
};
class GeoTexSvxGradientLinear final : public GeoTexSvxGradient
@@ -89,7 +89,7 @@ namespace drawinglayer::texture
virtual ~GeoTexSvxGradientLinear() override;
virtual void appendTransformationsAndColors(
- std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback) override;
+ const std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)>& 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<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback) override;
+ const std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)>& 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<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback) override;
+ const std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)>& 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<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback) override;
+ const std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)>& 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<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback) override;
+ const std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)>& 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<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback) override;
+ const std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)>& 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<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback)
+ const std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)>& 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<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback)
+ const std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)>& 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<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback)
+ const std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)>& 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<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback)
+ const std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)>& 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<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback)
+ const std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)>& 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<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback)
+ const std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)>& 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),