summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-13 14:41:04 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-13 14:42:01 +0000
commit0ebbcec217a9774874f8880171474e0dc710f27a (patch)
tree9ffbf2ab6f34cd5914d1c9224bfb7c5bd5a67018
parentturn update links warning dialog into an infobar (diff)
downloadcore-0ebbcec217a9774874f8880171474e0dc710f27a.tar.gz
core-0ebbcec217a9774874f8880171474e0dc710f27a.zip
ofz#5281 Divide-by-zero
Change-Id: I8ce33727901def27b12981281de6cb011e9f14f3
-rw-r--r--lotuswordpro/source/filter/lwpgrfobj.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx
index 6e737a2fba16..5bcc918187d2 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -557,6 +557,8 @@ void LwpGraphicObject::CreateGrafObject()
bool sal_bCropped = false;
if (fSclGrafWidth > fDisFrameWidth)
{
+ if (fXRatio == 0.0)
+ throw o3tl::divide_by_zero();
fClipWidth = (fSclGrafWidth-fDisFrameWidth ) / 2 / fXRatio;
sal_bCropped = true;
}
@@ -564,6 +566,8 @@ void LwpGraphicObject::CreateGrafObject()
// need vertical crop?
if (fSclGrafHeight > fDisFrameHeight)
{
+ if (fYRatio == 0.0)
+ throw o3tl::divide_by_zero();
fClipHeight = (fSclGrafHeight-fDisFrameHeight ) / 2 / fYRatio;
sal_bCropped = true;
}