[Libreoffice-commits] core.git: svx/source

Stephan Bergmann sbergman at redhat.com
Tue Mar 24 08:49:20 PDT 2015


 svx/source/svdraw/svddrgv.cxx |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit d0b43fd581f32b648c94bf6706c1374631297178
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 24 16:48:18 2015 +0100

    Properly map from empty aBoundRange to empty rRect
    
    Change-Id: Ic8cf3a71d168f4679347ac493c08fef1daf4ce84

diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index bdb1ecb..27b74c0 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())


More information about the Libreoffice-commits mailing list