summaryrefslogtreecommitdiff
path: root/svx/source/table
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-12-03 14:11:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-04 12:32:06 +0100
commitb739bdaba8064ae8b428cfa1c7c6010d662539a3 (patch)
tree3f01788dbeccd2a3490fa8493b393ff20ef8b243 /svx/source/table
parent2219d37896ee4a8662d9dccc06a73302f8ac6c7c (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 'svx/source/table')
-rw-r--r--svx/source/table/viewcontactoftableobj.cxx6
-rw-r--r--svx/source/table/viewcontactoftableobj.hxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index a79882e03a52..6419c5057dab 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -201,7 +201,7 @@ namespace sdr::contact
return svx::frame::Style();
}
- drawinglayer::primitive2d::Primitive2DContainer ViewContactOfTableObj::createViewIndependentPrimitive2DSequence() const
+ void ViewContactOfTableObj::createViewIndependentPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const
{
const sdr::table::SdrTableObj& rTableObj = static_cast<const sdr::table::SdrTableObj&>(GetSdrObject());
const uno::Reference< css::table::XTable > xTable = rTableObj.getTable();
@@ -427,7 +427,7 @@ namespace sdr::contact
}
}
- return aRetval;
+ rVisitor.visit(std::move(aRetval));
}
else
{
@@ -447,7 +447,7 @@ namespace sdr::contact
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(
aObjectMatrix));
- return drawinglayer::primitive2d::Primitive2DContainer { xReference };
+ rVisitor.visit(xReference);
}
}
diff --git a/svx/source/table/viewcontactoftableobj.hxx b/svx/source/table/viewcontactoftableobj.hxx
index 91a3a26e4e7f..63f45ab4505d 100644
--- a/svx/source/table/viewcontactoftableobj.hxx
+++ b/svx/source/table/viewcontactoftableobj.hxx
@@ -30,7 +30,7 @@ namespace sdr::contact
protected:
// This method is responsible for creating the graphical visualisation data derived ONLY from
// the model data
- virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override;
+ virtual void createViewIndependentPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override;
public:
// basic constructor, used from SdrObject.