From cc15806b527cc02c57bd92211fda259e33963106 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 14 Nov 2016 09:11:35 +0200 Subject: convert BasePrimitive2D::get2DDecomposition to use a visitor which lets us avoid constructing the decomposition when we are only interesting in the bounding box, e.g. for hit testing Change-Id: Icd8d430b75d207063f1db70e5a0822d5d82a7d00 Reviewed-on: https://gerrit.libreoffice.org/30835 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- sw/source/core/draw/dflyobj.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index bd38e867c02e..59ab8b167703 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -167,7 +167,7 @@ namespace drawinglayer virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; // override to allow callbacks to wrap_DoPaintObject - virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override; // data read access const SwVirtFlyDrawObj& getSwVirtFlyDrawObj() const { return mrSwVirtFlyDrawObj; } @@ -218,7 +218,7 @@ namespace drawinglayer return getOuterRange(); } - void SwVirtFlyDrawObjPrimitive::get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const + void SwVirtFlyDrawObjPrimitive::get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const { // This is the callback to keep the FlyFrame painting in SW alive as long as it // is not changed to primitives. This is the method which will be called by the processors @@ -228,7 +228,7 @@ namespace drawinglayer getSwVirtFlyDrawObj().wrap_DoPaintObject(rViewInformation); // call parent - BufferedDecompositionPrimitive2D::get2DDecomposition(rContainer, rViewInformation); + BufferedDecompositionPrimitive2D::get2DDecomposition(rVisitor, rViewInformation); } // provide unique ID -- cgit v1.2.3