svx/source/sdr/contact/viewcontactofgraphic.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
New commits: commit 422b407290fe082adea9067835521da8c067743d Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sat Dec 4 19:32:24 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Dec 5 08:40:31 2021 +0100 improve ViewContactOfGraphic::createViewIndependentPrimitive2DSequence no need to create a temporary intermediate container Change-Id: Iaa87011ff007c313a2b223eb95133b5cb626b468 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126371 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index 8639bf8aa085..733fb2b815c7 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -283,7 +283,6 @@ namespace sdr::contact void ViewContactOfGraphic::createViewIndependentPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const { - drawinglayer::primitive2d::Primitive2DContainer xRetval; const SfxItemSet& rItemSet = GetGrafObject().GetMergedItemSet(); // create and fill GraphicAttr @@ -354,7 +353,7 @@ namespace sdr::contact { // it's an EmptyPresObj, create the SdrGrafPrimitive2D without content and another scaled one // with the content which is the placeholder graphic - xRetval = createVIP2DSForPresObj(aObjectMatrix, aAttribute); + rVisitor.visit(createVIP2DSForPresObj(aObjectMatrix, aAttribute)); } #ifndef IOS // Enforce swap-in for tiled rendering for now, while we have no delayed updating mechanism else if(visualisationUsesDraft()) @@ -364,7 +363,7 @@ namespace sdr::contact // visual update mechanism for swapped-out graphics when they were loaded (see AsynchGraphicLoadingEvent // and ViewObjectContactOfGraphic implementation). Not forcing the swap-in here allows faster // (non-blocking) processing here and thus in the effect e.g. fast scrolling through pages - xRetval = createVIP2DSForDraft(aObjectMatrix, aAttribute); + rVisitor.visit(createVIP2DSForDraft(aObjectMatrix, aAttribute)); } #endif else @@ -378,16 +377,14 @@ namespace sdr::contact rGraphicObject, aLocalGrafInfo)); - xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference }; + rVisitor.visit(xReference); } // always append an invisible outline for the cases where no visible content exists - xRetval.push_back( + rVisitor.visit( drawinglayer::primitive2d::createHiddenGeometryPrimitives2D( aObjectMatrix)); - - rVisitor.visit(std::move(xRetval)); - } + } bool ViewContactOfGraphic::visualisationUsesPresObj() const {