diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-15 16:17:21 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2017-09-15 20:55:42 +0200 |
commit | cc369b3447da7f354901a79007b5db6f98379189 (patch) | |
tree | bfb58a14ad9a01b08acb8f2e7a4c61faf0412874 | |
parent | ef64fc4de91c91438f895d94431b5d124f04961c (diff) |
Resolves: tdf#112408 crash with nan with bad ascent
bad ascent in the common case is probably fixed with tdf#107249
Change-Id: I0a06de06cb07277c50dcffd1b6a1121398e84e42
Reviewed-on: https://gerrit.libreoffice.org/42329
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r-- | sdext/source/presenter/PresenterTheme.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx index 10c7cf023482..5e60dde66bd2 100644 --- a/sdext/source/presenter/PresenterTheme.cxx +++ b/sdext/source/presenter/PresenterTheme.cxx @@ -570,6 +570,9 @@ double PresenterTheme::FontDescriptor::GetCellSizeForDesignSize ( geometry::RealRectangle2D aBox (PresenterCanvasHelper::GetTextBoundingBox (xFont, "X")); const double nAscent (-aBox.Y1); + //tdf#112408 + if (nAscent == 0) + return nDesignSize; const double nDescent (aBox.Y2); const double nScale = (nAscent+nDescent) / nAscent; return nDesignSize * nScale; |