diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-26 21:03:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-27 13:27:18 +0100 |
commit | b42fbf713a89c2fb46e2cc0bef6610f53932a6a5 (patch) | |
tree | 7333775ac2911be27d122e978b20e9b78ece8e34 /svx | |
parent | 2877aa089d9185ff25dbe8f9920611277750d5c8 (diff) |
ofz#4441: Divide-by-zero
Change-Id: If83e6bb22239d0fd82f40836601447cbba2f1df4
Reviewed-on: https://gerrit.libreoffice.org/45297
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape2d.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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; |