writerfilter/source/dmapper/DomainMapper.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
New commits: commit 09c311b0fb4dbed5220ca50f133687ebfea24646 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Mar 4 15:34:15 2018 +0000 ofz#6720 Divide-by-zero Change-Id: I81d89a41437456535949e1cd214ec4e514c26494 Reviewed-on: https://gerrit.libreoffice.org/50733 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/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index d31ca615de86..5af309e1cbcf 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2834,15 +2834,19 @@ void DomainMapper::processDeferredCharacterProperties( const std::map< sal_Int32 { double fontSize = 0; font->second >>= fontSize; - nEscapement = nIntValue * 100 / fontSize; + if (fontSize != 0.0) + nEscapement = nIntValue * 100 / fontSize; } // TODO if not direct formatting, check the style first, not directly the default char props. else if (aDefaultFont) { double fHeight = 0; aDefaultFont->second >>= fHeight; - // fHeight is in points, nIntValue is in half points, nEscapement is in percents. - nEscapement = nIntValue * 100 / fHeight / 2; + if (fHeight != 0.0) + { + // fHeight is in points, nIntValue is in half points, nEscapement is in percents. + nEscapement = nIntValue * 100 / fHeight / 2; + } } else { // TODO: Find out the font size. The 58/-58 values were here previous, but I have _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits