Kaydet (Commit) 72ef0d88 authored tarafından Luke Deller's avatar Luke Deller Kaydeden (comit) Caolán McNamara

Ignore sprmTFCantSplit90 in .doc file per MS spec

Microsoft's new .doc file format specification says to ignore
sprmTFCantSplit90 in favour of (the older!) sprmTFCantSplit.

This seems to have confused the OO developer who must have been trying
to reverse engineer this without documentation: the table parsing code
gets sprmTFCantSplit90 and sprmTFCantSplit the wrong way around.

This commit removes handling of sprmTFCantSplit90 according to the
instruction in the Microsoft file format specification.
http://msdn.microsoft.com/en-us/library/dd951612.aspx

Change-Id: Ic9d3dddf102d6af0a061d2e8b68de3cf5bd9bae1
Reviewed-on: https://gerrit.libreoffice.org/8885Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 6a7d04a9
......@@ -1552,11 +1552,10 @@ enum wwTableSprm
{
sprmNil,
sprmTTableWidth,sprmTTextFlow, sprmTFCantSplit, sprmTFCantSplit90,sprmTJc, sprmTFBiDi, sprmTDefTable,
sprmTDyaRowHeight, sprmTDefTableShd, sprmTDxaLeft, sprmTSetBrc,
sprmTSetBrc90, sprmTDxaCol, sprmTInsert, sprmTDelete, sprmTTableHeader,
sprmTDxaGapHalf, sprmTTableBorders, sprmTTableBorders90,
sprmTTableWidth, sprmTTextFlow, sprmTFCantSplit, sprmTJc, sprmTFBiDi,
sprmTDefTable, sprmTDyaRowHeight, sprmTDefTableShd, sprmTDxaLeft,
sprmTSetBrc, sprmTSetBrc90, sprmTDxaCol, sprmTInsert, sprmTDelete,
sprmTTableHeader, sprmTDxaGapHalf, sprmTTableBorders, sprmTTableBorders90,
sprmTDefTableNewShd, sprmTCellPadding, sprmTCellPaddingDefault
};
......@@ -1571,14 +1570,10 @@ wwTableSprm GetTableSprm(sal_uInt16 nId, ww::WordVersion eVer)
return sprmTTableWidth;
case NS_sprm::LN_TTextFlow:
return sprmTTextFlow;
case NS_sprm::LN_TFCantSplit90:
// FIXME this code gets the names of sprmTFCantSplit and
// sprmTFCantSplit90 the wrong way around.
return sprmTFCantSplit;
case NS_sprm::LN_TTableHeader:
return sprmTTableHeader;
case NS_sprm::LN_TFCantSplit:
return sprmTFCantSplit90;
return sprmTFCantSplit;
case NS_sprm::LN_TJc90:
return sprmTJc;
case NS_sprm::LN_TFBiDi:
......@@ -1780,10 +1775,6 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
pNewBand->bCantSplit = *pParams;
bClaimLineFmt = true;
break;
case sprmTFCantSplit90:
pNewBand->bCantSplit90 = *pParams;
bClaimLineFmt = true;
break;
case sprmTTableBorders:
pTableBorders = pParams; // process at end
break;
......@@ -3068,15 +3059,7 @@ void WW8TabDesc::AdjustNewBand()
//Word stores 1 for bCantSplit if the row cannot be split, we set true if
//we can split the row
// bCantSplit: Always true for rows containing merged cells (Word <= 2000 crashes otherwise)
// So in case bCantSplit is true, we check for bCantSplit90, which has been introduced for
// Word versions >= 2002.
// FIXME the above comment is suspect because bCantSplit and bCantSplit90
// have been populated the wrong way around.
bool bSetCantSplit = pActBand->bCantSplit;
if(bSetCantSplit)
bSetCantSplit = pActBand->bCantSplit90;
pTabLine->GetFrmFmt()->SetFmtAttr(SwFmtRowSplit(!bSetCantSplit));
short i; // SW-Index
......
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