[Libreoffice-commits] core.git: drawinglayer/inc drawinglayer/source include/drawinglayer sd/source svgio/source svx/inc svx/source sw/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 9 13:23:36 UTC 2021


 drawinglayer/inc/primitive2d/cropprimitive2d.hxx                    |    2 
 drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D.cxx  |    4 
 drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D.cxx     |    4 
 drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D.cxx |    2 
 drawinglayer/source/primitive2d/animatedprimitive2d.cxx             |   14 +-
 drawinglayer/source/primitive2d/cropprimitive2d.cxx                 |    6 -
 drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx       |    2 
 drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx          |    2 
 drawinglayer/source/primitive2d/glowprimitive2d.cxx                 |    4 
 drawinglayer/source/primitive2d/graphicprimitive2d.cxx              |   15 +-
 drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx        |   14 +-
 drawinglayer/source/primitive2d/groupprimitive2d.cxx                |    4 
 drawinglayer/source/primitive2d/hiddengeometryprimitive2d.cxx       |    4 
 drawinglayer/source/primitive2d/invertprimitive2d.cxx               |    4 
 drawinglayer/source/primitive2d/maskprimitive2d.cxx                 |    4 
 drawinglayer/source/primitive2d/mediaprimitive2d.cxx                |    4 
 drawinglayer/source/primitive2d/metafileprimitive2d.cxx             |    4 
 drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx        |    4 
 drawinglayer/source/primitive2d/objectinfoprimitive2d.cxx           |    4 
 drawinglayer/source/primitive2d/pagehierarchyprimitive2d.cxx        |    4 
 drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx          |    4 
 drawinglayer/source/primitive2d/patternfillprimitive2d.cxx          |   22 ++--
 drawinglayer/source/primitive2d/shadowprimitive2d.cxx               |   10 -
 drawinglayer/source/primitive2d/softedgeprimitive2d.cxx             |    7 -
 drawinglayer/source/primitive2d/structuretagprimitive2d.cxx         |    4 
 drawinglayer/source/primitive2d/svggradientprimitive2d.cxx          |   14 +-
 drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx        |    2 
 drawinglayer/source/primitive2d/texteffectprimitive2d.cxx           |   42 ++++---
 drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx        |   24 ++--
 drawinglayer/source/primitive2d/textlineprimitive2d.cxx             |    4 
 drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx        |    2 
 drawinglayer/source/primitive2d/transformprimitive2d.cxx            |    4 
 drawinglayer/source/primitive2d/transparenceprimitive2d.cxx         |    8 -
 drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx  |    6 -
 drawinglayer/source/processor3d/shadow3dextractor.cxx               |    6 -
 drawinglayer/source/tools/converters.cxx                            |    8 -
 drawinglayer/source/tools/wmfemfhelper.cxx                          |   32 ++---
 include/drawinglayer/primitive2d/animatedprimitive2d.hxx            |    6 -
 include/drawinglayer/primitive2d/glowprimitive2d.hxx                |    2 
 include/drawinglayer/primitive2d/groupprimitive2d.hxx               |    2 
 include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx      |    2 
 include/drawinglayer/primitive2d/invertprimitive2d.hxx              |    2 
 include/drawinglayer/primitive2d/maskprimitive2d.hxx                |    2 
 include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx       |    2 
 include/drawinglayer/primitive2d/objectinfoprimitive2d.hxx          |    2 
 include/drawinglayer/primitive2d/pagehierarchyprimitive2d.hxx       |    2 
 include/drawinglayer/primitive2d/shadowprimitive2d.hxx              |    2 
 include/drawinglayer/primitive2d/softedgeprimitive2d.hxx            |    2 
 include/drawinglayer/primitive2d/structuretagprimitive2d.hxx        |    2 
 include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx       |   12 +-
 include/drawinglayer/primitive2d/transformprimitive2d.hxx           |    2 
 include/drawinglayer/primitive2d/transparenceprimitive2d.hxx        |    4 
 include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx |    2 
 sd/source/ui/unoidl/unomodel.cxx                                    |    4 
 svgio/source/svgreader/svgclippathnode.cxx                          |    6 -
 svgio/source/svgreader/svgimagenode.cxx                             |    4 
 svgio/source/svgreader/svgmasknode.cxx                              |   20 +--
 svgio/source/svgreader/svgnode.cxx                                  |    4 
 svgio/source/svgreader/svgstyleattributes.cxx                       |   16 +-
 svgio/source/svgreader/svgsvgnode.cxx                               |   12 +-
 svgio/source/svgreader/svgusenode.cxx                               |    2 
 svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx                   |    2 
 svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx                      |    2 
 svx/source/engine3d/view3d.cxx                                      |    4 
 svx/source/sdr/contact/viewcontactofsdrobj.cxx                      |    2 
 svx/source/sdr/contact/viewcontactofsdrole2obj.cxx                  |    4 
 svx/source/sdr/contact/viewcontactofvirtobj.cxx                     |    4 
 svx/source/sdr/contact/viewobjectcontact.cxx                        |    6 -
 svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx              |    2 
 svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx  |    4 
 svx/source/sdr/overlay/overlaybitmapex.cxx                          |    4 
 svx/source/sdr/overlay/overlayobject.cxx                            |    4 
 svx/source/sdr/overlay/overlayobjectcell.cxx                        |    4 
 svx/source/sdr/overlay/overlaypolypolygon.cxx                       |    4 
 svx/source/sdr/overlay/overlayselection.cxx                         |   10 -
 svx/source/sdr/overlay/overlaytools.cxx                             |    6 -
 svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx            |    2 
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx                |   54 +++++-----
 svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx                   |    4 
 svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx                |    2 
 svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx                   |   16 +-
 svx/source/svdraw/svddrgmt.cxx                                      |    4 
 svx/source/svdraw/svdhdl.cxx                                        |    2 
 svx/source/svdraw/svdotextdecomposition.cxx                         |   22 +---
 svx/source/svdraw/svdotextpathdecomposition.cxx                     |    2 
 svx/source/table/tablehandles.cxx                                   |    4 
 svx/source/table/viewcontactoftableobj.cxx                          |    6 -
 svx/source/unodraw/unoshape.cxx                                     |    4 
 sw/source/core/doc/notxtfrm.cxx                                     |    4 
 sw/source/core/draw/dcontact.cxx                                    |    2 
 sw/source/core/layout/paintfrm.cxx                                  |    2 
 sw/source/uibase/docvw/HeaderFooterWin.cxx                          |    2 
 sw/source/uibase/docvw/OverlayRanges.cxx                            |    6 -
 sw/source/uibase/docvw/PageBreakWin.cxx                             |    2 
 94 files changed, 314 insertions(+), 308 deletions(-)

New commits:
commit 8104d771b10a5c8b15eae4b67aa112ae2ef77b5b
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Sep 9 13:00:23 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Sep 9 15:22:52 2021 +0200

    tdf#144052 reduce Primitive2D copying
    
    when creating charts, by using a
        Primitive2DContainer&&
    parameter in the GroupPrimitive2D constructor, which forces the call
    sites to pass a temporary, and at most call sites, we can std::move in
    an existing local variable.
    
    Change-Id: I531970918800c6832ab606b5a4ff5fd2d47ccf5b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121844
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/drawinglayer/inc/primitive2d/cropprimitive2d.hxx b/drawinglayer/inc/primitive2d/cropprimitive2d.hxx
index 86297687ad5f..3bed0638f254 100644
--- a/drawinglayer/inc/primitive2d/cropprimitive2d.hxx
+++ b/drawinglayer/inc/primitive2d/cropprimitive2d.hxx
@@ -64,7 +64,7 @@ namespace drawinglayer::primitive2d
         public:
             /// constructor
             CropPrimitive2D(
-                const Primitive2DContainer& rChildren,
+                Primitive2DContainer&& aChildren,
                 const basegfx::B2DHomMatrix& rTransformation,
                 double fCropLeft,
                 double fCropTop,
diff --git a/drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D.cxx b/drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D.cxx
index 115acc0adde6..3e88b6c0ddb0 100644
--- a/drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D.cxx
+++ b/drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D.cxx
@@ -37,10 +37,10 @@ void PolyPolygonGradientPrimitive2D::create2DDecomposition(
         const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
         rtl::Reference<FillGradientPrimitive2D> pNewGradient = new FillGradientPrimitive2D(
             aPolyPolygonRange, getDefinitionRange(), getFillGradient());
-        const Primitive2DContainer aSubSequence{ pNewGradient };
+        Primitive2DContainer aSubSequence{ pNewGradient };
 
         // create mask primitive
-        rContainer.push_back(new MaskPrimitive2D(getB2DPolyPolygon(), aSubSequence));
+        rContainer.push_back(new MaskPrimitive2D(getB2DPolyPolygon(), std::move(aSubSequence)));
     }
 }
 
diff --git a/drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D.cxx b/drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D.cxx
index a868ce5b71c1..7fc0502c8f43 100644
--- a/drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D.cxx
+++ b/drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D.cxx
@@ -37,10 +37,10 @@ void PolyPolygonHatchPrimitive2D::create2DDecomposition(
         const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
         rtl::Reference<FillHatchPrimitive2D> pNewHatch = new FillHatchPrimitive2D(
             aPolyPolygonRange, getDefinitionRange(), getBackgroundColor(), getFillHatch());
-        const Primitive2DContainer aSubSequence{ pNewHatch };
+        Primitive2DContainer aSubSequence{ pNewHatch };
 
         // create mask primitive
-        rContainer.push_back(new MaskPrimitive2D(getB2DPolyPolygon(), aSubSequence));
+        rContainer.push_back(new MaskPrimitive2D(getB2DPolyPolygon(), std::move(aSubSequence)));
     }
 }
 
diff --git a/drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D.cxx b/drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D.cxx
index 821cc2da9772..3ad4840bd5bd 100644
--- a/drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D.cxx
+++ b/drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D.cxx
@@ -61,7 +61,7 @@ void PolyPolygonSelectionPrimitive2D::create2DDecomposition(
     if (!aRetval.empty() && getTransparence() > 0.0)
     {
         const Primitive2DReference aTrans(
-            new UnifiedTransparencePrimitive2D(aRetval, getTransparence()));
+            new UnifiedTransparencePrimitive2D(std::move(aRetval), getTransparence()));
 
         aRetval = Primitive2DContainer{ aTrans };
     }
diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
index 2b5c3c4c7c9f..adb66dddb36c 100644
--- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
@@ -37,9 +37,9 @@ namespace drawinglayer::primitive2d
 
         AnimatedSwitchPrimitive2D::AnimatedSwitchPrimitive2D(
             const animation::AnimationEntry& rAnimationEntry,
-            const Primitive2DContainer& rChildren,
+            Primitive2DContainer&& aChildren,
             bool bIsTextAnimation)
-        :   GroupPrimitive2D(rChildren),
+        :   GroupPrimitive2D(std::move(aChildren)),
             mbIsTextAnimation(bIsTextAnimation)
         {
             // clone given animation description
@@ -93,8 +93,8 @@ namespace drawinglayer::primitive2d
 {
         AnimatedBlinkPrimitive2D::AnimatedBlinkPrimitive2D(
             const animation::AnimationEntry& rAnimationEntry,
-            const Primitive2DContainer& rChildren)
-        :   AnimatedSwitchPrimitive2D(rAnimationEntry, rChildren, true/*bIsTextAnimation*/)
+            Primitive2DContainer&& aChildren)
+        :   AnimatedSwitchPrimitive2D(rAnimationEntry, std::move(aChildren), true/*bIsTextAnimation*/)
         {
         }
 
@@ -125,8 +125,8 @@ namespace drawinglayer::primitive2d
         AnimatedInterpolatePrimitive2D::AnimatedInterpolatePrimitive2D(
             const std::vector< basegfx::B2DHomMatrix >& rmMatrixStack,
             const animation::AnimationEntry& rAnimationEntry,
-            const Primitive2DContainer& rChildren)
-        :   AnimatedSwitchPrimitive2D(rAnimationEntry, rChildren, true/*bIsTextAnimation*/)
+            Primitive2DContainer&& aChildren)
+        :   AnimatedSwitchPrimitive2D(rAnimationEntry, std::move(aChildren), true/*bIsTextAnimation*/)
         {
             // copy matrices to locally pre-decomposed matrix stack
             const sal_uInt32 nCount(rmMatrixStack.size());
@@ -184,7 +184,7 @@ namespace drawinglayer::primitive2d
                 }
 
                 // create new transform primitive reference, return new sequence
