diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-20 15:14:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-20 15:16:29 +0000 |
commit | 26bd210ccd6033cf5d06a2de35047757d8f7a6e7 (patch) | |
tree | 8168b15ce782ecf47fa82e17090655412313fe31 /sd | |
parent | ca36f09c7168bd5dd59118c1a8bccac7c826bde0 (diff) |
Related: ooo#34420-1.sxi concealed divide by zero
on this and about 30 other documents where the NaN result is cast back to a
long, giving rise to an assert in vcl/source/outdev/map.cxx:391 of
long int ImplLogicToPixel(long int, long int, long int, long int, long int):
Assertion `std::abs(n) < std::numeric_limits<long>::max() / nMapNum / nDPI'
failed.
Change-Id: Ia87e4ee6bbf0f10b7eba513e9a5ba3c42440d181
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/outlview.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index c7e150882862..48402965674f 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -1723,8 +1723,11 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo) Size aOutSize( 2000, nBulletHeight ); const float fImageHeight = ((float)aOutSize.Height() * (float)4) / (float)7; - const float fImageRatio = (float)aImageSize.Height() / (float)aImageSize.Width(); - aImageSize.Width() = (long)( fImageRatio * fImageHeight ); + if (aImageSize.Width() != 0) + { + const float fImageRatio = (float)aImageSize.Height() / (float)aImageSize.Width(); + aImageSize.Width() = (long)( fImageRatio * fImageHeight ); + } aImageSize.Height() = (long)( fImageHeight ); Point aImagePos( pInfo->mrStartPos ); |