summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2013-11-06 11:05:54 +0100
committerJan Holesovsky <kendy@collabora.com>2013-11-06 11:11:09 +0100
commit3f1a0a006810f7c9dbd270c7767cf331b1c901f5 (patch)
tree156dd84f5e76923afb08a2eca2c85e15865ab9fc
parent3752d67c050f369f683ca60e50e0a30f59166449 (diff)
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
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx6
1 files changed, 2 insertions, 4 deletions
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));
}