summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-14 09:11:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-22 06:44:08 +0000
commitcc15806b527cc02c57bd92211fda259e33963106 (patch)
tree85aa90d0f1013ccef85cbfa2c0f064f905b0c464 /sw/source
parent41f7878ccbc457ef0431c999d38d9d77265d5dc7 (diff)
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 <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/draw/dflyobj.cxx6
1 files changed, 3 insertions, 3 deletions
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