coverity#1157791 Division or modulo by zero

Change-Id: I6b46a037b0d5f13681ad4936ddd56fd80c8128fb
This commit is contained in:
Caolán McNamara
2014-01-29 14:56:43 +00:00
parent 2fbca90761
commit ca1c17d7e5

View File

@@ -4488,8 +4488,10 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
fYOfs = ((double)aPolyBoundRect.Top() - (double)aPolyPieRect.Top() ) * fYScale;
}
fXScale = (double)aPolyBoundRect.GetWidth() / (double)aPolyPieRect.GetWidth();
fYScale = (double)aPolyBoundRect.GetHeight() / (double)aPolyPieRect.GetHeight();
if ( aPolyPieRect.GetWidth() )
fXScale = (double)aPolyBoundRect.GetWidth() / (double)aPolyPieRect.GetWidth();
if ( aPolyPieRect.GetHeight() )
fYScale = (double)aPolyBoundRect.GetHeight() / (double)aPolyPieRect.GetHeight();
Rectangle aOldBoundRect( aObjData.aBoundRect );
aObjData.aBoundRect = Rectangle( Point( aLogicRect.Left() + (sal_Int32)fXOfs, aLogicRect.Top() + (sal_Int32)fYOfs ),