diff options
author | David Tardon <dtardon@redhat.com> | 2014-10-17 13:31:12 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-10-17 13:34:44 +0200 |
commit | 6016287fd064568ab4052932b2e6c0ee4a601bbd (patch) | |
tree | e22f86a1fd7257eb7f7215443c29eaec3348e072 | |
parent | 968cadb82542b23271b8c472a2e6ec9248343925 (diff) |
coverity#1247617 there is nothing to do if width is 0
Change-Id: Iddd877d83d2a3669778282fa8aa9a63dfa850524
-rw-r--r-- | svx/source/dialog/connctrl.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index eb4973b7489d..efa5f39d3d14 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -113,6 +113,8 @@ void SvxXConnectionPreview::AdaptSize() aNewSize.Height()= (long) ( (double) nWidth / fRectWH ); } + if (aRect.GetWidth() == 0) + return; boost::rational<sal_Int64> aFrac1( aWinSize.Width(), aRect.GetWidth() ); boost::rational<sal_Int64> aFrac2( aWinSize.Height(), aRect.GetHeight() ); boost::rational<sal_Int64> aMinFrac( aFrac1 <= aFrac2 ? aFrac1 : aFrac2 ); |