summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-12-16 19:43:15 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-12-16 22:39:20 +0100
commitde4b3a135f0bca61c0e29d5af838fa86330b832a (patch)
treefa12368c8c551b3c8849afee194ce9d3e7e6e94e /drawinglayer
parent81c4be45829826ae73ac14e1cb862e38dd73344d (diff)
cid#1545970 COPY_INSTEAD_OF_MOVE
and cid#1545957 COPY_INSTEAD_OF_MOVE cid#1545944 COPY_INSTEAD_OF_MOVE cid#1545939 COPY_INSTEAD_OF_MOVE cid#1545931 COPY_INSTEAD_OF_MOVE cid#1545926 COPY_INSTEAD_OF_MOVE cid#1545909 COPY_INSTEAD_OF_MOVE cid#1545899 COPY_INSTEAD_OF_MOVE cid#1545896 COPY_INSTEAD_OF_MOVE cid#1545894 COPY_INSTEAD_OF_MOVE cid#1545858 COPY_INSTEAD_OF_MOVE cid#1545823 COPY_INSTEAD_OF_MOVE cid#1545820 COPY_INSTEAD_OF_MOVE cid#1545819 COPY_INSTEAD_OF_MOVE cid#1545772 COPY_INSTEAD_OF_MOVE cid#1545749 COPY_INSTEAD_OF_MOVE cid#1545743 COPY_INSTEAD_OF_MOVE cid#1545739 COPY_INSTEAD_OF_MOVE cid#1545635 COPY_INSTEAD_OF_MOVE cid#1545603 COPY_INSTEAD_OF_MOVE cid#1545602 COPY_INSTEAD_OF_MOVE cid#1545592 COPY_INSTEAD_OF_MOVE cid#1545544 COPY_INSTEAD_OF_MOVE cid#1545532 COPY_INSTEAD_OF_MOVE cid#1545520 COPY_INSTEAD_OF_MOVE cid#1545512 COPY_INSTEAD_OF_MOVE cid#1545490 COPY_INSTEAD_OF_MOVE cid#1545483 COPY_INSTEAD_OF_MOVE cid#1545467 COPY_INSTEAD_OF_MOVE cid#1545461 COPY_INSTEAD_OF_MOVE cid#1545458 COPY_INSTEAD_OF_MOVE cid#1545428 COPY_INSTEAD_OF_MOVE cid#1545394 COPY_INSTEAD_OF_MOVE cid#1545385 COPY_INSTEAD_OF_MOVE cid#1545383 COPY_INSTEAD_OF_MOVE cid#1545366 COPY_INSTEAD_OF_MOVE cid#1545357 COPY_INSTEAD_OF_MOVE Change-Id: I76224326977b4067b94ca3176cad1ca6de17930a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160847 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitive2d.cxx6
-rw-r--r--drawinglayer/source/primitive2d/patternfillprimitive2d.cxx23
-rw-r--r--drawinglayer/source/tools/wmfemfhelper.cxx13
3 files changed, 20 insertions, 22 deletions
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index 0d770c58dffb..c143c8a83231 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -156,14 +156,12 @@ void GraphicPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer,
getGraphicAttr().GetBottomCrop()));
// embed content in cropPrimitive
- Primitive2DReference xPrimitive(
+ aRetval = Primitive2DContainer{ Primitive2DReference(
new CropPrimitive2D(std::move(aRetval), aTransform,
getGraphicAttr().GetLeftCrop() * aCropScaleFactor.getX(),
getGraphicAttr().GetTopCrop() * aCropScaleFactor.getY(),
getGraphicAttr().GetRightCrop() * aCropScaleFactor.getX(),
- getGraphicAttr().GetBottomCrop() * aCropScaleFactor.getY()));
-
- aRetval = Primitive2DContainer{ xPrimitive };
+ getGraphicAttr().GetBottomCrop() * aCropScaleFactor.getY())) };
}
rContainer.append(std::move(aRetval));
diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
index 2021fc28360d..42875ba42570 100644
--- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
@@ -126,11 +126,12 @@ namespace drawinglayer::primitive2d
if(0 != mnDiscreteWidth && 0 != mnDiscreteHeight)
{
const geometry::ViewInformation2D aViewInformation2D;
- primitive2d::Primitive2DReference xEmbedRef(
- new primitive2d::TransformPrimitive2D(
- basegfx::utils::createScaleB2DHomMatrix(mnDiscreteWidth, mnDiscreteHeight),
- Primitive2DContainer(getChildren())));
- primitive2d::Primitive2DContainer xEmbedSeq { xEmbedRef };
+ primitive2d::Primitive2DContainer xEmbedSeq {
+ primitive2d::Primitive2DReference(
+ new primitive2d::TransformPrimitive2D(
+ basegfx::utils::createScaleB2DHomMatrix(mnDiscreteWidth, mnDiscreteHeight),
+ Primitive2DContainer(getChildren())))
+ };
const BitmapEx aBitmapEx(
convertToBitmapEx(
@@ -244,12 +245,12 @@ namespace drawinglayer::primitive2d
aMaskRange.getRange(),
aMaskRange.getMinimum()));
- Primitive2DReference xRef(
- new TransformPrimitive2D(
- aMaskTransform,
- std::move(aRetval)));
-
- aRetval = Primitive2DContainer { xRef };
+ aRetval = Primitive2DContainer {
+ Primitive2DReference(
+ new TransformPrimitive2D(
+ aMaskTransform,
+ std::move(aRetval)))
+ };
}
// embed result in mask
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx
index 31bad2a0abd4..03a3c4a150f2 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -336,19 +336,18 @@ namespace wmfemfhelper
{
drawinglayer::primitive2d::Primitive2DContainer xRetval = std::move(aTargets);
-
if (!xRetval.empty() && rPropertyHolder.getClipPolyPolygonActive())
{
const basegfx::B2DPolyPolygon& rClipPolyPolygon = rPropertyHolder.getClipPolyPolygon();
if (rClipPolyPolygon.count())
{
- drawinglayer::primitive2d::Primitive2DReference xMask(
- new drawinglayer::primitive2d::MaskPrimitive2D(
- rClipPolyPolygon,
- std::move(xRetval)));
-
- xRetval = drawinglayer::primitive2d::Primitive2DContainer{ xMask };
+ xRetval = drawinglayer::primitive2d::Primitive2DContainer{
+ drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::MaskPrimitive2D(
+ rClipPolyPolygon,
+ std::move(xRetval)))
+ };
}
}