diff options
Diffstat (limited to 'filter/source/svg/svgfontexport.cxx')
-rw-r--r-- | filter/source/svg/svgfontexport.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx index 2de4b734adbb..b65370a423cb 100644 --- a/filter/source/svg/svgfontexport.cxx +++ b/filter/source/svg/svgfontexport.cxx @@ -102,7 +102,8 @@ void SVGFontExport::implCollectGlyphs() case( META_TEXT_ACTION ): { const MetaTextAction* pA = static_cast<const MetaTextAction*>(pAction); - aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() ); + sal_Int32 aLength=std::min( pA->GetText().getLength(), pA->GetLen() ); + aText = pA->GetText().copy( pA->GetIndex(), aLength ); } break; @@ -116,14 +117,16 @@ void SVGFontExport::implCollectGlyphs() case( META_TEXTARRAY_ACTION ): { const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pAction); - aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() ); + sal_Int32 aLength=std::min( pA->GetText().getLength(), pA->GetLen() ); + aText = pA->GetText().copy( pA->GetIndex(), aLength ); } break; case( META_STRETCHTEXT_ACTION ): { const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pAction); - aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() ); + sal_Int32 aLength=std::min( pA->GetText().getLength(), pA->GetLen() ); + aText = pA->GetText().copy( pA->GetIndex(), aLength ); } break; |