Kaydet (Commit) 3f1a0a00 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

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
üst 3752d67c
......@@ -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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment