From 3f1a0a006810f7c9dbd270c7767cf331b1c901f5 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Wed, 6 Nov 2013 11:05:54 +0100 Subject: 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 --- sw/source/filter/ww8/ww8par2.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sw') diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index efd48e53c9b0..829131d83be2 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)); } -- cgit