diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-13 14:41:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-13 14:42:01 +0000 |
commit | 0ebbcec217a9774874f8880171474e0dc710f27a (patch) | |
tree | 9ffbf2ab6f34cd5914d1c9224bfb7c5bd5a67018 /lotuswordpro | |
parent | ff5cb6cb34e42b290affc75703a93de1d24d0bc6 (diff) |
ofz#5281 Divide-by-zero
Change-Id: I8ce33727901def27b12981281de6cb011e9f14f3
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpgrfobj.cxx | 4 |
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; } |