diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-12 09:50:32 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-12 13:03:52 +0000 |
commit | 19cda6c79c6e2f2c77a6ec25fcd28e4c1bea5268 (patch) | |
tree | a9b30110ee0ade254da068253b0811efb9a420d3 /svx/source | |
parent | 542988856011fad099cfbe6ba93305fb6a4e0214 (diff) |
coverity#1103661 Division or modulo by zero
Change-Id: I1506e4e0b1dccac1e9f3dc3094268eaa89d3f6be
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/connctrl.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index 7ed4c8644eb2..677cba81cb2f 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -77,10 +77,12 @@ void SvxXConnectionPreview::AdaptSize() // Adapt size if( pObjList ) { - SetMapMode( MAP_100TH_MM ); + Rectangle aRect = pObjList->GetAllObjBoundRect(); + if (aRect.GetHeight() == 0 || aRect.GetHeight() == 0) + return; + SetMapMode( MAP_100TH_MM ); OutputDevice* pOD = pView->GetFirstOutputDevice(); // GetWin( 0 ); - Rectangle aRect = pObjList->GetAllObjBoundRect(); MapMode aMapMode = GetMapMode(); aMapMode.SetMapUnit( pOD->GetMapMode().GetMapUnit() ); |