Kaydet (Commit) 34140139 authored tarafından Michael Stahl's avatar Michael Stahl

sd: PPT export: fix assert on 0-length text portions

Not sure if such are legit, but this should fix the crash.

Change-Id: Idf8a3a67ddae464533d431f1a6a2ebea6d6c2213
üst 6692eeca
......@@ -129,7 +129,9 @@ PortionObj::PortionObj( ::com::sun::star::uno::Reference< ::com::sun::star::text
{
// For i39516 - a closing parenthesis that ends an RTL string is displayed backwards by PPT
// Solution: add a Unicode Right-to-Left Mark, following the method described in i18024
if ( bLast && aString[ aString.getLength() - 1 ] == ')' && rFontCollection.GetScriptDirection( aString ) == com::sun::star::i18n::ScriptDirection::RIGHT_TO_LEFT )
if (bLast && !aString.isEmpty()
&& aString[aString.getLength() - 1] == ')'
&& rFontCollection.GetScriptDirection(aString) == com::sun::star::i18n::ScriptDirection::RIGHT_TO_LEFT)
{
mnTextSize++;
bRTL_endingParen = sal_True;
......
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