diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-12-09 23:01:11 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-12-10 15:28:52 +0100 |
commit | 34140139840a181157690038fe845f5b33866b10 (patch) | |
tree | 3e9e7c95064de6797faf7117a607b1447421b9c7 /sd | |
parent | 6692eeca9a3ba7a9ba461564172275fbb78992e9 (diff) |
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
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/eppt/pptx-text.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index 1efc7791d55b..0a45ad0358b2 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -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; |