coverity#1103661 Division or modulo by zero

Change-Id: I1506e4e0b1dccac1e9f3dc3094268eaa89d3f6be
This commit is contained in:
Caolán McNamara
2014-02-12 09:50:32 +00:00
parent 5429888560
commit 19cda6c79c

View File

@@ -77,10 +77,12 @@ void SvxXConnectionPreview::AdaptSize()
// Adapt size
if( pObjList )
{
SetMapMode( MAP_100TH_MM );
OutputDevice* pOD = pView->GetFirstOutputDevice(); // GetWin( 0 );
Rectangle aRect = pObjList->GetAllObjBoundRect();
if (aRect.GetHeight() == 0 || aRect.GetHeight() == 0)
return;
SetMapMode( MAP_100TH_MM );
OutputDevice* pOD = pView->GetFirstOutputDevice(); // GetWin( 0 );
MapMode aMapMode = GetMapMode();
aMapMode.SetMapUnit( pOD->GetMapMode().GetMapUnit() );