[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - desktop/source
Henry Castro
hcastro at collabora.com
Mon Nov 28 02:50:21 UTC 2016
desktop/source/lib/init.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 55dacde0428bc0444648e96e3791b9733a85a4b7
Author: Henry Castro <hcastro at collabora.com>
Date: Sun Nov 27 19:40:57 2016 -0400
lok: avoid render font with empty rectangle
Change-Id: I58e24e0de37144ae5d67857b243e6a7091f2b77a
Reviewed-on: https://gerrit.libreoffice.org/31281
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8b8391f..3e91af8 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2587,6 +2587,9 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/,
aFont.SetSize(Size(0, 25));
aDevice->SetFont(aFont);
aDevice->GetTextBoundRect(aRect, aText);
+ if (aRect.IsEmpty())
+ break;
+
int nFontWidth = aRect.BottomRight().X() + 1;
*pFontWidth = nFontWidth;
int nFontHeight = aRect.BottomRight().Y() + 1;
More information about the Libreoffice-commits
mailing list