diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-12-03 16:14:12 +0100 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-12-03 16:14:12 +0100 |
commit | ca462ec2b9fe56449f9c4227914b42c7f277429e (patch) | |
tree | db989309cf4accf7722a11b0fb5e9b73b3a78d5e | |
parent | 880519b1085de26980d4bfc3248af78e169e4f08 (diff) | |
parent | bac48dee45960d6c2faa5ec99141ace33f43d089 (diff) |
update to current version
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 635a2b7e6a..b737fc1102 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -1170,6 +1170,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS) pS++; short nLen = (INT16)SVBT16ToShort( pS - 2 ); // nicht schoen + BYTE nCols = *pS; // Anzahl der Zellen short nOldCols = nWwCols; @@ -1200,7 +1201,11 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS) setcelldefaults(pTCs,nCols); } - if( nFileCols ) + short nColsToRead = nFileCols; + if (nColsToRead > nCols) + nColsToRead = nCols; + + if( nColsToRead ) { // lies TCs ein @@ -1216,9 +1221,9 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS) if( bVer67 ) { WW8_TCellVer6* pTc = (WW8_TCellVer6*)pT; - for(i=0; i<nFileCols; i++, ++pAktTC,++pTc) + for(i=0; i<nColsToRead; i++, ++pAktTC,++pTc) { - if( i < nFileCols ) + if( i < nColsToRead ) { // TC aus File ? BYTE aBits1 = SVBT8ToByte( pTc->aBits1Ver6 ); pAktTC->bFirstMerged = ( ( aBits1 & 0x01 ) != 0 ); @@ -1248,7 +1253,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS) else { WW8_TCellVer8* pTc = (WW8_TCellVer8*)pT; - for (int k = 0; k < nFileCols; ++k, ++pAktTC, ++pTc ) + for (int k = 0; k < nColsToRead; ++k, ++pAktTC, ++pTc ) { UINT16 aBits1 = SVBT16ToShort( pTc->aBits1Ver8 ); pAktTC->bFirstMerged = ( ( aBits1 & 0x0001 ) != 0 ); @@ -1296,6 +1301,12 @@ void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC) BYTE nitcLim = pParamsTSetBRC[1];// (last col to be changed)+1 BYTE nFlag = *(pParamsTSetBRC+2); + if (nitcFirst >= nWwCols) + return; + + if (nitcLim > nWwCols) + nitcLim = nWwCols; + bool bChangeRight = (nFlag & 0x08) ? true : false; bool bChangeBottom = (nFlag & 0x04) ? true : false; bool bChangeLeft = (nFlag & 0x02) ? true : false; |