diff options
94 files changed, 314 insertions, 308 deletions
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 // embed in 50% transparent paint - const drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparence( + drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparence( new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D( - aRetval, + std::move(aRetval), 0.5)); aRetval = drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparence }; diff --git a/svx/source/sdr/overlay/overlaypolypolygon.cxx b/svx/source/sdr/overlay/overlaypolypolygon.cxx index 9b6abd8beb8a..69dacf375c2a 100644 --- a/svx/source/sdr/overlay/overlaypolypolygon.cxx +++ b/svx/source/sdr/overlay/overlaypolypolygon.cxx @@ -62,8 +62,8 @@ namespace sdr::overlay sal_uInt8 nTransparency = 255 - getBaseColor().GetAlpha(); if (nTransparency > 0) { - const drawinglayer::primitive2d::Primitive2DReference aTransparencePrimitive( - new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(aReturnContainer, nTransparency / 255.0)); + drawinglayer::primitive2d::Primitive2DReference aTransparencePrimitive( + new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(std::move(aReturnContainer), nTransparency / 255.0)); aReturnContainer = drawinglayer::primitive2d::Primitive2DContainer{ aTransparencePrimitive }; } } diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index 8a3968def14c..9896a49ec4e8 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -118,9 +118,9 @@ namespace sdr::overlay if(bInvert) { // embed all in invert primitive - const drawinglayer::primitive2d::Primitive2DReference aInvert( + drawinglayer::primitive2d::Primitive2DReference aInvert( new drawinglayer::primitive2d::InvertPrimitive2D( - aRetval)); + std::move(aRetval))); aRetval = drawinglayer::primitive2d::Primitive2DContainer { aInvert }; } else if(OverlayType::Transparent == maLastOverlayType) @@ -129,7 +129,7 @@ namespace sdr::overlay const double fTransparence(mnLastTransparence / 100.0); const drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparence( new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D( - aRetval, + std::move(aRetval), fTransparence)); if(mbBorder) @@ -141,9 +141,7 @@ namespace sdr::overlay aRGBColor)); // add both to result - aRetval.resize(2); - aRetval[0] = aUnifiedTransparence; - aRetval[1] = aSelectionOutline; + aRetval = drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparence, aSelectionOutline }; } else { diff --git a/svx/source/sdr/overlay/overlaytools.cxx b/svx/source/sdr/overlay/overlaytools.cxx index bb2ac72c3cee..b02775e9a2be 100644 --- a/svx/source/sdr/overlay/overlaytools.cxx +++ b/svx/source/sdr/overlay/overlaytools.cxx @@ -92,7 +92,7 @@ void OverlayStaticRectanglePrimitive::create2DDecomposition(Primitive2DContainer { const Primitive2DReference aFillTransparent( new UnifiedTransparencePrimitive2D( - aPrimitive2DSequence, + std::move(aPrimitive2DSequence), mfTransparence)); aPrimitive2DSequence = Primitive2DContainer { aFillTransparent }; @@ -367,9 +367,9 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const // embed filled to transparency (if used) if(getTransparence() > 0.0) { - const Primitive2DReference aFillTransparent( + Primitive2DReference aFillTransparent( new UnifiedTransparencePrimitive2D( - aRetval, + std::move(aRetval), getTransparence())); aRetval = Primitive2DContainer { aFillTransparent }; diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx index 058457f9e72a..50a2061ef9e9 100644 --- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx @@ -38,7 +38,7 @@ namespace drawinglayer::primitive2d // Soft edges should be before text, since text is not affected by soft edges if (!aRetval.empty() && getSdrSTAttribute().getSoftEdgeRadius()) { - aRetval = createEmbeddedSoftEdgePrimitive(aRetval, + aRetval = createEmbeddedSoftEdgePrimitive(std::move(aRetval), getSdrSTAttribute().getSoftEdgeRadius()); } diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index e75ad0a3c6a5..bce84bf1eddc 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -187,26 +187,26 @@ basegfx::B2DRange getTextAnchorRange(const attribute::SdrTextAttribute& rText, if(0.0 != rFill.getTransparence()) { // create simpleTransparencePrimitive, add created fill primitive - const Primitive2DContainer aContent { pNewFillPrimitive }; - return Primitive2DReference(new UnifiedTransparencePrimitive2D(aContent, rFill.getTransparence())); + Primitive2DContainer aContent { pNewFillPrimitive }; + return Primitive2DReference(new UnifiedTransparencePrimitive2D(std::move(aContent), rFill.getTransparence())); } else if(!rFillGradient.isDefault()) { // create sequence with created fill primitive - const Primitive2DContainer aContent { pNewFillPrimitive }; + Primitive2DContainer aContent { pNewFillPrimitive }; // create FillGradientPrimitive2D for transparence and add to new sequence // fillGradientPrimitive is enough here (compared to PolyPolygonGradientPrimitive2D) since float transparence will be masked anyways const basegfx::B2DRange aRange(basegfx::utils::getRange(rPolyPolygon)); - const Primitive2DReference xRefB( + Primitive2DReference xRefB( new FillGradientPrimitive2D( aRange, rDefinitionRange, rFillGradient)); - const Primitive2DContainer aAlpha { xRefB }; + Primitive2DContainer aAlpha { xRefB }; // create TransparencePrimitive2D using alpha and content - return Primitive2DReference(new TransparencePrimitive2D(aContent, aAlpha)); + return Primitive2DReference(new TransparencePrimitive2D(std::move(aContent), std::move(aAlpha))); } else { @@ -242,8 +242,8 @@ basegfx::B2DRange getTextAnchorRange(const attribute::SdrTextAttribute& rText, if(0.0 != rLine.getTransparence()) { // create simpleTransparencePrimitive, add created fill primitive - const Primitive2DContainer aContent { pNewLinePrimitive }; - return Primitive2DReference(new UnifiedTransparencePrimitive2D(aContent, rLine.getTransparence())); + Primitive2DContainer aContent { pNewLinePrimitive }; + return Primitive2DReference(new UnifiedTransparencePrimitive2D(std::move(aContent), rLine.getTransparence())); } else { @@ -406,11 +406,11 @@ basegfx::B2DRange getTextAnchorRange(const attribute::SdrTextAttribute& rText, if(0.0 != aAnimationList.getDuration()) { // create content sequence - const Primitive2DReference xRefA(pNew); - const Primitive2DContainer aContent { xRefA }; + Primitive2DReference xRefA(pNew); + Primitive2DContainer aContent { xRefA }; // create and add animated switch primitive - return Primitive2DReference(new AnimatedBlinkPrimitive2D(aAnimationList, aContent)); + return Primitive2DReference(new AnimatedBlinkPrimitive2D(aAnimationList, std::move(aContent))); } else { @@ -501,14 +501,14 @@ basegfx::B2DRange getTextAnchorRange(const attribute::SdrTextAttribute& rText, std::vector< basegfx::B2DHomMatrix > aMatrixStack; aMatrixStack.push_back(aLeft); aMatrixStack.push_back(aRight); - const Primitive2DReference xRefA(new AnimatedInterpolatePrimitive2D(aMatrixStack, aAnimationList, aAnimSequence)); - const Primitive2DContainer aContent { xRefA }; + Primitive2DReference xRefA(new AnimatedInterpolatePrimitive2D(aMatrixStack, aAnimationList, std::move(aAnimSequence))); + Primitive2DContainer aContent { xRefA }; // scrolling needs an encapsulating clipping primitive const basegfx::B2DRange aClipRange(aClipTopLeft, aClipBottomRight); basegfx::B2DPolygon aClipPolygon(basegfx::utils::createPolygonFromRect(aClipRange)); aClipPolygon.transform(aSRT); - return Primitive2DReference(new MaskPrimitive2D(basegfx::B2DPolyPolygon(aClipPolygon), aContent)); + return Primitive2DReference(new MaskPrimitive2D(basegfx::B2DPolyPolygon(aClipPolygon), std::move(aContent))); } else { @@ -523,11 +523,11 @@ basegfx::B2DRange getTextAnchorRange(const attribute::SdrTextAttribute& rText, // #i97628# // encapsulate with TextHierarchyEditPrimitive2D to allow renderers // to suppress actively edited content if needed - const Primitive2DReference xRefA(pNew); - const Primitive2DContainer aContent { xRefA }; + Primitive2DReference xRefA(pNew); + Primitive2DContainer aContent { xRefA }; // create and add TextHierarchyEditPrimitive2D primitive - return Primitive2DReference(new TextHierarchyEditPrimitive2D(aContent)); + return Primitive2DReference(new TextHierarchyEditPrimitive2D(std::move(aContent))); } else { @@ -580,20 +580,20 @@ basegfx::B2DRange getTextAnchorRange(const attribute::SdrTextAttribute& rText, aShadowOffset, rShadow.getColor(), rShadow.getBlur(), - (pContentForShadow ? *pContentForShadow : rContent))); + Primitive2DContainer(pContentForShadow ? *pContentForShadow : rContent))); if(0.0 != rShadow.getTransparence()) { // create SimpleTransparencePrimitive2D - const Primitive2DContainer aTempContent { aRetval[0] }; + Primitive2DContainer aTempContent { aRetval[0] }; aRetval[0] = Primitive2DReference( new UnifiedTransparencePrimitive2D( - aTempContent, + std::move(aTempContent), rShadow.getTransparence())); } - aRetval[1] = Primitive2DReference(new GroupPrimitive2D(rContent)); + aRetval[1] = Primitive2DReference(new GroupPrimitive2D(Primitive2DContainer(rContent))); return aRetval; } else @@ -610,18 +610,18 @@ basegfx::B2DRange getTextAnchorRange(const attribute::SdrTextAttribute& rText, return rContent; Primitive2DContainer aRetval(2); aRetval[0] = Primitive2DReference( - new GlowPrimitive2D(rGlow.getColor(), rGlow.getRadius(), rContent)); - aRetval[1] = Primitive2DReference(new GroupPrimitive2D(rContent)); + new GlowPrimitive2D(rGlow.getColor(), rGlow.getRadius(), Primitive2DContainer(rContent))); + aRetval[1] = Primitive2DReference(new GroupPrimitive2D(Primitive2DContainer(rContent))); return aRetval; } - Primitive2DContainer createEmbeddedSoftEdgePrimitive(const Primitive2DContainer& rContent, + Primitive2DContainer createEmbeddedSoftEdgePrimitive(Primitive2DContainer&& aContent, sal_Int32 nRadius) { - if (rContent.empty() || !nRadius) - return rContent; + if (aContent.empty() || !nRadius) + return std::move(aContent); Primitive2DContainer aRetval(1); - aRetval[0] = Primitive2DReference(new SoftEdgePrimitive2D(nRadius, rContent)); + aRetval[0] = Primitive2DReference(new SoftEdgePrimitive2D(nRadius, std::move(aContent))); return aRetval; } diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx index 5d6100e9dce9..e996dd977f69 100644 --- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx @@ -94,8 +94,8 @@ void SdrGrafPrimitive2D::create2DDecomposition( // Soft edges should be before text, since text is not affected by soft edges if (!aRetval.empty() && getSdrLFSTAttribute().getSoftEdgeRadius()) { - aRetval - = createEmbeddedSoftEdgePrimitive(aRetval, getSdrLFSTAttribute().getSoftEdgeRadius()); + aRetval = createEmbeddedSoftEdgePrimitive(std::move(aRetval), + getSdrLFSTAttribute().getSoftEdgeRadius()); } // add text diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index 6ee45194ff00..f8b77693795a 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -390,7 +390,7 @@ namespace drawinglayer::primitive2d if(getSdrLSTAttribute().getLine().isDefault()) { // embed line geometry to invisible (100% transparent) line group for HitTest - const Primitive2DReference xHiddenLines(new HiddenGeometryPrimitive2D(aRetval)); + Primitive2DReference xHiddenLines(new HiddenGeometryPrimitive2D(std::move(aRetval))); aRetval = Primitive2DContainer { xHiddenLines }; } diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 5bc06f832abe..0ff3a7a4aebd 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -87,9 +87,9 @@ namespace drawinglayer::primitive2d // support for XTEXT_PAINTSHAPE_BEGIN/XTEXT_PAINTSHAPE_END Metafile comments // for slideshow. This uses TextHierarchyBlockPrimitive2D to mark a text block. // ATM there is only one text block per SdrObject, this may get more in the future - void SdrTextPrimitive2D::encapsulateWithTextHierarchyBlockPrimitive2D(Primitive2DContainer& rContainer, const Primitive2DContainer& rCandidate) + void SdrTextPrimitive2D::encapsulateWithTextHierarchyBlockPrimitive2D(Primitive2DContainer& rContainer, Primitive2DContainer&& aCandidate) { - rContainer.push_back(new TextHierarchyBlockPrimitive2D(rCandidate)); + rContainer.push_back(new TextHierarchyBlockPrimitive2D(drawinglayer::primitive2d::Primitive2DContainer(aCandidate))); } SdrTextPrimitive2D::SdrTextPrimitive2D( @@ -241,7 +241,7 @@ namespace drawinglayer::primitive2d Primitive2DContainer aRetval; getSdrText()->GetObject().impDecomposeContourTextPrimitive(aRetval, *this, aViewInformation); - encapsulateWithTextHierarchyBlockPrimitive2D(rContainer, aRetval); + encapsulateWithTextHierarchyBlockPrimitive2D(rContainer, std::move(aRetval)); } SdrContourTextPrimitive2D::SdrContourTextPrimitive2D( @@ -290,7 +290,7 @@ namespace drawinglayer::primitive2d Primitive2DContainer aRetval; getSdrText()->GetObject().impDecomposePathTextPrimitive(aRetval, *this, aViewInformation); - encapsulateWithTextHierarchyBlockPrimitive2D(rContainer, aRetval); + encapsulateWithTextHierarchyBlockPrimitive2D(rContainer, std::move(aRetval)); } SdrPathTextPrimitive2D::SdrPathTextPrimitive2D( @@ -342,7 +342,7 @@ namespace drawinglayer::primitive2d Primitive2DContainer aRetval; getSdrText()->GetObject().impDecomposeBlockTextPrimitive(aRetval, *this, aViewInformation); - encapsulateWithTextHierarchyBlockPrimitive2D(rContainer, aRetval); + encapsulateWithTextHierarchyBlockPrimitive2D(rContainer, std::move(aRetval)); } SdrBlockTextPrimitive2D::SdrBlockTextPrimitive2D( @@ -411,7 +411,7 @@ namespace drawinglayer::primitive2d Primitive2DContainer aRetval; getSdrText()->GetObject().impDecomposeAutoFitTextPrimitive(aRetval, *this, aViewInformation); - encapsulateWithTextHierarchyBlockPrimitive2D(rContainer, aRetval); + encapsulateWithTextHierarchyBlockPrimitive2D(rContainer, std::move(aRetval)); } SdrAutoFitTextPrimitive2D::SdrAutoFitTextPrimitive2D( @@ -465,7 +465,7 @@ namespace drawinglayer::primitive2d Primitive2DContainer aRetval; getSdrText()->GetObject().impDecomposeChainedTextPrimitive(aRetval, *this, aViewInformation); - encapsulateWithTextHierarchyBlockPrimitive2D(rContainer, aRetval); + encapsulateWithTextHierarchyBlockPrimitive2D(rContainer, std::move(aRetval)); } bool SdrChainedTextPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const @@ -497,7 +497,7 @@ namespace drawinglayer::primitive2d Primitive2DContainer aRetval; getSdrText()->GetObject().impDecomposeStretchTextPrimitive(aRetval, *this, aViewInformation); - encapsulateWithTextHierarchyBlockPrimitive2D(rContainer, aRetval); + encapsulateWithTextHierarchyBlockPrimitive2D(rContainer, std::move(aRetval)); } SdrStretchTextPrimitive2D::SdrStretchTextPrimitive2D( diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 92958e1b7750..17376206f8a7 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -194,7 +194,7 @@ drawinglayer::primitive2d::Primitive2DContainer SdrDragEntryPrimitive2DSequence: drawinglayer::primitive2d::Primitive2DReference aTransformPrimitive2D( new drawinglayer::primitive2d::TransformPrimitive2D( rDragMethod.getCurrentTransformation(), - maPrimitive2DSequence)); + drawinglayer::primitive2d::Primitive2DContainer(maPrimitive2DSequence))); return drawinglayer::primitive2d::Primitive2DContainer { aTransformPrimitive2D }; } @@ -788,7 +788,7 @@ void SdrDragMethod::CreateOverlayGeometry( if(!aResultTransparent.empty()) { - drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparencePrimitive2D(new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(aResultTransparent, 0.5)); + drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparencePrimitive2D(new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(std::move(aResultTransparent), 0.5)); aResultTransparent = drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparencePrimitive2D }; std::unique_ptr<sdr::overlay::OverlayObject> pNewOverlayObject( diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 249557f35e26..85d46f99a00e 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -2636,7 +2636,7 @@ void SdrCropViewHdl::CreateB2dIAObject() const drawinglayer::primitive2d::Primitive2DReference aMaskedGraphic( new drawinglayer::primitive2d::MaskPrimitive2D( aCropPolyPolygon, - aCombination)); + std::move(aCombination))); // embed to UnifiedTransparencePrimitive2D const drawinglayer::primitive2d::Primitive2DReference aTransparenceMaskedGraphic( diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 962636ac6a8d..a27db44eca73 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -362,9 +362,9 @@ namespace if(rInfo.mbEndOfBullet) { // embed in TextHierarchyBulletPrimitive2D - const drawinglayer::primitive2d::Primitive2DReference aNewReference(pNewPrimitive); - const drawinglayer::primitive2d::Primitive2DContainer aNewSequence { aNewReference } ; - pNewPrimitive = new drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(aNewSequence); + drawinglayer::primitive2d::Primitive2DReference aNewReference(pNewPrimitive); + drawinglayer::primitive2d::Primitive2DContainer aNewSequence { aNewReference } ; + pNewPrimitive = new drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(std::move(aNewSequence)); } if(rInfo.mpFieldData) @@ -465,15 +465,15 @@ namespace meValues.emplace_back("Representation", pURLField->GetRepresentation()); meValues.emplace_back("TargetFrame", pURLField->GetTargetFrame()); meValues.emplace_back("SvxURLFormat", OUString::number(static_cast<sal_uInt16>(pURLField->GetFormat()))); - xRet = new drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D(aSequence, drawinglayer::primitive2d::FIELD_TYPE_URL, &meValues); + xRet = new drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D(std::move(aSequence), drawinglayer::primitive2d::FIELD_TYPE_URL, &meValues); } else if(pPageField) { - xRet = new drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D(aSequence, drawinglayer::primitive2d::FIELD_TYPE_PAGE); + xRet = new drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D(std::move(aSequence), drawinglayer::primitive2d::FIELD_TYPE_PAGE); } else { - xRet = new drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D(aSequence, drawinglayer::primitive2d::FIELD_TYPE_COMMON); + xRet = new drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D(std::move(aSequence), drawinglayer::primitive2d::FIELD_TYPE_COMMON); } } @@ -486,8 +486,7 @@ namespace // empty line primitives (contrary to paragraphs, see below). if(!maTextPortionPrimitives.empty()) { - maLinePrimitives.push_back(new drawinglayer::primitive2d::TextHierarchyLinePrimitive2D(maTextPortionPrimitives)); - maTextPortionPrimitives.clear(); + maLinePrimitives.push_back(new drawinglayer::primitive2d::TextHierarchyLinePrimitive2D(std::move(maTextPortionPrimitives))); } } @@ -504,9 +503,8 @@ namespace // have an empty sub-PrimitiveSequence. maParagraphPrimitives.push_back( new drawinglayer::primitive2d::TextHierarchyParagraphPrimitive2D( - maLinePrimitives, + std::move(maLinePrimitives), nOutlineLevel)); - maLinePrimitives.clear(); } void impTextBreakupHandler::impHandleDrawPortionInfo(const DrawPortionInfo& rInfo) @@ -550,8 +548,8 @@ namespace aGraphicAttr)); // embed in TextHierarchyBulletPrimitive2D - const drawinglayer::primitive2d::Primitive2DContainer aNewSequence { aNewReference }; - rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> pNewPrimitive = new drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(aNewSequence); + drawinglayer::primitive2d::Primitive2DContainer aNewSequence { aNewReference }; + rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> pNewPrimitive = new drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(std::move(aNewSequence)); // add to output maTextPortionPrimitives.push_back(pNewPrimitive); diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index 292ad9c2b7b4..66476eecbc75 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -610,7 +610,7 @@ namespace aNewPrimitives.push_back( new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D( - aStrokePrimitiveSequence, + std::move(aStrokePrimitiveSequence), static_cast<double>(rOutlineAttribute.getTransparence()) / 100.0) ); } else diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx index cc57ccd030c5..0ce200f14ef5 100644 --- a/svx/source/table/tablehandles.cxx +++ b/svx/source/table/tablehandles.cxx @@ -230,9 +230,9 @@ drawinglayer::primitive2d::Primitive2DContainer OverlayTableEdge::createOverlayO { // embed in HiddenGeometryPrimitive2D to support HitTest of this invisible // overlay object - const drawinglayer::primitive2d::Primitive2DContainer aSequence { aReference }; + drawinglayer::primitive2d::Primitive2DContainer aSequence { aReference }; const drawinglayer::primitive2d::Primitive2DReference aNewReference( - new drawinglayer::primitive2d::HiddenGeometryPrimitive2D(aSequence)); + new drawinglayer::primitive2d::HiddenGeometryPrimitive2D(std::move(aSequence))); aRetval = drawinglayer::primitive2d::Primitive2DContainer { aNewReference }; } } diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index 5911c00359d8..2d0c513d861c 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -340,7 +340,7 @@ namespace sdr::contact } // now create all CellBorderPrimitives - const drawinglayer::primitive2d::Primitive2DContainer aCellBorderPrimitives(aArray.CreateB2DPrimitiveArray()); + drawinglayer::primitive2d::Primitive2DContainer aCellBorderPrimitives(aArray.CreateB2DPrimitiveArray()); if(!aCellBorderPrimitives.empty()) { @@ -380,11 +380,11 @@ namespace sdr::contact aRetval.append( new drawinglayer::primitive2d::TransformPrimitive2D( aTransform, - aCellBorderPrimitives)); + drawinglayer::primitive2d::Primitive2DContainer(aCellBorderPrimitives))); // Borders are always the same for shadow as well. aRetvalForShadow.append(new drawinglayer::primitive2d::TransformPrimitive2D( - aTransform, aCellBorderPrimitives)); + aTransform, std::move(aCellBorderPrimitives))); } } diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 759f61d107ac..1fa0e7d109de 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -740,10 +740,10 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const MapMode(MapUnit::Map100thMM))); // Embed primitives to get them in 100th mm - const drawinglayer::primitive2d::Primitive2DReference xEmbedRef( + drawinglayer::primitive2d::Primitive2DReference xEmbedRef( new drawinglayer::primitive2d::TransformPrimitive2D( aMapTransform, - xPrimitives)); + std::move(xPrimitives))); xPrimitives = drawinglayer::primitive2d::Primitive2DContainer { xEmbedRef }; diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index b7fcec50fff2..a934cee0e13a 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -971,7 +971,7 @@ void paintGraphicUsingPrimitivesHelper( rContent[0] = new drawinglayer::primitive2d::MaskPrimitive2D( aClip, - rContent); + drawinglayer::primitive2d::Primitive2DContainer(rContent)); } } @@ -982,7 +982,7 @@ void paintGraphicUsingPrimitivesHelper( rContent.resize(1); rContent[0] = new drawinglayer::primitive2d::ObjectInfoPrimitive2D( - rContent, + drawinglayer::primitive2d::Primitive2DContainer(rContent), rName, rTitle, rDescription); diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 6520706e2fb2..383be2c56f51 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -2191,7 +2191,7 @@ namespace sdr::contact if(!xRetval.empty()) { // create transform primitive - const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::TransformPrimitive2D(aOffsetMatrix, xRetval)); + drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::TransformPrimitive2D(aOffsetMatrix, std::move(xRetval))); xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference }; } diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 9d9256fa21af..0e7d0a031a46 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1788,7 +1788,7 @@ bool DrawFillAttributes( basegfx::B2DPolyPolygon const& maskRegion(rClipState.getClipPoly()); primitives.resize(1); primitives[0] = new drawinglayer::primitive2d::MaskPrimitive2D( - maskRegion, rSequence); + maskRegion, drawinglayer::primitive2d::Primitive2DContainer(rSequence)); pPrimitives = &primitives; } assert(pPrimitives && pPrimitives->size()); diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 2c53dbf3daf9..78ad35b28745 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -384,7 +384,7 @@ void SwHeaderFooterWin::PaintButton() 1.0 - nFadeRate); aGhostedSeq[0] = drawinglayer::primitive2d::Primitive2DReference( - new drawinglayer::primitive2d::ModifiedColorPrimitive2D(aSeq, aBColorModifier)); + new drawinglayer::primitive2d::ModifiedColorPrimitive2D(std::move(aSeq), aBColorModifier)); pProcessor->process(aGhostedSeq); diff --git a/sw/source/uibase/docvw/OverlayRanges.cxx b/sw/source/uibase/docvw/OverlayRanges.cxx index 99bdbdbc5c91..2db0a2194a55 100644 --- a/sw/source/uibase/docvw/OverlayRanges.cxx +++ b/sw/source/uibase/docvw/OverlayRanges.cxx @@ -78,7 +78,7 @@ namespace sw::overlay const double fTransparence( nTransparence / 100.0 ); const drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparence( new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D( - aRetval, + std::move(aRetval), fTransparence)); if ( mbShowSolidBorder ) @@ -90,9 +90,7 @@ namespace sw::overlay aPolyPolygon, aRGBColor)); - aRetval.resize(2); - aRetval[0] = aUnifiedTransparence; - aRetval[1] = aOutline; + aRetval = drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparence, aOutline }; } else { diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index ec44797fbfd2..c4c4ed9b73ad 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -213,7 +213,7 @@ void SwPageBreakWin::PaintButton() std::make_shared<basegfx::BColorModifier_interpolate>(COL_WHITE.getBColor(), 1.0 - nFadeRate); aGhostedSeq[0].set( new drawinglayer::primitive2d::ModifiedColorPrimitive2D( - aSeq, aBColorModifier)); + std::move(aSeq), aBColorModifier)); // Create the processor and process the primitives const drawinglayer::geometry::ViewInformation2D aNewViewInfos; |