-                const Primitive2DReference xRef(new TransformPrimitive2D(aTargetTransform, getChildren()));
+                Primitive2DReference xRef(new TransformPrimitive2D(aTargetTransform, Primitive2DContainer(getChildren())));
                 rVisitor.append(xRef);
             }
             else
diff --git a/drawinglayer/source/primitive2d/cropprimitive2d.cxx b/drawinglayer/source/primitive2d/cropprimitive2d.cxx
index ff460a59fd11..06a7e2726f04 100644
--- a/drawinglayer/source/primitive2d/cropprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/cropprimitive2d.cxx
@@ -32,13 +32,13 @@ using namespace com::sun::star;
 namespace drawinglayer::primitive2d
 {
         CropPrimitive2D::CropPrimitive2D(
-            const Primitive2DContainer& rChildren,
+            Primitive2DContainer&& aChildren,
             const basegfx::B2DHomMatrix& rTransformation,
             double fCropLeft,
             double fCropTop,
             double fCropRight,
             double fCropBottom)
-        :   GroupPrimitive2D(rChildren),
+        :   GroupPrimitive2D(std::move(aChildren)),
             maTransformation(rTransformation),
             mfCropLeft(fCropLeft),
             mfCropTop(fCropTop),
@@ -120,7 +120,7 @@ namespace drawinglayer::primitive2d
             const Primitive2DReference xTransformPrimitive(
                 new TransformPrimitive2D(
                     aNewTransform,
-                    getChildren()));
+                    Primitive2DContainer(getChildren())));
 
             if(aUnitRange.isInside(aNewRange))
             {
diff --git a/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx b/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx
index 36ba083dfdc4..5c562471a786 100644
--- a/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx
@@ -251,7 +251,7 @@ namespace drawinglayer::primitive2d
             rContainer.push_back(
                 new TransformPrimitive2D(
                     getTransform(),
-                    xRetval));
+                    std::move(xRetval)));
         }
 
         DiscreteShadowPrimitive2D::DiscreteShadowPrimitive2D(
diff --git a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx
index b710657f404d..958d3bf17960 100644
--- a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx
@@ -73,7 +73,7 @@ namespace drawinglayer::primitive2d
                 {
                     rContainer.push_back(new TransformPrimitive2D(
                         getTransformation() * aMatrices[a],
-                        xSeq));
+                        std::move(xSeq)));
                 }
             }
             else
diff --git a/drawinglayer/source/primitive2d/glowprimitive2d.cxx b/drawinglayer/source/primitive2d/glowprimitive2d.cxx
index e6adcb4b66d8..6fe14c2222c1 100644
--- a/drawinglayer/source/primitive2d/glowprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/glowprimitive2d.cxx
@@ -25,8 +25,8 @@ using namespace com::sun::star;
 namespace drawinglayer::primitive2d
 {
 GlowPrimitive2D::GlowPrimitive2D(const Color& rGlowColor, double fRadius,
-                                 const Primitive2DContainer& rChildren)
-    : GroupPrimitive2D(rChildren)
+                                 Primitive2DContainer&& rChildren)
+    : GroupPrimitive2D(std::move(rChildren))
     , maGlowColor(rGlowColor)
     , mfGlowRadius(fRadius)
 {
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index 4a1121366092..ac1ba3d5657e 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -138,8 +138,8 @@ void GraphicPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer,
 
         if (!basegfx::fTools::equalZero(fTransparency))
         {
-            const Primitive2DReference aUnifiedTransparence(
-                new UnifiedTransparencePrimitive2D(aRetval, fTransparency));
+            Primitive2DReference aUnifiedTransparence(
+                new UnifiedTransparencePrimitive2D(std::move(aRetval), fTransparency));
 
             aRetval = Primitive2DContainer{ aUnifiedTransparence };
         }
@@ -157,11 +157,12 @@ void GraphicPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer,
             getGraphicAttr().GetBottomCrop()));
 
         // embed content in cropPrimitive
-        Primitive2DReference xPrimitive(new CropPrimitive2D(
-            aRetval, aTransform, getGraphicAttr().GetLeftCrop() * aCropScaleFactor.getX(),
-            getGraphicAttr().GetTopCrop() * aCropScaleFactor.getY(),
-            getGraphicAttr().GetRightCrop() * aCropScaleFactor.getX(),
-            getGraphicAttr().GetBottomCrop() * aCropScaleFactor.getY()));
+        Primitive2DReference xPrimitive(
+            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 };
     }
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
index 3896108a660c..37539685a8cd 100644
--- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -559,8 +559,8 @@ namespace drawinglayer::primitive2d
 
                         Primitive2DReference mask = new MaskPrimitive2D(
                             basegfx::B2DPolyPolygon(aMaskPolygon),
-                            aRetval);
-                        aRetval[0] = mask;
+                            std::move(aRetval));
+                        aRetval = Primitive2DContainer { mask };
                     }
                     break;
                 }
@@ -618,7 +618,7 @@ namespace drawinglayer::primitive2d
                     // convert to grey
                     const Primitive2DReference aPrimitiveGrey(
                         new ModifiedColorPrimitive2D(
-                            aRetval,
+                            std::move(aRetval),
                             std::make_shared<basegfx::BColorModifier_gray>()));
 
                     aRetval = Primitive2DContainer { aPrimitiveGrey };
@@ -629,7 +629,7 @@ namespace drawinglayer::primitive2d
                     // convert to mono (black/white with threshold 0.5)
                     const Primitive2DReference aPrimitiveBlackAndWhite(
                         new ModifiedColorPrimitive2D(
-                            aRetval,
+                            std::move(aRetval),
                             std::make_shared<basegfx::BColorModifier_black_and_white>(0.5)));
 
                     aRetval = Primitive2DContainer { aPrimitiveBlackAndWhite };
@@ -655,7 +655,7 @@ namespace drawinglayer::primitive2d
             {
                 const Primitive2DReference aPrimitiveRGBLuminannceContrast(
                     new ModifiedColorPrimitive2D(
-                        aRetval,
+                        std::move(aRetval),
                         std::make_shared<basegfx::BColorModifier_RGBLuminanceContrast>(
                                 fRed,
                                 fGreen,
@@ -671,7 +671,7 @@ namespace drawinglayer::primitive2d
             {
                 const Primitive2DReference aPrimitiveGamma(
                     new ModifiedColorPrimitive2D(
-                        aRetval,
+                        std::move(aRetval),
                         std::make_shared<basegfx::BColorModifier_gamma>(
                                 fGamma)));
 
@@ -683,7 +683,7 @@ namespace drawinglayer::primitive2d
             {
                 const Primitive2DReference aPrimitiveInvert(
                     new ModifiedColorPrimitive2D(
-                        aRetval,
+                        std::move(aRetval),
                         std::make_shared<basegfx::BColorModifier_invert>()));
 
                 aRetval = Primitive2DContainer { aPrimitiveInvert };
diff --git a/drawinglayer/source/primitive2d/groupprimitive2d.cxx b/drawinglayer/source/primitive2d/groupprimitive2d.cxx
index 95870c0de6de..8c16d848fdff 100644
--- a/drawinglayer/source/primitive2d/groupprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/groupprimitive2d.cxx
@@ -26,8 +26,8 @@ using namespace com::sun::star;
 
 namespace drawinglayer::primitive2d
 {
-        GroupPrimitive2D::GroupPrimitive2D( const Primitive2DContainer& rChildren )
-        :   maChildren(rChildren)
+        GroupPrimitive2D::GroupPrimitive2D( Primitive2DContainer&& aChildren )
+        :   maChildren(std::move(aChildren))
         {
         }
 
diff --git a/drawinglayer/source/primitive2d/hiddengeometryprimitive2d.cxx b/drawinglayer/source/primitive2d/hiddengeometryprimitive2d.cxx
index c1298cd9589b..c1a5442b25af 100644
--- a/drawinglayer/source/primitive2d/hiddengeometryprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/hiddengeometryprimitive2d.cxx
@@ -27,8 +27,8 @@ using namespace com::sun::star;
 namespace drawinglayer::primitive2d
 {
         HiddenGeometryPrimitive2D::HiddenGeometryPrimitive2D(
-            const Primitive2DContainer& rChildren)
-        :   GroupPrimitive2D(rChildren)
+            Primitive2DContainer&& aChildren)
+        :   GroupPrimitive2D(std::move(aChildren))
         {
         }
 
diff --git a/drawinglayer/source/primitive2d/invertprimitive2d.cxx b/drawinglayer/source/primitive2d/invertprimitive2d.cxx
index 0066b73d21dd..e2d01381e1a9 100644
--- a/drawinglayer/source/primitive2d/invertprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/invertprimitive2d.cxx
@@ -27,8 +27,8 @@ using namespace com::sun::star;
 namespace drawinglayer::primitive2d
 {
         InvertPrimitive2D::InvertPrimitive2D(
-            const Primitive2DContainer& rChildren)
-        :   GroupPrimitive2D(rChildren)
+            Primitive2DContainer&& aChildren)
+        :   GroupPrimitive2D(std::move(aChildren))
         {
         }
 
diff --git a/drawinglayer/source/primitive2d/maskprimitive2d.cxx b/drawinglayer/source/primitive2d/maskprimitive2d.cxx
index 8a71d97008b9..842085168827 100644
--- a/drawinglayer/source/primitive2d/maskprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/maskprimitive2d.cxx
@@ -28,8 +28,8 @@ namespace drawinglayer::primitive2d
 {
         MaskPrimitive2D::MaskPrimitive2D(
             const basegfx::B2DPolyPolygon& rMask,
-            const Primitive2DContainer& rChildren)
-        :   GroupPrimitive2D(rChildren),
+            Primitive2DContainer&& aChildren)
+        :   GroupPrimitive2D(std::move(aChildren)),
             maMask(rMask)
         {
         }
diff --git a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx
index 665622527e87..108f53bf1431 100644
--- a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx
@@ -69,7 +69,7 @@ namespace drawinglayer::primitive2d
                 {
                     // shrunk primitive has no content (zero size in X or Y), nothing to display. Still create
                     // invisible content for HitTest and BoundRect
-                    const Primitive2DReference xHiddenLines(new HiddenGeometryPrimitive2D(xRetval));
+                    const Primitive2DReference xHiddenLines(new HiddenGeometryPrimitive2D(std::move(xRetval)));
 
                     xRetval = Primitive2DContainer { xHiddenLines, };
                 }
@@ -82,7 +82,7 @@ namespace drawinglayer::primitive2d
                     aTransform.translate(aDestRange.getMinX(), aDestRange.getMinY());
 
                     // add transform primitive
-                    const Primitive2DReference aScaled(new TransformPrimitive2D(aTransform, xRetval));
+                    Primitive2DReference aScaled(new TransformPrimitive2D(aTransform, std::move(xRetval)));
                     xRetval = Primitive2DContainer { aScaled };
                 }
             }
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 2c880122b928..eddb02375d0a 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -58,7 +58,7 @@ namespace drawinglayer::primitive2d
                                 basegfx::B2DPolyPolygon(
                                     basegfx::utils::createPolygonFromRect(
                                         aMtfRange)),
-                                xRetval));
+                                std::move(xRetval)));
 
                         xRetval = drawinglayer::primitive2d::Primitive2DContainer{ xMask };
                     }
