sw/source/filter/ww8/ww8atr.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 9c0788f545a9276d18060965794143179917e766
Author: Caolán McNamara <caol...@redhat.com>
Date:   Wed Apr 8 20:34:35 2015 +0100

    fix assert on exporting fdo79938-1.ott to .doc
    
    Change-Id: I93f331bd1c57bd016948e3ed784530724a1028b4

diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 8810fb9..4ebf690 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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to