[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sw/source

Caolán McNamara caolanm at redhat.com
Tue Apr 21 13:43:11 PDT 2015


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

New commits:
commit 12de601a11287599c1ecacf7a51bfa01beedda02
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Apr 8 20:34:35 2015 +0100

    fix assert on exporting fdo79938-1.ott to .doc
    
    Change-Id: I93f331bd1c57bd016948e3ed784530724a1028b4
    (cherry picked from commit 9c0788f545a9276d18060965794143179917e766)
    Reviewed-on: https://gerrit.libreoffice.org/15459
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index d105bf5..ea6998f 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2061,10 +2061,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;


More information about the Libreoffice-commits mailing list