lotuswordpro/source/filter/lwppagelayout.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit 9dad387df78f4043ca0c718f27ed06006fa7128a Author: Caolán McNamara <caol...@redhat.com> Date: Sun Jan 7 15:14:34 2018 +0000 ofz#4979 Divide-by-zero Change-Id: I0ac848950bdab54a8cc2659206758f1b13e32757 Reviewed-on: https://gerrit.libreoffice.org/47536 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx index 193bdbbedb69..8ee43071bb95 100644 --- a/lotuswordpro/source/filter/lwppagelayout.cxx +++ b/lotuswordpro/source/filter/lwppagelayout.cxx @@ -288,9 +288,13 @@ void LwpPageLayout::ParseFootNoteSeparator(XFPageMaster * pm1) enumXFAlignType eAlignType = enumXFAlignStart; if(rFootnoteSep.GetIndent() > 0) { + const double fMarginWidth = GetMarginWidth(); + if (fMarginWidth == 0.0) + throw o3tl::divide_by_zero(); + //SODC don't support indent - sal_uInt32 nIndentPercent = static_cast<sal_uInt32>(100*LwpTools::ConvertFromUnitsToMetric(rFootnoteSep.GetIndent())/GetMarginWidth()); - if(nIndentPercent + nLengthPercent >= 100) + sal_uInt32 nIndentPercent = static_cast<sal_uInt32>(100*LwpTools::ConvertFromUnitsToMetric(rFootnoteSep.GetIndent()) / fMarginWidth); + if (nIndentPercent + nLengthPercent >= 100) eAlignType = enumXFAlignEnd; } if(aColor.IsValidColor())
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits