summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-22 11:44:56 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-22 15:55:17 +0100
commit97f087f4b2737aea7ddfbb7ac637370bac871cb5 (patch)
tree0511637ad355310fc27954dc726b88fd370812ef /sd
parent0c358f71e2b72251dd47ae5782d44c5c6a13727c (diff)
ofz#4381 Divide-by-zero
Change-Id: I608ea751cec11935f37b625ebde0798f8887e225 Reviewed-on: https://gerrit.libreoffice.org/45081 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/ppt/pptin.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 79020b01dac7..2c189d79516c 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2488,8 +2488,9 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
if (std::abs(aLogicRect.Left() - aOutlineRect.Left()) > MAX_USER_MOVE ||
std::abs(aLogicRect.Top() - aOutlineRect.Top()) > MAX_USER_MOVE ||
std::abs(aLogicRect.Bottom() - aOutlineRect.Bottom()) > MAX_USER_MOVE ||
- (double)aLogicSize.Width() / aOutlineSize.Width() < 0.48 ||
- (double)aLogicSize.Width() / aOutlineSize.Width() > 0.5)
+ aOutlineSize.Width() == 0 ||
+ (double)aLogicSize.Width() / aOutlineSize.Width() < 0.48 ||
+ (double)aLogicSize.Width() / aOutlineSize.Width() > 0.5)
{
pPresObj->SetUserCall(nullptr);
}
@@ -2518,7 +2519,8 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
if (std::abs(aLogicRect.Right() - aOutlineRect.Right()) > MAX_USER_MOVE ||
std::abs(aLogicRect.Top() - aOutlineRect.Top()) > MAX_USER_MOVE ||
std::abs(aLogicRect.Bottom() - aOutlineRect.Bottom()) > MAX_USER_MOVE ||
- (double)aLogicSize.Width() / aOutlineSize.Width() < 0.48 ||
+ aOutlineSize.Width() == 0 ||
+ (double)aLogicSize.Width() / aOutlineSize.Width() < 0.48 ||
(double)aLogicSize.Width() / aOutlineSize.Width() > 0.5)
{
pPresObj->SetUserCall( nullptr );