From 87118d5adf92124450ba688f2643cc9447304976 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Oct 2014 10:45:44 +0100 Subject: coverity#735638 Division or modulo by float zero Change-Id: I2f183bc0bb9c67e3873e13a4bdbc57be9471b8a3 --- svx/source/svdraw/svdoashp.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 021e9a049ade..3f8b1fddad59 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -2484,7 +2484,8 @@ Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool Rectangle aAdjustedTextRect( aNewTextRect ); // <- new text rectangle is being tested by AdjustTextFrameWidthAndHeight to ensure if ( AdjustTextFrameWidthAndHeight( aAdjustedTextRect, bHgt, bWdt ) ) // that the new text rectangle is matching the current text size from the outliner { - if ( ( aAdjustedTextRect != aNewTextRect ) && ( aOldTextRect != aAdjustedTextRect ) ) + if (aAdjustedTextRect != aNewTextRect && aOldTextRect != aAdjustedTextRect && + aNewTextRect.GetWidth() && aNewTextRect.GetHeight()) { aReturnValue = aRect; double fXScale = (double)aOldTextRect.GetWidth() / (double)aNewTextRect.GetWidth(); -- cgit