@@ -77,7 +77,7 @@ namespace drawinglayer::primitive2d
                 const Primitive2DReference aEmbeddedTransform(
                     new TransformPrimitive2D(
                         aAdaptedTransform,
-                        xRetval));
+                        std::move(xRetval)));
 
                 xRetval = Primitive2DContainer { aEmbeddedTransform };
             }
diff --git a/drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx b/drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx
index 06d322cada70..2d0f572dad39 100644
--- a/drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx
@@ -27,9 +27,9 @@ using namespace com::sun::star;
 namespace drawinglayer::primitive2d
 {
         ModifiedColorPrimitive2D::ModifiedColorPrimitive2D(
-            const Primitive2DContainer& rChildren,
+            Primitive2DContainer&& aChildren,
             const basegfx::BColorModifierSharedPtr& rColorModifier)
-        :   GroupPrimitive2D(rChildren),
+        :   GroupPrimitive2D(std::move(aChildren)),
             maColorModifier(rColorModifier)
         {
         }
diff --git a/drawinglayer/source/primitive2d/objectinfoprimitive2d.cxx b/drawinglayer/source/primitive2d/objectinfoprimitive2d.cxx
index 8ea05672812d..577f3171a3dd 100644
--- a/drawinglayer/source/primitive2d/objectinfoprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/objectinfoprimitive2d.cxx
@@ -24,11 +24,11 @@ using namespace com::sun::star;
 namespace drawinglayer::primitive2d
 {
         ObjectInfoPrimitive2D::ObjectInfoPrimitive2D(
-            const Primitive2DContainer& rChildren,
+            Primitive2DContainer&& aChildren,
             const OUString& rName,
             const OUString& rTitle,
             const OUString& rDesc)
-        :   GroupPrimitive2D(rChildren),
+        :   GroupPrimitive2D(std::move(aChildren)),
             maName(rName),
             maTitle(rTitle),
             maDesc(rDesc)
diff --git a/drawinglayer/source/primitive2d/pagehierarchyprimitive2d.cxx b/drawinglayer/source/primitive2d/pagehierarchyprimitive2d.cxx
index f176e3b8301e..8ffd7735abd8 100644
--- a/drawinglayer/source/primitive2d/pagehierarchyprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/pagehierarchyprimitive2d.cxx
@@ -24,8 +24,8 @@ using namespace com::sun::star;
 
 namespace drawinglayer::primitive2d
 {
-        PageHierarchyPrimitive2D::PageHierarchyPrimitive2D(const Primitive2DContainer& rChildren)
-        :   GroupPrimitive2D(rChildren)
+        PageHierarchyPrimitive2D::PageHierarchyPrimitive2D(Primitive2DContainer&& aChildren)
+        :   GroupPrimitive2D(std::move(aChildren))
         {
         }
 
diff --git a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
index d8fc5af94995..83468b36d46e 100644
--- a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
@@ -58,7 +58,7 @@ namespace drawinglayer::primitive2d
                 const Primitive2DReference xReferenceA(
                     new MaskPrimitive2D(
                         basegfx::B2DPolyPolygon(
-                            basegfx::utils::createPolygonFromRect(aAllowedContentRange)), aContent));
+                            basegfx::utils::createPolygonFromRect(aAllowedContentRange)), std::move(aContent)));
                 aContent = Primitive2DContainer { xReferenceA };
             }
 
@@ -97,7 +97,7 @@ namespace drawinglayer::primitive2d
             aPageTrans = aCombined * aPageTrans;
 
             // embed in necessary transformation to map from SdrPage to SdrPageObject
-            rContainer.push_back(new TransformPrimitive2D(aPageTrans, aContent));
+            rContainer.push_back(new TransformPrimitive2D(aPageTrans, std::move(aContent)));
         }
 
         PagePreviewPrimitive2D::PagePreviewPrimitive2D(
diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
index ded9fb15eb3b..8add9d587c6d 100644
--- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
@@ -125,11 +125,11 @@ namespace drawinglayer::primitive2d
             if(0 != mnDiscreteWidth && 0 != mnDiscreteHeight)
             {
                 const geometry::ViewInformation2D aViewInformation2D;
-                const primitive2d::Primitive2DReference xEmbedRef(
+                primitive2d::Primitive2DReference xEmbedRef(
                     new primitive2d::TransformPrimitive2D(
                         basegfx::utils::createScaleB2DHomMatrix(mnDiscreteWidth, mnDiscreteHeight),
-                        getChildren()));
-                const primitive2d::Primitive2DContainer xEmbedSeq { xEmbedRef };
+                        Primitive2DContainer(getChildren())));
+                primitive2d::Primitive2DContainer xEmbedSeq { xEmbedRef };
 
                 const BitmapEx aBitmapEx(
                     convertToBitmapEx(
@@ -173,7 +173,7 @@ namespace drawinglayer::primitive2d
                     const Primitive2DReference xRef(
                         new MaskPrimitive2D(
                             basegfx::B2DPolyPolygon(basegfx::utils::createPolygonFromRect(aUnitRange)),
-                            aContent));
+                            std::move(aContent)));
 
                     aContent = Primitive2DContainer { xRef };
                 }
@@ -186,11 +186,11 @@ namespace drawinglayer::primitive2d
         BitmapEx PatternFillPrimitive2D::createTileImage(sal_uInt32 nWidth, sal_uInt32 nHeight) const
         {
             const geometry::ViewInformation2D aViewInformation2D;
-            const Primitive2DContainer aContent(createContent(aViewInformation2D));
+            Primitive2DContainer aContent(createContent(aViewInformation2D));
             const primitive2d::Primitive2DReference xEmbedRef(
                     new primitive2d::TransformPrimitive2D(
                         basegfx::utils::createScaleB2DHomMatrix(nWidth, nHeight),
-                        aContent));
+                        std::move(aContent)));
             const primitive2d::Primitive2DContainer xEmbedSeq { xEmbedRef };
 
             return convertToBitmapEx(
@@ -223,7 +223,7 @@ namespace drawinglayer::primitive2d
             aTiling.appendTransformations(aMatrices);
 
             // create content
-            const Primitive2DContainer aContent(createContent(rViewInformation));
+            Primitive2DContainer aContent(createContent(rViewInformation));
 
             // resize result
             aRetval.resize(aMatrices.size());
@@ -233,7 +233,7 @@ namespace drawinglayer::primitive2d
             {
                 aRetval[a] = new TransformPrimitive2D(
                     aMatrices[a],
-                    aContent);
+                    Primitive2DContainer(aContent));
             }
 
             // transform result which is in unit coordinates to mask's object coordinates
@@ -243,10 +243,10 @@ namespace drawinglayer::primitive2d
                         aMaskRange.getRange(),
                         aMaskRange.getMinimum()));
 
-                const Primitive2DReference xRef(
+                Primitive2DReference xRef(
                     new TransformPrimitive2D(
                         aMaskTransform,
-                        aRetval));
+                        std::move(aRetval)));
 
                 aRetval = Primitive2DContainer { xRef };
             }
@@ -256,7 +256,7 @@ namespace drawinglayer::primitive2d
                 rContainer.push_back(
                     new MaskPrimitive2D(
                         getMask(),
-                        aRetval));
+                        std::move(aRetval)));
             }
         }
 
diff --git a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx
index 5ede8b68c9c3..6ea066b35754 100644
--- a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx
@@ -34,8 +34,8 @@ namespace drawinglayer::primitive2d
             const basegfx::B2DHomMatrix& rShadowTransform,
             const basegfx::BColor& rShadowColor,
             double fShadowBlur,
-            const Primitive2DContainer& rChildren)
-        :   GroupPrimitive2D(rChildren),
+            Primitive2DContainer&& aChildren)
+        :   GroupPrimitive2D(std::move(aChildren)),
             maShadowTransform(rShadowTransform),
             maShadowColor(rShadowColor),
             mfShadowBlur(fShadowBlur)
@@ -75,12 +75,12 @@ namespace drawinglayer::primitive2d
                     getShadowColor());
             const Primitive2DReference xRefA(
                 new ModifiedColorPrimitive2D(
-                    getChildren(),
+                    Primitive2DContainer(getChildren()),
                     aBColorModifier));
-            const Primitive2DContainer aSequenceB { xRefA };
+            Primitive2DContainer aSequenceB { xRefA };
 
             // build transformed primitiveVector with shadow offset and add to target
-            rVisitor.append(new TransformPrimitive2D(getShadowTransform(), aSequenceB));
+            rVisitor.append(new TransformPrimitive2D(getShadowTransform(), std::move(aSequenceB)));
         }
 
         // provide unique ID
diff --git a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
index 03b8ee61c950..98a3bea752eb 100644
--- a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
@@ -23,8 +23,8 @@
 
 namespace drawinglayer::primitive2d
 {
-SoftEdgePrimitive2D::SoftEdgePrimitive2D(double fRadius, const Primitive2DContainer& rChildren)
-    : GroupPrimitive2D(rChildren)
+SoftEdgePrimitive2D::SoftEdgePrimitive2D(double fRadius, Primitive2DContainer&& aChildren)
+    : GroupPrimitive2D(std::move(aChildren))
     , mfRadius(fRadius)
 {
 }
@@ -58,7 +58,8 @@ void SoftEdgePrimitive2D::get2DDecomposition(
     basegfx::BColorModifierSharedPtr aBColorModifier
         = std::make_shared<basegfx::BColorModifier_replace>(basegfx::BColor());
 
-    const Primitive2DReference xRef(new ModifiedColorPrimitive2D(getChildren(), aBColorModifier));
+    const Primitive2DReference xRef(
+        new ModifiedColorPrimitive2D(Primitive2DContainer(getChildren()), aBColorModifier));
     rVisitor.append(xRef);
 }
 
diff --git a/drawinglayer/source/primitive2d/structuretagprimitive2d.cxx b/drawinglayer/source/primitive2d/structuretagprimitive2d.cxx
index e2465078d33c..c82b0088e29d 100644
--- a/drawinglayer/source/primitive2d/structuretagprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/structuretagprimitive2d.cxx
@@ -30,8 +30,8 @@ namespace drawinglayer::primitive2d
             const vcl::PDFWriter::StructElement& rStructureElement,
             bool bBackground,
             bool bIsImage,
-            const Primitive2DContainer& rChildren)
-        :   GroupPrimitive2D(rChildren),
+            Primitive2DContainer&& aChildren)
+        :   GroupPrimitive2D(std::move(aChildren)),
             maStructureElement(rStructureElement),
             mbBackground(bBackground),
             mbIsImage(bIsImage)
diff --git a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
index 203a38cae222..f723979e74be 100644
--- a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
@@ -80,11 +80,11 @@ namespace drawinglayer::primitive2d
 
                     if(fOpacity < 1.0)
                     {
-                        const Primitive2DContainer aContent { xRef };
+                        Primitive2DContainer aContent { xRef };
 
                         xRef = Primitive2DReference(
                             new UnifiedTransparencePrimitive2D(
-                                aContent,
+                                std::move(aContent),
                                 1.0 - fOpacity));
                     }
 
