[Libreoffice-commits] core.git: sw/source

Jan Holesovsky kendy at collabora.com
Wed Nov 6 11:12:58 CET 2013


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

New commits:
commit 3f1a0a006810f7c9dbd270c7767cf331b1c901f5
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Nov 6 11:05:54 2013 +0100

    Related fdo#47802: Bring the 8bit and 16bit .doc on par.
    
    The code expects that sTxt holds both the cbTextBefore and cbTextAfter, so
    let's make it so in the 16bit format too.
    
    This fixes assertion in doc/fdo47802-3.doc.
    
    Change-Id: I35cc7c1e80a33f013ab2eaae073b111214245e25

diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index efd48e5..829131d 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -606,13 +606,11 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
     OUString sTxt;
     if (bVer67)
     {
-        sTxt = OUString( (sal_Char*)pTxt,  SVBT8ToByte( rAV.cbTextBefore )
-                                 + SVBT8ToByte( rAV.cbTextAfter  ), eCharSet );
+        sTxt = OUString((sal_Char*)pTxt, SVBT8ToByte(rAV.cbTextBefore) + SVBT8ToByte(rAV.cbTextAfter), eCharSet);
     }
     else
     {
-        for(sal_Int32 i = SVBT8ToByte(rAV.cbTextBefore);
-            i < SVBT8ToByte(rAV.cbTextAfter); ++i, pTxt += 2)
+        for(sal_Int32 i = 0; i < SVBT8ToByte(rAV.cbTextBefore) + SVBT8ToByte(rAV.cbTextAfter); ++i, pTxt += 2)
         {
             sTxt += OUString(SVBT16ToShort(*(SVBT16*)pTxt));
         }


More information about the Libreoffice-commits mailing list