summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-08 20:34:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-04-08 20:35:54 +0100
commit9c0788f545a9276d18060965794143179917e766 (patch)
tree901135bf277b481ea54acdefa3897da52ab97cd0 /sw
parente94ad965f877ad6a860273c5fed94416998678cf (diff)
fix assert on exporting fdo79938-1.ott to .doc
Change-Id: I93f331bd1c57bd016948e3ed784530724a1028b4
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 8810fb934890..4ebf690645b7 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2026,10 +2026,12 @@ static int lcl_CheckForm( const SwForm& rForm, sal_uInt8 nLvl, OUString& rText )
nRet = 2;
break;
case TOKEN_TEXT:
+ {
nRet = 3;
- rText = aIt->sText.copy( 0, 5 ); // #i21237#
+ sal_Int32 nCount = std::min<sal_Int32>(5, aIt->sText.getLength());
+ rText = aIt->sText.copy(0, nCount); // #i21237#
break;
-
+ }
case TOKEN_LINK_START:
case TOKEN_LINK_END:
break;