Kaydet (Commit) a9412aaf authored tarafından Caolán McNamara's avatar Caolán McNamara

crashtesting: many asserts in SmTextNode::Prepare

e.g fdo58094-1.mml

since...

commit 13894996
Date:   Sat May 4 21:46:31 2019 +0200

    handle empty Rectangle better in starmath

Change-Id: I01d11352b8bc9f6dcf6d6565fa41b84d549f620f
Reviewed-on: https://gerrit.libreoffice.org/71963
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst ad0153de
...@@ -2064,7 +2064,6 @@ void SmTextNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell, i ...@@ -2064,7 +2064,6 @@ void SmTextNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell, i
SetRectHorAlign( RectHorAlign::Left ); SetRectHorAlign( RectHorAlign::Left );
maText = GetToken().aText; maText = GetToken().aText;
assert(!maText.isEmpty());
GetFont() = rFormat.GetFont(GetFontDesc()); GetFont() = rFormat.GetFont(GetFontDesc());
if (IsItalic( GetFont() )) if (IsItalic( GetFont() ))
......
...@@ -38,7 +38,6 @@ bool SmGetGlyphBoundRect(const vcl::RenderContext &rDev, ...@@ -38,7 +38,6 @@ bool SmGetGlyphBoundRect(const vcl::RenderContext &rDev,
// basically the same as 'GetTextBoundRect' (in class 'OutputDevice') // basically the same as 'GetTextBoundRect' (in class 'OutputDevice')
// but with a string as argument. // but with a string as argument.
{ {
assert(!rText.isEmpty());
// handle special case first // handle special case first
if (rText.isEmpty()) if (rText.isEmpty())
{ {
...@@ -184,7 +183,6 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat, ...@@ -184,7 +183,6 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
: aTopLeft(0, 0) : aTopLeft(0, 0)
, aSize(rDev.GetTextWidth(rText), rDev.GetTextHeight()) , aSize(rDev.GetTextWidth(rText), rDev.GetTextHeight())
{ {
assert(!rText.isEmpty());
const FontMetric aFM (rDev.GetFontMetric()); const FontMetric aFM (rDev.GetFontMetric());
bool bIsMath = aFM.GetFamilyName().equalsIgnoreAsciiCase( FONTNAME_MATH ); bool bIsMath = aFM.GetFamilyName().equalsIgnoreAsciiCase( FONTNAME_MATH );
bool bAllowSmaller = bIsMath && !SmIsMathAlpha(rText); bool bAllowSmaller = bIsMath && !SmIsMathAlpha(rText);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment