diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-15 16:17:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-15 17:21:14 +0200 |
commit | 6af9bba906e4c2a1602a3cbc50df874808417491 (patch) | |
tree | 5564e4d2952885e0f74a8be96a7660d44e5b2f93 /sdext | |
parent | b9ddba1d097176e9742e7bb09f591e82b96fffa0 (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/42328
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sdext')
-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 3836838c72d9..cf62207860ae 100644 --- a/sdext/source/presenter/PresenterTheme.cxx +++ b/sdext/source/presenter/PresenterTheme.cxx @@ -557,6 +557,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; |