summaryrefslogtreecommitdiff
path: root/svx/source/dialog/connctrl.cxx
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-10-17 13:31:12 +0200
committerDavid Tardon <dtardon@redhat.com>2014-10-17 13:34:44 +0200
commit6016287fd064568ab4052932b2e6c0ee4a601bbd (patch)
treee22f86a1fd7257eb7f7215443c29eaec3348e072 /svx/source/dialog/connctrl.cxx
parent968cadb82542b23271b8c472a2e6ec9248343925 (diff)
coverity#1247617 there is nothing to do if width is 0
Change-Id: Iddd877d83d2a3669778282fa8aa9a63dfa850524
Diffstat (limited to 'svx/source/dialog/connctrl.cxx')
-rw-r--r--svx/source/dialog/connctrl.cxx2
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 );