@@ -310,8 +310,8 @@ namespace drawinglayer::primitive2d
             const basegfx::B2DHomMatrix& rUnitGradientToObject,
             bool bInvert) const
         {
-            const Primitive2DContainer aTargetColorEntries(rTargetColor.maybeInvert(bInvert));
-            const Primitive2DContainer aTargetOpacityEntries(rTargetOpacity.maybeInvert(bInvert));
+            Primitive2DContainer aTargetColorEntries(rTargetColor.maybeInvert(bInvert));
+            Primitive2DContainer aTargetOpacityEntries(rTargetOpacity.maybeInvert(bInvert));
 
             if(aTargetColorEntries.empty())
                 return;
@@ -321,8 +321,8 @@ namespace drawinglayer::primitive2d
             if(!aTargetOpacityEntries.empty())
             {
                 const Primitive2DReference xRefOpacity = new TransparencePrimitive2D(
-                    aTargetColorEntries,
-                    aTargetOpacityEntries);
+                    std::move(aTargetColorEntries),
+                    std::move(aTargetOpacityEntries));
 
                 xRefContent = new TransformPrimitive2D(
                     rUnitGradientToObject,
@@ -332,7 +332,7 @@ namespace drawinglayer::primitive2d
             {
                 xRefContent = new TransformPrimitive2D(
                     rUnitGradientToObject,
-                    aTargetColorEntries);
+                    std::move(aTargetColorEntries));
             }
 
             rContainer.push_back(new MaskPrimitive2D(
diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
index 34dbf72b94ea..05417f55c505 100644
--- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
@@ -236,7 +236,7 @@ namespace drawinglayer::primitive2d
                             aShadowTransform,
                             aShadowColor,
                             0,          // fShadowBlur = 0, there's no blur for text shadow yet.
-                            aRetval);
+                            Primitive2DContainer(aRetval));
                     }
 
                     if(bHasTextRelief)
diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
index 79872474b69d..e68be6b28391 100644
--- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
@@ -81,8 +81,8 @@ void TextEffectPrimitive2D::create2DDecomposition(
                 // emboss/engrave in black, original forced to white
                 const basegfx::BColorModifierSharedPtr aBColorModifierToGray
                     = std::make_shared<basegfx::BColorModifier_replace>(basegfx::BColor(0.0));
-                const Primitive2DReference xModifiedColor(
-                    new ModifiedColorPrimitive2D(getTextContent(), aBColorModifierToGray));
+                const Primitive2DReference xModifiedColor(new ModifiedColorPrimitive2D(
+                    Primitive2DContainer(getTextContent()), aBColorModifierToGray));
 
                 rContainer.push_back(
                     new TransformPrimitive2D(aTransform, Primitive2DContainer{ xModifiedColor }));
@@ -91,8 +91,8 @@ void TextEffectPrimitive2D::create2DDecomposition(
                 const basegfx::BColorModifierSharedPtr aBColorModifierToWhite
                     = std::make_shared<basegfx::BColorModifier_replace>(basegfx::BColor(1.0));
 
-                rContainer.push_back(
-                    new ModifiedColorPrimitive2D(getTextContent(), aBColorModifierToWhite));
+                rContainer.push_back(new ModifiedColorPrimitive2D(
+                    Primitive2DContainer(getTextContent()), aBColorModifierToWhite));
             }
             else
             {
@@ -100,14 +100,14 @@ void TextEffectPrimitive2D::create2DDecomposition(
                 const basegfx::BColorModifierSharedPtr aBColorModifierToGray
                     = std::make_shared<basegfx::BColorModifier_replace>(
                         basegfx::BColor(0.75)); // 192
-                const Primitive2DReference xModifiedColor(
-                    new ModifiedColorPrimitive2D(getTextContent(), aBColorModifierToGray));
+                const Primitive2DReference xModifiedColor(new ModifiedColorPrimitive2D(
+                    Primitive2DContainer(getTextContent()), aBColorModifierToGray));
 
                 rContainer.push_back(
                     new TransformPrimitive2D(aTransform, Primitive2DContainer{ xModifiedColor }));
 
                 // add original, too
-                rContainer.push_back(new GroupPrimitive2D(getTextContent()));
+                rContainer.push_back(new GroupPrimitive2D(Primitive2DContainer(getTextContent())));
             }
 
             break;
@@ -119,41 +119,49 @@ void TextEffectPrimitive2D::create2DDecomposition(
 
             aTransform.set(0, 2, aDistance.getX());
             aTransform.set(1, 2, 0.0);
-            rContainer.push_back(new TransformPrimitive2D(aTransform, getTextContent()));
+            rContainer.push_back(
+                new TransformPrimitive2D(aTransform, Primitive2DContainer(getTextContent())));
 
             aTransform.set(0, 2, aDiagonalDistance.getX());
             aTransform.set(1, 2, aDiagonalDistance.getY());
-            rContainer.push_back(new TransformPrimitive2D(aTransform, getTextContent()));
+            rContainer.push_back(
+                new TransformPrimitive2D(aTransform, Primitive2DContainer(getTextContent())));
 
             aTransform.set(0, 2, 0.0);
             aTransform.set(1, 2, aDistance.getY());
-            rContainer.push_back(new TransformPrimitive2D(aTransform, getTextContent()));
+            rContainer.push_back(
+                new TransformPrimitive2D(aTransform, Primitive2DContainer(getTextContent())));
 
             aTransform.set(0, 2, -aDiagonalDistance.getX());
             aTransform.set(1, 2, aDiagonalDistance.getY());
-            rContainer.push_back(new TransformPrimitive2D(aTransform, getTextContent()));
+            rContainer.push_back(
+                new TransformPrimitive2D(aTransform, Primitive2DContainer(getTextContent())));
 
             aTransform.set(0, 2, -aDistance.getX());
             aTransform.set(1, 2, 0.0);
-            rContainer.push_back(new TransformPrimitive2D(aTransform, getTextContent()));
+            rContainer.push_back(
+                new TransformPrimitive2D(aTransform, Primitive2DContainer(getTextContent())));
 
             aTransform.set(0, 2, -aDiagonalDistance.getX());
             aTransform.set(1, 2, -aDiagonalDistance.getY());
-            rContainer.push_back(new TransformPrimitive2D(aTransform, getTextContent()));
+            rContainer.push_back(
+                new TransformPrimitive2D(aTransform, Primitive2DContainer(getTextContent())));
 
             aTransform.set(0, 2, 0.0);
             aTransform.set(1, 2, -aDistance.getY());
-            rContainer.push_back(new TransformPrimitive2D(aTransform, getTextContent()));
+            rContainer.push_back(
+                new TransformPrimitive2D(aTransform, Primitive2DContainer(getTextContent())));
 
             aTransform.set(0, 2, aDiagonalDistance.getX());
             aTransform.set(1, 2, -aDiagonalDistance.getY());
-            rContainer.push_back(new TransformPrimitive2D(aTransform, getTextContent()));
+            rContainer.push_back(
+                new TransformPrimitive2D(aTransform, Primitive2DContainer(getTextContent())));
 
             // at last, place original over it, but force to white
             const basegfx::BColorModifierSharedPtr aBColorModifierToWhite
                 = std::make_shared<basegfx::BColorModifier_replace>(basegfx::BColor(1.0, 1.0, 1.0));
-            rContainer.push_back(
-                new ModifiedColorPrimitive2D(getTextContent(), aBColorModifierToWhite));
+            rContainer.push_back(new ModifiedColorPrimitive2D(
+                Primitive2DContainer(getTextContent()), aBColorModifierToWhite));
 
             break;
         }
diff --git a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
index b7d4218f04fd..c7af9562adc1 100644
--- a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
@@ -26,8 +26,8 @@ using namespace com::sun::star;
 
 namespace drawinglayer::primitive2d
 {
-        TextHierarchyLinePrimitive2D::TextHierarchyLinePrimitive2D(const Primitive2DContainer& rChildren)
-        :   GroupPrimitive2D(rChildren)
+        TextHierarchyLinePrimitive2D::TextHierarchyLinePrimitive2D(Primitive2DContainer&& aChildren)
+        :   GroupPrimitive2D(std::move(aChildren))
         {
         }
 
@@ -39,9 +39,9 @@ namespace drawinglayer::primitive2d
 
 
         TextHierarchyParagraphPrimitive2D::TextHierarchyParagraphPrimitive2D(
-            const Primitive2DContainer& rChildren,
+            Primitive2DContainer&& aChildren,
             sal_Int16 nOutlineLevel)
-        :   GroupPrimitive2D(rChildren),
+        :   GroupPrimitive2D(std::move(aChildren)),
             mnOutlineLevel(nOutlineLevel)
         {
         }
@@ -66,8 +66,8 @@ namespace drawinglayer::primitive2d
 
 
 
-        TextHierarchyBulletPrimitive2D::TextHierarchyBulletPrimitive2D(const Primitive2DContainer& rChildren)
-        :   GroupPrimitive2D(rChildren)
+        TextHierarchyBulletPrimitive2D::TextHierarchyBulletPrimitive2D(Primitive2DContainer&& aChildren)
+        :   GroupPrimitive2D(std::move(aChildren))
         {
         }
 
@@ -78,8 +78,8 @@ namespace drawinglayer::primitive2d
         }
 
 
-        TextHierarchyBlockPrimitive2D::TextHierarchyBlockPrimitive2D(const Primitive2DContainer& rChildren)
-        :   GroupPrimitive2D(rChildren)
+        TextHierarchyBlockPrimitive2D::TextHierarchyBlockPrimitive2D(Primitive2DContainer&& aChildren)
+        :   GroupPrimitive2D(std::move(aChildren))
         {
         }
 
@@ -91,10 +91,10 @@ namespace drawinglayer::primitive2d
 
 
         TextHierarchyFieldPrimitive2D::TextHierarchyFieldPrimitive2D(
-            const Primitive2DContainer& rChildren,
+            Primitive2DContainer&& aChildren,
             const FieldType& rFieldType,
             const std::vector< std::pair< OUString, OUString>>* pNameValue)
-        :   GroupPrimitive2D(rChildren),
+        :   GroupPrimitive2D(std::move(aChildren)),
             meType(rFieldType)
         {
             if (nullptr != pNameValue)
@@ -136,8 +136,8 @@ namespace drawinglayer::primitive2d
         }
 
 
-        TextHierarchyEditPrimitive2D::TextHierarchyEditPrimitive2D(const Primitive2DContainer& rChildren)
-        :   GroupPrimitive2D(rChildren)
+        TextHierarchyEditPrimitive2D::TextHierarchyEditPrimitive2D(Primitive2DContainer&& aChildren)
+        :   GroupPrimitive2D(std::move(aChildren))
         {
         }
 
diff --git a/drawinglayer/source/primitive2d/textlineprimitive2d.cxx b/drawinglayer/source/primitive2d/textlineprimitive2d.cxx
index 32ab7982015a..f791d9e63598 100644
--- a/drawinglayer/source/primitive2d/textlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textlineprimitive2d.cxx
@@ -242,8 +242,8 @@ namespace drawinglayer::primitive2d
             aTransform.translate(aTranslate.getX(), aTranslate.getY());
 
             // add transform primitive
-            const Primitive2DContainer aContent { aNewPrimitive };
-            rContainer.push_back( new TransformPrimitive2D(aTransform, aContent) );
+            Primitive2DContainer aContent { aNewPrimitive };
+            rContainer.push_back( new TransformPrimitive2D(aTransform, std::move(aContent)) );
         }
 
         TextLinePrimitive2D::TextLinePrimitive2D(
diff --git a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx
index 0ddbedae0c16..afcb3f1abeae 100644
--- a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx
@@ -213,7 +213,7 @@ namespace drawinglayer::primitive2d
                 xRetval.push_back(
                         new TransformPrimitive2D(
                             aTransform,
-                            xRetval));
+                            Primitive2DContainer(xRetval)));
             }
 
             rContainer.insert(rContainer.end(), xRetval.begin(), xRetval.end());
