Kaydet (Commit) 04f269f4 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#3110 GeneratePLCF only generated word6 sized missing entries

BTE was 2 bytes in word 7- but 4 bytes in word 8+

Change-Id: I24007d26fccc5edc104320bd2eb8f9c62399c988
Reviewed-on: https://gerrit.libreoffice.org/41623Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2e36b1e0
...@@ -2158,7 +2158,7 @@ void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN) ...@@ -2158,7 +2158,7 @@ void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN)
if (!failure) if (!failure)
{ {
size_t nSiz = 6 * nIMax + 4; size_t nSiz = (4 + nStru) * nIMax + 4;
size_t nElems = ( nSiz + 3 ) / 4; size_t nElems = ( nSiz + 3 ) / 4;
pPLCF_PosArray.reset( new sal_Int32[ nElems ] ); // Pointer to Pos-array pPLCF_PosArray.reset( new sal_Int32[ nElems ] ); // Pointer to Pos-array
...@@ -2213,7 +2213,7 @@ void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN) ...@@ -2213,7 +2213,7 @@ void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN)
for (sal_Int32 i = 0; i < ncpN; ++i) // construct PNs for (sal_Int32 i = 0; i < ncpN; ++i) // construct PNs
{ {
ShortToSVBT16(static_cast<sal_uInt16>(nPN + i), p); ShortToSVBT16(static_cast<sal_uInt16>(nPN + i), p);
p+=2; p += nStru;
} }
} }
......
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