summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-20 10:45:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-20 10:57:23 +0100
commit87118d5adf92124450ba688f2643cc9447304976 (patch)
treeca9b4f05874b1714ac95ae184208cea1acf9c2b9
parent90fbb7086c711dbb21770f5d364bdb0abc909573 (diff)
coverity#735638 Division or modulo by float zero
Change-Id: I2f183bc0bb9c67e3873e13a4bdbc57be9471b8a3
-rw-r--r--svx/source/svdraw/svdoashp.cxx3
1 files changed, 2 insertions, 1 deletions
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();