diff --git a/drawinglayer/source/primitive2d/transformprimitive2d.cxx b/drawinglayer/source/primitive2d/transformprimitive2d.cxx
index b44b7d271459..ddd1594e270e 100644
--- a/drawinglayer/source/primitive2d/transformprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/transformprimitive2d.cxx
@@ -28,8 +28,8 @@ namespace drawinglayer::primitive2d
 {
         TransformPrimitive2D::TransformPrimitive2D(
             const basegfx::B2DHomMatrix& rTransformation,
-            const Primitive2DContainer& rChildren)
-        :   GroupPrimitive2D(rChildren),
+            Primitive2DContainer&& aChildren)
+        :   GroupPrimitive2D(std::move(aChildren)),
             maTransformation(rTransformation)
         {
         }
diff --git a/drawinglayer/source/primitive2d/transparenceprimitive2d.cxx b/drawinglayer/source/primitive2d/transparenceprimitive2d.cxx
index c36d9f76ef7f..8a86b1b295f4 100644
--- a/drawinglayer/source/primitive2d/transparenceprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/transparenceprimitive2d.cxx
@@ -27,10 +27,10 @@ using namespace com::sun::star;
 namespace drawinglayer::primitive2d
 {
         TransparencePrimitive2D::TransparencePrimitive2D(
-            const Primitive2DContainer& rChildren,
-            const Primitive2DContainer& rTransparence)
-        :   GroupPrimitive2D(rChildren),
-            maTransparence(rTransparence)
+            Primitive2DContainer&& aChildren,
+            Primitive2DContainer&& aTransparence)
+        :   GroupPrimitive2D(std::move(aChildren)),
+            maTransparence(std::move(aTransparence))
         {
         }
 
diff --git a/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx b/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx
index 88ecf44571cf..c50fcb008435 100644
--- a/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx
@@ -33,9 +33,9 @@ using namespace com::sun::star;
 namespace drawinglayer::primitive2d
 {
         UnifiedTransparencePrimitive2D::UnifiedTransparencePrimitive2D(
-            const Primitive2DContainer& rChildren,
+            Primitive2DContainer&& aChildren,
             double fTransparence)
-        :   GroupPrimitive2D(rChildren),
+        :   GroupPrimitive2D(std::move(aChildren)),
             mfTransparence(fTransparence)
         {
         }
@@ -93,7 +93,7 @@ namespace drawinglayer::primitive2d
                 aTransparenceContent[1] = Primitive2DReference(new PolygonHairlinePrimitive2D(aPolygon, aGray));
 
                 // create sub-transparence group with a gray-colored rectangular fill polygon
-                rVisitor.append(new TransparencePrimitive2D(getChildren(), aTransparenceContent));
+                rVisitor.append(new TransparencePrimitive2D(Primitive2DContainer(getChildren()), std::move(aTransparenceContent)));
             }
             else
             {
diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx
index 2fad74959cd1..bed08b9688fb 100644
--- a/drawinglayer/source/processor3d/shadow3dextractor.cxx
+++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx
@@ -76,15 +76,15 @@ namespace drawinglayer::processor3d
                         rPrimitive.getShadowTransform(),
                         rPrimitive.getShadowColor(),
                         0,  // shadow3d doesn't have rPrimitive.getShadowBlur() yet.
-                        aNewSubList);
+                        std::move(aNewSubList));
 
                     if(basegfx::fTools::more(rPrimitive.getShadowTransparence(), 0.0))
                     {
                         // create simpleTransparencePrimitive, add created primitives
-                        const primitive2d::Primitive2DContainer aNewTransPrimitiveVector { pNew };
+                        primitive2d::Primitive2DContainer aNewTransPrimitiveVector { pNew };
 
                         pNew = new primitive2d::UnifiedTransparencePrimitive2D(
-                            aNewTransPrimitiveVector,
+                            std::move(aNewTransPrimitiveVector),
                             rPrimitive.getShadowTransparence());
                     }
 
diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx
index d8fe291bf803..1f51384480cd 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -49,7 +49,7 @@ namespace drawinglayer
             // get destination size in pixels
             const MapMode aMapModePixel(MapUnit::MapPixel);
             const sal_uInt32 nViewVisibleArea(nDiscreteWidth * nDiscreteHeight);
-            drawinglayer::primitive2d::Primitive2DContainer aSequence(rSeq);
+            drawinglayer::primitive2d::Primitive2DContainer aSequence;
 
             if(nViewVisibleArea > nMaxSquarePixels)
             {
@@ -61,10 +61,12 @@ namespace drawinglayer
                 const drawinglayer::primitive2d::Primitive2DReference aEmbed(
                     new drawinglayer::primitive2d::TransformPrimitive2D(
                         basegfx::utils::createScaleB2DHomMatrix(fReduceFactor, fReduceFactor),
-                        rSeq));
+                        primitive2d::Primitive2DContainer(rSeq)));
 
                 aSequence = drawinglayer::primitive2d::Primitive2DContainer { aEmbed };
             }
+            else
+                aSequence = rSeq;
 
             const Point aEmptyPoint;
             const Size aSizePixel(nDiscreteWidth, nDiscreteHeight);
@@ -119,7 +121,7 @@ namespace drawinglayer
             // embed primitives to paint them black
             const primitive2d::Primitive2DReference xRef(
                 new primitive2d::ModifiedColorPrimitive2D(
-                    aSequence,
+                    std::move(aSequence),
                     std::make_shared<basegfx::BColorModifier_replace>(
                             basegfx::BColor(0.0, 0.0, 0.0))));
             const primitive2d::Primitive2DContainer xSeq { xRef };
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx
index 90a6920b2bb3..a7beae35ed83 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -348,10 +348,10 @@ namespace wmfemfhelper
 
             if (rClipPolyPolygon.count())
             {
-                const drawinglayer::primitive2d::Primitive2DReference xMask(
+                drawinglayer::primitive2d::Primitive2DReference xMask(
                     new drawinglayer::primitive2d::MaskPrimitive2D(
                         rClipPolyPolygon,
-                        xRetval));
+                        std::move(xRetval)));
 
                 xRetval = drawinglayer::primitive2d::Primitive2DContainer{ xMask };
             }
@@ -845,7 +845,7 @@ namespace wmfemfhelper
             {
                 rTargetHolders.Current().append(
                     new drawinglayer::primitive2d::GroupPrimitive2D(
-                        aSubContent));
+                        std::move(aSubContent)));
             }
         }
 
@@ -892,7 +892,7 @@ namespace wmfemfhelper
                     // force content to black
                     rTargetHolders.Current().append(
                         new drawinglayer::primitive2d::ModifiedColorPrimitive2D(
-                            aSubContent,
+                            std::move(aSubContent),
                             std::make_shared<basegfx::BColorModifier_replace>(
                                     basegfx::BColor(0.0, 0.0, 0.0))));
                 }
@@ -901,7 +901,7 @@ namespace wmfemfhelper
                     // invert content
                     rTargetHolders.Current().append(
                         new drawinglayer::primitive2d::InvertPrimitive2D(
-                            aSubContent));
+                            std::move(aSubContent)));
                 }
             }
         }
@@ -959,11 +959,11 @@ namespace wmfemfhelper
             if(!rPropertyHolder.getTransformation().isIdentity())
             {
                 const drawinglayer::primitive2d::Primitive2DReference xPrim(pRetval);
-                const drawinglayer::primitive2d::Primitive2DContainer xSeq { xPrim };
+                drawinglayer::primitive2d::Primitive2DContainer xSeq { xPrim };
 
                 pRetval = new drawinglayer::primitive2d::TransformPrimitive2D(
                     rPropertyHolder.getTransformation(),
-                    xSeq);
+                    std::move(xSeq));
             }
 
             return pRetval;
@@ -1270,7 +1270,7 @@ namespace wmfemfhelper
                         rProperty.getTextFillColor()));
 
                 // set as group at pResult
-                pResult = new drawinglayer::primitive2d::GroupPrimitive2D(aSequence);
+                pResult = new drawinglayer::primitive2d::GroupPrimitive2D(std::move(aSequence));
             }
         }
 
@@ -1420,7 +1420,7 @@ namespace wmfemfhelper
             rTarget.append(
                 new drawinglayer::primitive2d::TransformPrimitive2D(
                     rProperty.getTransformation(),
-                    xTargets));
+                    std::move(xTargets)));
         }
     }
 
@@ -1970,7 +1970,7 @@ namespace wmfemfhelper
                                 rTargetHolders.Current().append(
                                     new drawinglayer::primitive2d::TransformPrimitive2D(
                                         rPropertyHolders.Current().getTransformation(),
-                                        xSubContent));
+                                        std::move(xSubContent)));
                             }
                         }
                     }
@@ -2158,7 +2158,7 @@ namespace wmfemfhelper
                                 rTargetHolders.Current().append(
                                     new drawinglayer::primitive2d::MaskPrimitive2D(
                                         aOutline,
-                                        xGradient));
+                                        std::move(xGradient)));
                             }
                         }
                     }
@@ -2670,7 +2670,7 @@ namespace wmfemfhelper
 
                             // create primitives there and get them
                             createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current());
-                            const drawinglayer::primitive2d::Primitive2DContainer aSubContent(
+                            drawinglayer::primitive2d::Primitive2DContainer aSubContent(
                                 rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current()));
 
                             // back to old target
@@ -2680,7 +2680,7 @@ namespace wmfemfhelper
                             {
                                 rTargetHolders.Current().append(
                                     new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(
-                                        aSubContent,
+                                        std::move(aSubContent),
                                         nTransparence * 0.01));
                             }
                         }
@@ -2820,7 +2820,7 @@ namespace wmfemfhelper
                                     const drawinglayer::primitive2d::Primitive2DReference aEmbeddedTransform(
                                         new drawinglayer::primitive2d::TransformPrimitive2D(
                                             aSubTransform,
-                                            xSubContent));
+                                            std::move(xSubContent)));
 
                                     xSubContent = drawinglayer::primitive2d::Primitive2DContainer { aEmbeddedTransform };
                                 }
@@ -2834,7 +2834,7 @@ namespace wmfemfhelper
                                     // not really a gradient; create UnifiedTransparencePrimitive2D
                                     rTargetHolders.Current().append(
                                         new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(
-                                            xSubContent,
+                                            std::move(xSubContent),
                                             aAttribute.getStartColor().luminance()));
                                 }
                                 else
@@ -2852,7 +2852,7 @@ namespace wmfemfhelper
                                     // create transparence primitive
                                     rTargetHolders.Current().append(
                                         new drawinglayer::primitive2d::TransparencePrimitive2D(
-                                            xSubContent,
+                                            std::move(xSubContent),
                                             drawinglayer::primitive2d::Primitive2DContainer { xTransparence }));
                                 }
                             }
diff --git a/include/drawinglayer/primitive2d/animatedprimitive2d.hxx b/include/drawinglayer/primitive2d/animatedprimitive2d.hxx
index 677235111e2d..61ff4d33ef60 100644
--- a/include/drawinglayer/primitive2d/animatedprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/animatedprimitive2d.hxx
@@ -78,7 +78,7 @@ protected:
 public:
     /// constructor
     AnimatedSwitchPrimitive2D(const animation::AnimationEntry& rAnimationEntry,
-                              const Primitive2DContainer& rChildren, bool bIsTextAnimation);
+                              Primitive2DContainer&& aChildren, bool bIsTextAnimation);
 
     /// destructor - needed due to mpAnimationEntry
     virtual ~AnimatedSwitchPrimitive2D() override;
@@ -114,7 +114,7 @@ class DRAWINGLAYER_DLLPUBLIC AnimatedBlinkPrimitive2D final : public AnimatedSwi
 public:
     /// constructor
     AnimatedBlinkPrimitive2D(const animation::AnimationEntry& rAnimationEntry,
-                             const Primitive2DContainer& rChildren);
+                             Primitive2DContainer&& aChildren);
 
     /// create local decomposition
     virtual void
