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

Caolán McNamara caolanm at redhat.com
Mon Nov 27 12:27:48 UTC 2017


 svx/source/customshapes/EnhancedCustomShape2d.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b42fbf713a89c2fb46e2cc0bef6610f53932a6a5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 26 21:03:03 2017 +0000

    ofz#4441: Divide-by-zero
    
    Change-Id: If83e6bb22239d0fd82f40836601447cbba2f1df4
    Reviewed-on: https://gerrit.libreoffice.org/45297
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 9325e6e88f82..668225f9743b 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1226,8 +1226,8 @@ bool EnhancedCustomShape2d::SetHandleControllerPosition( const sal_uInt32 nIndex
 
             double fPos1 = aP.X();  //( bFlipH ) ? aLogicRect.GetWidth() - aP.X() : aP.X();
             double fPos2 = aP.Y();  //( bFlipV ) ? aLogicRect.GetHeight() -aP.Y() : aP.Y();
-            fPos1 /= fXScale;
-            fPos2 /= fYScale;
+            fPos1 = !basegfx::fTools::equalZero(fXScale) ? (fPos1 / fXScale) : SAL_MAX_INT32;
+            fPos2 = !basegfx::fTools::equalZero(fYScale) ? (fPos2 / fYScale) : SAL_MAX_INT32;
 
             // Used for scaling the adjustment values based on handle positions
             double fWidth;


More information about the Libreoffice-commits mailing list