[Libreoffice-commits] core.git: sd/source
Caolán McNamara
caolanm at redhat.com
Wed Nov 22 14:55:43 UTC 2017
sd/source/filter/ppt/pptin.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 97f087f4b2737aea7ddfbb7ac637370bac871cb5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 22 11:44:56 2017 +0000
ofz#4381 Divide-by-zero
Change-Id: I608ea751cec11935f37b625ebde0798f8887e225
Reviewed-on: https://gerrit.libreoffice.org/45081
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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 );
More information about the Libreoffice-commits
mailing list