@@ -142,7 +142,7 @@ public:
     /// constructor
     AnimatedInterpolatePrimitive2D(const std::vector<basegfx::B2DHomMatrix>& rmMatrixStack,
                                    const animation::AnimationEntry& rAnimationEntry,
-                                   const Primitive2DContainer& rChildren);
+                                   Primitive2DContainer&& aChildren);
 
     /// create local decomposition
     virtual void
diff --git a/include/drawinglayer/primitive2d/glowprimitive2d.hxx b/include/drawinglayer/primitive2d/glowprimitive2d.hxx
index b91d40a21419..7dd65e7252dc 100644
--- a/include/drawinglayer/primitive2d/glowprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/glowprimitive2d.hxx
@@ -37,7 +37,7 @@ private:
 
 public:
     /// constructor
-    GlowPrimitive2D(const Color& rGlowColor, double fRadius, const Primitive2DContainer& rChildren);
+    GlowPrimitive2D(const Color& rGlowColor, double fRadius, Primitive2DContainer&& rChildren);
 
     /// data read access
     const Color& getGlowColor() const { return maGlowColor; }
diff --git a/include/drawinglayer/primitive2d/groupprimitive2d.hxx b/include/drawinglayer/primitive2d/groupprimitive2d.hxx
index 06719311505f..d2110ed0b3aa 100644
--- a/include/drawinglayer/primitive2d/groupprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/groupprimitive2d.hxx
@@ -68,7 +68,7 @@ namespace drawinglayer::primitive2d
 
         public:
             /// constructor
-            explicit GroupPrimitive2D(const Primitive2DContainer& rChildren);
+            explicit GroupPrimitive2D(Primitive2DContainer&& aChildren);
 
             /// data read access
             const Primitive2DContainer& getChildren() const { return maChildren; }
diff --git a/include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx b/include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx
index afcb127f0e81..3a13d2ab4d11 100644
--- a/include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx
@@ -37,7 +37,7 @@ namespace drawinglayer::primitive2d
         class DRAWINGLAYER_DLLPUBLIC HiddenGeometryPrimitive2D final : public GroupPrimitive2D
         {
         public:
-            explicit HiddenGeometryPrimitive2D(const Primitive2DContainer& rChildren);
+            explicit HiddenGeometryPrimitive2D(Primitive2DContainer&& aChildren);
 
             // despite returning an empty decomposition since it's no visualisation data,
             // range calculation is intended to use hidden geometry, so
diff --git a/include/drawinglayer/primitive2d/invertprimitive2d.hxx b/include/drawinglayer/primitive2d/invertprimitive2d.hxx
index b190e35ff134..ccafd51561a6 100644
--- a/include/drawinglayer/primitive2d/invertprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/invertprimitive2d.hxx
@@ -40,7 +40,7 @@ namespace drawinglayer::primitive2d
         {
         public:
             /// constructor
-            explicit InvertPrimitive2D(const Primitive2DContainer& rChildren);
+            explicit InvertPrimitive2D(Primitive2DContainer&& aChildren);
 
             /// provide unique ID
             virtual sal_uInt32 getPrimitive2DID() const override;
diff --git a/include/drawinglayer/primitive2d/maskprimitive2d.hxx b/include/drawinglayer/primitive2d/maskprimitive2d.hxx
index b2be9ae89cd5..e2d8c0e65249 100644
--- a/include/drawinglayer/primitive2d/maskprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/maskprimitive2d.hxx
@@ -51,7 +51,7 @@ namespace drawinglayer::primitive2d
             /// constructor
             MaskPrimitive2D(
                 const basegfx::B2DPolyPolygon& rMask,
-                const Primitive2DContainer& rChildren);
+                Primitive2DContainer&& aChildren);
 
             /// data read access
             const basegfx::B2DPolyPolygon& getMask() const { return maMask; }
diff --git a/include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx b/include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx
index 720e327e2889..167ed054fa6e 100644
--- a/include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx
@@ -53,7 +53,7 @@ namespace drawinglayer::primitive2d
         public:
             /// constructor
             ModifiedColorPrimitive2D(
-                const Primitive2DContainer& rChildren,
+                Primitive2DContainer&& aChildren,
                 const basegfx::BColorModifierSharedPtr& rColorModifier);
 
             /// data read access
diff --git a/include/drawinglayer/primitive2d/objectinfoprimitive2d.hxx b/include/drawinglayer/primitive2d/objectinfoprimitive2d.hxx
index 64db475a0e6c..9df931a96997 100644
--- a/include/drawinglayer/primitive2d/objectinfoprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/objectinfoprimitive2d.hxx
@@ -43,7 +43,7 @@ namespace drawinglayer::primitive2d
         public:
             /// constructor
             ObjectInfoPrimitive2D(
-                const Primitive2DContainer& rChildren,
+                Primitive2DContainer&& aChildren,
                 const OUString& rName,
                 const OUString& rTitle,
                 const OUString& rDesc);
diff --git a/include/drawinglayer/primitive2d/pagehierarchyprimitive2d.hxx b/include/drawinglayer/primitive2d/pagehierarchyprimitive2d.hxx
index f1842100d68a..8b6a08aa7fc0 100644
--- a/include/drawinglayer/primitive2d/pagehierarchyprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/pagehierarchyprimitive2d.hxx
@@ -35,7 +35,7 @@ namespace drawinglayer::primitive2d
         private:
         public:
             /// constructor
-            explicit PageHierarchyPrimitive2D(const Primitive2DContainer& rChildren);
+            explicit PageHierarchyPrimitive2D(Primitive2DContainer&& aChildren);
 
             /// provide unique ID
             virtual sal_uInt32 getPrimitive2DID() const override;
diff --git a/include/drawinglayer/primitive2d/shadowprimitive2d.hxx b/include/drawinglayer/primitive2d/shadowprimitive2d.hxx
index 37258d8f34ed..7df83a395f19 100644
--- a/include/drawinglayer/primitive2d/shadowprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/shadowprimitive2d.hxx
@@ -61,7 +61,7 @@ namespace drawinglayer::primitive2d
                 const basegfx::B2DHomMatrix& rShadowTransform,
                 const basegfx::BColor& rShadowColor,
                 double fShadowBlur,
-                const Primitive2DContainer& rChildren);
+                Primitive2DContainer&& aChildren);
 
             /// data read access
             const basegfx::B2DHomMatrix& getShadowTransform() const { return maShadowTransform; }
diff --git a/include/drawinglayer/primitive2d/softedgeprimitive2d.hxx b/include/drawinglayer/primitive2d/softedgeprimitive2d.hxx
index f16e50287b0e..90ada61f7b2e 100644
--- a/include/drawinglayer/primitive2d/softedgeprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/softedgeprimitive2d.hxx
@@ -32,7 +32,7 @@ private:
     mutable bool mbInMaskGeneration = false;
 
 public:
-    SoftEdgePrimitive2D(double fRadius, const Primitive2DContainer& rChildren);
+    SoftEdgePrimitive2D(double fRadius, Primitive2DContainer&& aChildren);
 
     double getRadius() const { return mfRadius; }
 
diff --git a/include/drawinglayer/primitive2d/structuretagprimitive2d.hxx b/include/drawinglayer/primitive2d/structuretagprimitive2d.hxx
index 17417f03c83a..c129e49d7800 100644
--- a/include/drawinglayer/primitive2d/structuretagprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/structuretagprimitive2d.hxx
@@ -56,7 +56,7 @@ namespace drawinglayer::primitive2d
                 const vcl::PDFWriter::StructElement& rStructureElement,
                 bool bBackground,
                 bool bIsImage,
-                const Primitive2DContainer& rChildren);
+                Primitive2DContainer&& aChildren);
 
             /// data read access
             const vcl::PDFWriter::StructElement& getStructureElement() const { return maStructureElement; }
diff --git a/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx b/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx
index 36fcb70677a8..00972a2843df 100644
--- a/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx
@@ -41,7 +41,7 @@ namespace drawinglayer::primitive2d
         private:
         public:
             /// constructor
-            explicit TextHierarchyLinePrimitive2D(const Primitive2DContainer& rChildren);
+            explicit TextHierarchyLinePrimitive2D(Primitive2DContainer&& aChildren);
 
             /// provide unique ID
             virtual sal_uInt32 getPrimitive2DID() const override;
@@ -56,7 +56,7 @@ namespace drawinglayer::primitive2d
         private:
         public:
             /// constructor
-            explicit TextHierarchyBulletPrimitive2D(const Primitive2DContainer& rChildren);
+            explicit TextHierarchyBulletPrimitive2D(Primitive2DContainer&& aChildren);
 
             /// provide unique ID
             virtual sal_uInt32 getPrimitive2DID() const override;
@@ -76,7 +76,7 @@ namespace drawinglayer::primitive2d
         public:
             /// constructor
             explicit TextHierarchyParagraphPrimitive2D(
-                const Primitive2DContainer& rChildren,
+                Primitive2DContainer&& aChildren,
                 sal_Int16 nOutlineLevel = -1);
 
             /// data read access
@@ -98,7 +98,7 @@ namespace drawinglayer::primitive2d
         private:
         public:
             /// constructor
-            explicit TextHierarchyBlockPrimitive2D(const Primitive2DContainer& rChildren);
+            explicit TextHierarchyBlockPrimitive2D(Primitive2DContainer&& aChildren);
 
             /// provide unique ID
             virtual sal_uInt32 getPrimitive2DID() const override;
@@ -138,7 +138,7 @@ namespace drawinglayer::primitive2d
         public:
             /// constructor
             TextHierarchyFieldPrimitive2D(
-                const Primitive2DContainer& rChildren,
+                Primitive2DContainer&& aChildren,
                 const FieldType& rFieldType,
                 const std::vector< std::pair< OUString, OUString>>* pNameValue = nullptr);
 
@@ -168,7 +168,7 @@ namespace drawinglayer::primitive2d
         private:
         public:
             /// constructor
-            explicit TextHierarchyEditPrimitive2D(const Primitive2DContainer& rChildren);
+            explicit TextHierarchyEditPrimitive2D(Primitive2DContainer&& aChildren);
 
             /// provide unique ID
             virtual sal_uInt32 getPrimitive2DID() const override;
diff --git a/include/drawinglayer/primitive2d/transformprimitive2d.hxx b/include/drawinglayer/primitive2d/transformprimitive2d.hxx
index 25549e633ad9..c1b620fc7628 100644
--- a/include/drawinglayer/primitive2d/transformprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/transformprimitive2d.hxx
@@ -56,7 +56,7 @@ namespace drawinglayer::primitive2d
             /// constructor
             TransformPrimitive2D(
                 const basegfx::B2DHomMatrix& rTransformation,
-                const Primitive2DContainer& rChildren);
+                Primitive2DContainer&& rChildren);
 
             /// data read access
             const basegfx::B2DHomMatrix& getTransformation() const { return maTransformation; }
diff --git a/include/drawinglayer/primitive2d/transparenceprimitive2d.hxx b/include/drawinglayer/primitive2d/transparenceprimitive2d.hxx
index 3527715783a1..14658abe3dd4 100644
--- a/include/drawinglayer/primitive2d/transparenceprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/transparenceprimitive2d.hxx
@@ -62,8 +62,8 @@ namespace drawinglayer::primitive2d
                 using the common RGB_to_luminance definitions
              */
             TransparencePrimitive2D(
-                const Primitive2DContainer& rChildren,
-                const Primitive2DContainer& rTransparence);
+                Primitive2DContainer&& rChildren,
+                Primitive2DContainer&& aTransparence);
 
             /// data read access
             const Primitive2DContainer& getTransparence() const { return maTransparence; }
