summaryrefslogtreecommitdiff
path: root/sw/source/core/draw
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2019-05-06 11:33:41 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-05-08 12:42:53 +0200
commitd0119ff7f2c68aa05286bd303128f3a69c6bbd6a (patch)
tree80fc2e52ceb8446997348eda9186cbdfcd247298 /sw/source/core/draw
parent5218ca22b472a80969a715e38d7cb8d052be4b6a (diff)
improve tools::Rectangle->basegfx::B2?Rectangle conversion
Improve the conversion method to do something reasonable with empty Rectangle. Use the conversion method in more places. Change-Id: I48c13f3d6dae71f39f03f7939101e545c8125503 Reviewed-on: https://gerrit.libreoffice.org/71853 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/source/core/draw')
-rw-r--r--sw/source/core/draw/dflyobj.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 36b7396f5f74..dd73a1d13df2 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -24,6 +24,7 @@
#include <editeng/protitem.hxx>
#include <editeng/opaqitem.hxx>
#include <svx/svdpage.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/svapp.hxx>
#include <vcl/ptrstyle.hxx>
@@ -623,7 +624,7 @@ void SwVirtFlyDrawObj::NbcSetLogicRect(const tools::Rectangle& )
::basegfx::B2DPolyPolygon SwVirtFlyDrawObj::TakeXorPoly() const
{
const tools::Rectangle aSourceRectangle(GetFlyFrame()->getFrameArea().SVRect());
- const ::basegfx::B2DRange aSourceRange(aSourceRectangle.Left(), aSourceRectangle.Top(), aSourceRectangle.Right(), aSourceRectangle.Bottom());
+ const ::basegfx::B2DRange aSourceRange = vcl::unotools::b2DRectangleFromRectangle(aSourceRectangle);
::basegfx::B2DPolyPolygon aRetval;
aRetval.append(::basegfx::utils::createPolygonFromRect(aSourceRange));