From d0b43fd581f32b648c94bf6706c1374631297178 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 24 Mar 2015 16:48:18 +0100 Subject: Properly map from empty aBoundRange to empty rRect Change-Id: Ic8cf3a71d168f4679347ac493c08fef1daf4ce84 --- svx/source/svdraw/svddrgv.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'svx') diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index bdb1ecb9a404..27b74c037e4b 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -141,9 +141,16 @@ void SdrDragView::TakeActionRect(Rectangle& rRect) const { // #i95646# is this used..? const basegfx::B2DRange aBoundRange(mpCurrentSdrDragMethod->getCurrentRange()); - rRect = Rectangle( - basegfx::fround(aBoundRange.getMinX()), basegfx::fround(aBoundRange.getMinY()), - basegfx::fround(aBoundRange.getMaxX()), basegfx::fround(aBoundRange.getMaxY())); + if (aBoundRange.isEmpty()) + { + rRect.SetEmpty(); + } + else + { + rRect = Rectangle( + basegfx::fround(aBoundRange.getMinX()), basegfx::fround(aBoundRange.getMinY()), + basegfx::fround(aBoundRange.getMaxX()), basegfx::fround(aBoundRange.getMaxY())); + } } } if (rRect.IsEmpty()) -- cgit