diff --git a/include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx b/include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx
index caeac986cde6..b5a75f295cbe 100644
--- a/include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx
@@ -44,7 +44,7 @@ namespace drawinglayer::primitive2d
         public:
             /// constructor
             UnifiedTransparencePrimitive2D(
-                const Primitive2DContainer& rChildren,
+                Primitive2DContainer&& rChildren,
                 double fTransparence);
 
             /// data read access
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 6c4f83244c74..6d59720e7de5 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1769,12 +1769,12 @@ drawinglayer::primitive2d::Primitive2DContainer ImplRenderPaintProc::createRedir
                         const bool bBackground(nullptr != pSdrPage && pSdrPage->IsMasterPage());
                         const bool bImage(pObject->GetObjIdentifier() == OBJ_GRAF);
 
-                        const drawinglayer::primitive2d::Primitive2DReference xReference(
+                        drawinglayer::primitive2d::Primitive2DReference xReference(
                             new drawinglayer::primitive2d::StructureTagPrimitive2D(
                                 eElement,
                                 bBackground,
                                 bImage,
-                                xRetval));
+                                std::move(xRetval)));
 
                         xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference };
                     }
diff --git a/svgio/source/svgreader/svgclippathnode.cxx b/svgio/source/svgreader/svgclippathnode.cxx
index 341ddaf00327..31ac632d33dc 100644
--- a/svgio/source/svgreader/svgclippathnode.cxx
+++ b/svgio/source/svgreader/svgclippathnode.cxx
@@ -110,7 +110,7 @@ namespace svgio::svgreader
                 const drawinglayer::primitive2d::Primitive2DReference xRef(
                     new drawinglayer::primitive2d::TransformPrimitive2D(
                         *getTransform(),
-                        aNewTarget));
+                        std::move(aNewTarget)));
 
                 rTarget.push_back(xRef);
             }
@@ -231,10 +231,10 @@ namespace svgio::svgreader
                     // geometry. Using the automatically set mbIsClipPathContent at
                     // SvgStyleAttributes the clip definition is without fill, stroke,
                     // and strokeWidth and forced to black
-                    const drawinglayer::primitive2d::Primitive2DReference xEmbedTransparence(
+                    drawinglayer::primitive2d::Primitive2DReference xEmbedTransparence(
                         new drawinglayer::primitive2d::MaskPrimitive2D(
                             aClipPolyPolygon,
-                            rContent));
+                            std::move(rContent)));
 
                     rContent = drawinglayer::primitive2d::Primitive2DContainer { xEmbedTransparence };
                 }
diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx
index 2dba10c6631b..15d48916eae5 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -328,7 +328,7 @@ namespace svgio::svgreader
                     const drawinglayer::primitive2d::Primitive2DReference xRef(
                         new drawinglayer::primitive2d::TransformPrimitive2D(
                             aEmbeddingTransform,
-                            aNewTarget));
+                            std::move(aNewTarget)));
 
                     aNewTarget = drawinglayer::primitive2d::Primitive2DContainer { xRef };
                 }
@@ -340,7 +340,7 @@ namespace svgio::svgreader
                         new drawinglayer::primitive2d::MaskPrimitive2D(
                             basegfx::B2DPolyPolygon(
                                 basegfx::utils::createPolygonFromRect(aTarget)),
-                            aNewTarget));
+                            std::move(aNewTarget)));
 
                     aNewTarget = drawinglayer::primitive2d::Primitive2DContainer { xMask };
                 }
diff --git a/svgio/source/svgreader/svgmasknode.cxx b/svgio/source/svgreader/svgmasknode.cxx
index d036bed33656..6b2bc2b17430 100644
--- a/svgio/source/svgreader/svgmasknode.cxx
+++ b/svgio/source/svgreader/svgmasknode.cxx
@@ -174,10 +174,10 @@ namespace svgio::svgreader
             if(getTransform())
             {
                 // create embedding group element with transformation
-                const drawinglayer::primitive2d::Primitive2DReference xRef(
+                drawinglayer::primitive2d::Primitive2DReference xRef(
                     new drawinglayer::primitive2d::TransformPrimitive2D(
                         *getTransform(),
-                        aNewTarget));
+                        std::move(aNewTarget)));
 
                 aNewTarget = drawinglayer::primitive2d::Primitive2DContainer { xRef };
             }
@@ -241,12 +241,12 @@ namespace svgio::svgreader
                     if (SvgUnits::objectBoundingBox == maMaskContentUnits)
                     {
                         // mask is object-relative, embed in content transformation
-                        const drawinglayer::primitive2d::Primitive2DReference xTransform(
+                        drawinglayer::primitive2d::Primitive2DReference xTransform(
                             new drawinglayer::primitive2d::TransformPrimitive2D(
                                 basegfx::utils::createScaleTranslateB2DHomMatrix(
                                     aContentRange.getRange(),
                                     aContentRange.getMinimum()),
-                                aMaskTarget));
+                                std::move(aMaskTarget)));
 
                         aMaskTarget = drawinglayer::primitive2d::Primitive2DContainer { xTransform };
                     }
@@ -255,10 +255,10 @@ namespace svgio::svgreader
                         // #i124852#
                         if(pTransform)
                         {
-                            const drawinglayer::primitive2d::Primitive2DReference xTransform(
+                            drawinglayer::primitive2d::Primitive2DReference xTransform(
                                 new drawinglayer::primitive2d::TransformPrimitive2D(
                                     *pTransform,
-                                    aMaskTarget));
+                                    std::move(aMaskTarget)));
 
                             aMaskTarget = drawinglayer::primitive2d::Primitive2DContainer { xTransform };
                         }
@@ -267,9 +267,9 @@ namespace svgio::svgreader
                     // embed content to a ModifiedColorPrimitive2D since the definitions
                     // how content is used as alpha is special for Svg
                     {
-                        const drawinglayer::primitive2d::Primitive2DReference xInverseMask(
+                        drawinglayer::primitive2d::Primitive2DReference xInverseMask(
                             new drawinglayer::primitive2d::ModifiedColorPrimitive2D(
-                                aMaskTarget,
+                                std::move(aMaskTarget),
                                 std::make_shared<basegfx::BColorModifier_luminance_to_alpha>()));
 
                         aMaskTarget = drawinglayer::primitive2d::Primitive2DContainer { xInverseMask };
@@ -278,8 +278,8 @@ namespace svgio::svgreader
                     // prepare new content
                     drawinglayer::primitive2d::Primitive2DReference xNewContent(
                         new drawinglayer::primitive2d::TransparencePrimitive2D(
-                            rTarget,
-                            aMaskTarget));
+                            std::move(rTarget),
+                            std::move(aMaskTarget)));
 
                     // output up to now is defined by aContentRange and mask is oriented
                     // relative to it. It is possible that aOffscreenBufferRange defines
diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx
index e940acbe6a07..c01539ba389a 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -569,9 +569,9 @@ namespace svgio::svgreader
                         }
 
                         // pack in ObjectInfoPrimitive2D group
-                        const drawinglayer::primitive2d::Primitive2DReference xRef(
+                        drawinglayer::primitive2d::Primitive2DReference xRef(
                             new drawinglayer::primitive2d::ObjectInfoPrimitive2D(
-                                rTarget,
+                                std::move(rTarget),
                                 aObjectName,
                                 rTitle,
                                 rDesc));
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index df7efce88a85..4d2b155f3ff8 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -492,7 +492,7 @@ namespace svgio::svgreader
                     rTarget.push_back(
                         new drawinglayer::primitive2d::TransformPrimitive2D(
                             *rFillPattern.getPatternTransform(),
-                            aNewTarget));
+                            std::move(aNewTarget)));
                 }
             }
             else
@@ -579,7 +579,7 @@ namespace svgio::svgreader
                 const drawinglayer::primitive2d::Primitive2DReference xRef(
                     new drawinglayer::primitive2d::TransformPrimitive2D(
                         aMapPrimitivesToUnitRange,
-                        aPrimitives));
+                        std::move(aPrimitives)));
 
                 aPrimitives = drawinglayer::primitive2d::Primitive2DContainer { xRef };
             }
@@ -638,7 +638,7 @@ namespace svgio::svgreader
                 // embed in UnifiedTransparencePrimitive2D
                 rTarget.push_back(
                     new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(
-                        aNewFill,
+                        std::move(aNewFill),
                         1.0 - fFillOpacity));
             }
             else
@@ -794,7 +794,7 @@ namespace svgio::svgreader
                 // embed in UnifiedTransparencePrimitive2D
                 rTarget.push_back(
                     new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(
-                        aNewStroke,
+                        std::move(aNewStroke),
                         1.0 - fStrokeOpacity));
             }
             else
@@ -1057,7 +1057,7 @@ namespace svgio::svgreader
                         drawinglayer::primitive2d::Primitive2DReference xMarker(
                             new drawinglayer::primitive2d::TransformPrimitive2D(
                                 aCombinedTransform,
-                                aPreparedMarkerPrimitives));
+                                drawinglayer::primitive2d::Primitive2DContainer(aPreparedMarkerPrimitives)));
 
                         if(!aPreparedMarkerClipRange.isEmpty())
                         {
@@ -1168,7 +1168,7 @@ namespace svgio::svgreader
                 // embed in UnifiedTransparencePrimitive2D
                 const drawinglayer::primitive2d::Primitive2DReference xRef(
                     new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(
-                        aSource,
+                        std::move(aSource),
                         1.0 - fOpacity));
 
                 aSource = drawinglayer::primitive2d::Primitive2DContainer { xRef };
@@ -1181,7 +1181,7 @@ namespace svgio::svgreader
                 const drawinglayer::primitive2d::Primitive2DReference xRef(
                     new drawinglayer::primitive2d::TransformPrimitive2D(
                         *pTransform,
-                        aSource));
+                        std::move(aSource)));
 
                 aSource = drawinglayer::primitive2d::Primitive2DContainer { xRef };
             }
@@ -1231,7 +1231,7 @@ namespace svgio::svgreader
                             // Slide/Page information
                             const drawinglayer::primitive2d::Primitive2DReference xRef(
                                 new drawinglayer::primitive2d::PageHierarchyPrimitive2D(
-                                    aSource));
+                                    std::move(aSource)));
 
                             aSource = drawinglayer::primitive2d::Primitive2DContainer { xRef };
                         }
diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx
index 71246df49a05..027f9e505ae7 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -433,7 +433,7 @@ namespace svgio::svgreader
                                 const drawinglayer::primitive2d::Primitive2DReference xRef(
                                     new drawinglayer::primitive2d::TransformPrimitive2D(
                                         aEmbeddingTransform,
-                                        aSequence));
+                                        drawinglayer::primitive2d::Primitive2DContainer(aSequence)));
 
                                 if(rRatio.isMeetOrSlice())
                                 {
@@ -464,7 +464,7 @@ namespace svgio::svgreader
                                 const drawinglayer::primitive2d::Primitive2DReference xRef(
                                     new drawinglayer::primitive2d::TransformPrimitive2D(
                                         basegfx::utils::createTranslateB2DHomMatrix(fX, fY),
-                                        aSequence));
+                                        std::move(aSequence)));
 
                                 aSequence = drawinglayer::primitive2d::Primitive2DContainer { xRef, };
                             }
@@ -475,7 +475,7 @@ namespace svgio::svgreader
                                     basegfx::B2DPolyPolygon(
                                         basegfx::utils::createPolygonFromRect(
                                             basegfx::B2DRange(fX, fY, fX + fW, fY + fH))),
-                                    aSequence));
+                                    drawinglayer::primitive2d::Primitive2DContainer(aSequence)));
 
                             // append
                             rTarget.push_back(xMask);
@@ -567,7 +567,7 @@ namespace svgio::svgreader
                                     const drawinglayer::primitive2d::Primitive2DReference xTransform(
                                         new drawinglayer::primitive2d::TransformPrimitive2D(
                                             aViewBoxMapping,
-                                            aSequence));
+                                            std::move(aSequence)));
 
                                     aSequence = drawinglayer::primitive2d::Primitive2DContainer { xTransform };
                                 }
