diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-03 14:11:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-04 12:32:06 +0100 |
commit | b739bdaba8064ae8b428cfa1c7c6010d662539a3 (patch) | |
tree | 3f01788dbeccd2a3490fa8493b393ff20ef8b243 /sd | |
parent | 2219d37896ee4a8662d9dccc06a73302f8ac6c7c (diff) |
use visitor in getViewIndependentPrimitive2DContainer
to reduce intermediate temporary data creation
Change-Id: I3f13b0e02c1fa374e8d70768ae47c7f6da254462
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126322
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/CustomAnimationEffect.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/animations/motionpathtag.cxx | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index ee6317916f23..aaa5f36dcd83 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -1606,7 +1606,8 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj { ::tools::Rectangle aBoundRect(0,0,0,0); - const drawinglayer::primitive2d::Primitive2DContainer& xPrimitives(pObj->GetViewContact().getViewIndependentPrimitive2DContainer()); + drawinglayer::primitive2d::Primitive2DContainer xPrimitives; + pObj->GetViewContact().getViewIndependentPrimitive2DContainer(xPrimitives); const drawinglayer::geometry::ViewInformation2D aViewInformation2D; const basegfx::B2DRange aRange(xPrimitives.getB2DRange(aViewInformation2D)); diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index 72bf2d1620b4..ced68539517b 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -300,8 +300,9 @@ void SdPathHdl::CreateB2dIAObject() if (xManager.is() && mpPathObj) { const sdr::contact::ViewContact& rVC = mpPathObj->GetViewContact(); - const drawinglayer::primitive2d::Primitive2DContainer& aSequence = rVC.getViewIndependentPrimitive2DContainer(); - std::unique_ptr<sdr::overlay::OverlayObject> pNew(new sdr::overlay::OverlayPrimitive2DSequenceObject(drawinglayer::primitive2d::Primitive2DContainer(aSequence))); + drawinglayer::primitive2d::Primitive2DContainer aSequence; + rVC.getViewIndependentPrimitive2DContainer(aSequence); + std::unique_ptr<sdr::overlay::OverlayObject> pNew(new sdr::overlay::OverlayPrimitive2DSequenceObject(std::move(aSequence))); // OVERLAYMANAGER insertNewlyCreatedOverlayObjectForSdrHdl( |