@@ -645,7 +645,7 @@ namespace svgio::svgreader
                                     basegfx::B2DPolyPolygon(
                                         basegfx::utils::createPolygonFromRect(
                                             aSvgCanvasRange)),
-                                    aSequence));
+                                    std::move(aSequence)));
 
                             aSequence = drawinglayer::primitive2d::Primitive2DContainer { xMask };
                         }
@@ -688,7 +688,7 @@ namespace svgio::svgreader
                                 const drawinglayer::primitive2d::Primitive2DReference xTransform(
                                     new drawinglayer::primitive2d::TransformPrimitive2D(
                                         aTransform,
-                                        aSequence));
+                                        std::move(aSequence)));
 
                                 aSequence = drawinglayer::primitive2d::Primitive2DContainer { xTransform };
                             }
diff --git a/svgio/source/svgreader/svgusenode.cxx b/svgio/source/svgreader/svgusenode.cxx
index a5a2d5e8ad57..b3db75df0d4e 100644
--- a/svgio/source/svgreader/svgusenode.cxx
+++ b/svgio/source/svgreader/svgusenode.cxx
@@ -172,7 +172,7 @@ namespace svgio::svgreader
                 const drawinglayer::primitive2d::Primitive2DReference xRef(
                     new drawinglayer::primitive2d::TransformPrimitive2D(
                         aTransform,
-                        aNewTarget));
+                        std::move(aNewTarget)));
 
                 rTarget.push_back(xRef);
             }
diff --git a/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx b/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx
index db1c94c1b7fa..01888e60d141 100644
--- a/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx
+++ b/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx
@@ -79,7 +79,7 @@ namespace drawinglayer::primitive2d
             const attribute::SdrGlowAttribute& rGlow);
 
         Primitive2DContainer SVXCORE_DLLPUBLIC createEmbeddedSoftEdgePrimitive(
-            const Primitive2DContainer& rContent,
+            Primitive2DContainer&& aContent,
             sal_Int32 nRadius);
 
 } // end of namespace drawinglayer::primitive2d
diff --git a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
index 96402f54b6df..ab1483be7967 100644
--- a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
@@ -75,7 +75,7 @@ namespace drawinglayer::primitive2d
 
         protected:
             // support for XTEXT_PAINTSHAPE_BEGIN/XTEXT_PAINTSHAPE_END Metafile comments
-            static void encapsulateWithTextHierarchyBlockPrimitive2D(Primitive2DContainer& rContainer, const Primitive2DContainer& rCandidate);
+            static void encapsulateWithTextHierarchyBlockPrimitive2D(Primitive2DContainer& rContainer, Primitive2DContainer&& aCandidate);
 
         public:
             SdrTextPrimitive2D(
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 195f09c9a3b5..33f1162cb3f9 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -166,13 +166,13 @@ void Impl3DMirrorConstructOverlay::SetMirrorAxis(Point aMirrorAxisA, Point aMirr
                     if(!aMatrixTransform.isIdentity())
                     {
                         // embed in transformation group
-                        drawinglayer::primitive2d::Primitive2DReference aTransformPrimitive2D(new drawinglayer::primitive2d::TransformPrimitive2D(aMatrixTransform, aContent));
+                        drawinglayer::primitive2d::Primitive2DReference aTransformPrimitive2D(new drawinglayer::primitive2d::TransformPrimitive2D(aMatrixTransform, std::move(aContent)));
                         aContent = drawinglayer::primitive2d::Primitive2DContainer { aTransformPrimitive2D };
                     }
 
                     // if we have full overlay from selected objects, embed with 50% transparence, the
                     // transformation is added to the OverlayPrimitive2DSequenceObject
-                    drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparencePrimitive2D(new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(aContent, 0.5));
+                    drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparencePrimitive2D(new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(std::move(aContent), 0.5));
                     aContent = drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparencePrimitive2D };
 
                     std::unique_ptr<sdr::overlay::OverlayPrimitive2DSequenceObject> pNew(new sdr::overlay::OverlayPrimitive2DSequenceObject(aContent));
diff --git a/svx/source/sdr/contact/viewcontactofsdrobj.cxx b/svx/source/sdr/contact/viewcontactofsdrobj.cxx
index 5009be19f8ba..16a907cb581d 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobj.cxx
@@ -172,7 +172,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrObj::embedToObje
     {
         const drawinglayer::primitive2d::Primitive2DReference xRef(
             new drawinglayer::primitive2d::ObjectInfoPrimitive2D(
-                aSource,
+                std::move(aSource),
                 GetSdrObject().GetName(),
                 GetSdrObject().GetTitle(),
                 GetSdrObject().GetDescription()));
diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
index 0c53ef5a4499..610c483cbec8 100644
--- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
@@ -91,7 +91,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrOle2Obj::createP
     {
         // try to get chart primitives and chart range directly from xChartModel
         basegfx::B2DRange aChartContentRange;
-        const drawinglayer::primitive2d::Primitive2DContainer aChartSequence(
+        drawinglayer::primitive2d::Primitive2DContainer aChartSequence(
             ChartHelper::tryToGetChartContentAsPrimitive2DSequence(
                 GetOle2Obj().getXModel(),
                 aChartContentRange));
@@ -112,7 +112,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrOle2Obj::createP
             aEmbed = aObjectMatrix * aEmbed;
             xContent = new drawinglayer::primitive2d::TransformPrimitive2D(
                 aEmbed,
-                aChartSequence);
+                std::move(aChartSequence));
         }
     }
 
diff --git a/svx/source/sdr/contact/viewcontactofvirtobj.cxx b/svx/source/sdr/contact/viewcontactofvirtobj.cxx
index b2f92bd28be8..dcf10bd1daed 100644
--- a/svx/source/sdr/contact/viewcontactofvirtobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofvirtobj.cxx
@@ -76,10 +76,10 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfVirtObj::createView
     if(!xSequenceVirtual.empty())
     {
         // create transform primitive
-        const drawinglayer::primitive2d::Primitive2DReference xReference(
+        drawinglayer::primitive2d::Primitive2DReference xReference(
             new drawinglayer::primitive2d::TransformPrimitive2D(
                 aObjectMatrix,
-                xSequenceVirtual));
+                drawinglayer::primitive2d::Primitive2DContainer(xSequenceVirtual)));
 
         return drawinglayer::primitive2d::Primitive2DContainer { xReference };
     }
diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx
index fc43823e0e4a..00674a200bf1 100644
--- a/svx/source/sdr/contact/viewobjectcontact.cxx
+++ b/svx/source/sdr/contact/viewobjectcontact.cxx
@@ -314,9 +314,9 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContact::createPrimiti
                 std::make_shared<basegfx::BColorModifier_interpolate>(
                     aRGBWhite,
                     0.5);
-            const drawinglayer::primitive2d::Primitive2DReference xReference(
+            drawinglayer::primitive2d::Primitive2DReference xReference(
                 new drawinglayer::primitive2d::ModifiedColorPrimitive2D(
-                    xRetval,
+                    std::move(xRetval),
                     aBColorModifier));
 
             xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference };
@@ -369,7 +369,7 @@ drawinglayer::primitive2d::Primitive2DContainer const & ViewObjectContact::getPr
             const drawinglayer::primitive2d::Primitive2DReference aEmbed(
                  new drawinglayer::primitive2d::TransformPrimitive2D(
                     aTranslateGridOffset,
-                    mxPrimitive2DSequence));
+                    drawinglayer::primitive2d::Primitive2DContainer(mxPrimitive2DSequence)));
 
             // Set values at local data. So for now, the mechanism is to reset some of the
             // defining things (mxPrimitive2DSequence, maGridOffset) and re-create the
diff --git a/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx b/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx
index 37070281b5cf..52dd5c30fdab 100644
--- a/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx
@@ -105,7 +105,7 @@ namespace sdr::contact
                             0.5);
                     const drawinglayer::primitive2d::Primitive2DReference xReference(
                         new drawinglayer::primitive2d::ModifiedColorPrimitive2D(
-                            xRetval,
+                            std::move(xRetval),
                             aBColorModifier));
 
                     xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference };
diff --git a/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx b/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx
index b938322cbff9..54076af665b6 100644
--- a/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx
@@ -108,7 +108,7 @@ namespace sdr::contact
             {
                 // get range of MasterPage sub hierarchy
                 const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D());
-                const basegfx::B2DRange aSubHierarchyRange(xMasterPageSequence.getB2DRange(rViewInformation2D));
+                basegfx::B2DRange aSubHierarchyRange(xMasterPageSequence.getB2DRange(rViewInformation2D));
 
                 if (rPageFillRange.isInside(aSubHierarchyRange))
                 {
@@ -123,7 +123,7 @@ namespace sdr::contact
 
                     // need to create a clip primitive, add clipped list to target
                     const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::MaskPrimitive2D(
-                        basegfx::B2DPolyPolygon(basegfx::utils::createPolygonFromRect(aCommonArea)), xMasterPageSequence));
+                        basegfx::B2DPolyPolygon(basegfx::utils::createPolygonFromRect(aCommonArea)), std::move(xMasterPageSequence)));
                     xRetval.push_back(xReference);
                 }
             }
diff --git a/svx/source/sdr/overlay/overlaybitmapex.cxx b/svx/source/sdr/overlay/overlaybitmapex.cxx
index 75433989ade7..54ccf788b2e3 100644
--- a/svx/source/sdr/overlay/overlaybitmapex.cxx
+++ b/svx/source/sdr/overlay/overlaybitmapex.cxx
@@ -37,9 +37,9 @@ namespace sdr::overlay
 
             if(basegfx::fTools::more(mfAlpha, 0.0))
             {
-                const drawinglayer::primitive2d::Primitive2DContainer aNewTransPrimitiveVector { aReference };
+                drawinglayer::primitive2d::Primitive2DContainer aNewTransPrimitiveVector { aReference };
                 aReference = drawinglayer::primitive2d::Primitive2DReference(
-                                new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(aNewTransPrimitiveVector, mfAlpha));
+                                new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(std::move(aNewTransPrimitiveVector), mfAlpha));
             }
 
             return drawinglayer::primitive2d::Primitive2DContainer { aReference };
diff --git a/svx/source/sdr/overlay/overlayobject.cxx b/svx/source/sdr/overlay/overlayobject.cxx
index 02211a192c16..841e241895af 100644
--- a/svx/source/sdr/overlay/overlayobject.cxx
+++ b/svx/source/sdr/overlay/overlayobject.cxx
@@ -111,10 +111,10 @@ namespace sdr::overlay
                     const basegfx::B2DHomMatrix aTranslateGridOffset(
                         basegfx::utils::createTranslateB2DHomMatrix(
                             getOffset()));
-                    const drawinglayer::primitive2d::Primitive2DReference aEmbed(
+                    drawinglayer::primitive2d::Primitive2DReference aEmbed(
                         new drawinglayer::primitive2d::TransformPrimitive2D(
                             aTranslateGridOffset,
-                            maPrimitive2DSequence));
+                            std::move(const_cast<drawinglayer::primitive2d::Primitive2DContainer&>(maPrimitive2DSequence))));
 
                     const_cast< OverlayObject* >(this)->maPrimitive2DSequence = drawinglayer::primitive2d::Primitive2DContainer { aEmbed };
                 }
diff --git a/svx/source/sdr/overlay/overlayobjectcell.cxx b/svx/source/sdr/overlay/overlayobjectcell.cxx
index 68ab8281e334..7ebc257e3fec 100644
--- a/svx/source/sdr/overlay/overlayobjectcell.cxx
+++ b/svx/source/sdr/overlay/overlayobjectcell.cxx
@@ -65,9 +65,9 @@ namespace sdr::overlay
 
 

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list