riched20: Allow inheriting table cell definitions from previous table row.
Allow inheriting of table cell definitions from a previous table row when the current table row does not contain a \trowd, only an \intbl.
This commit is contained in:
parent
ac0bee4bf2
commit
4e796854af
|
@ -488,6 +488,9 @@ static void ME_RTFTblAttrHook(RTF_Info *info)
|
|||
RTFFlushOutputBuffer(info);
|
||||
para = ME_GetParagraph(info->editor->pCursors[0].pRun);
|
||||
|
||||
/* Release possibly inherited cell definitions */
|
||||
ME_DestroyTableCellList(para);
|
||||
|
||||
para->member.para.pCells = ALLOC_OBJ(ME_TableCell);
|
||||
para->member.para.pCells->nRightBoundary = 0;
|
||||
para->member.para.pCells->next = NULL;
|
||||
|
|
|
@ -136,7 +136,25 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, ME
|
|||
new_para->member.para.nFirstMargin = run_para->member.para.nFirstMargin;
|
||||
|
||||
new_para->member.para.bTable = run_para->member.para.bTable;
|
||||
|
||||
/* Inherit previous cell definitions if any */
|
||||
new_para->member.para.pCells = NULL;
|
||||
if (run_para->member.para.pCells)
|
||||
{
|
||||
ME_TableCell *pCell, *pNewCell;
|
||||
|
||||
for (pCell = run_para->member.para.pCells; pCell; pCell = pCell->next)
|
||||
{
|
||||
pNewCell = ALLOC_OBJ(ME_TableCell);
|
||||
pNewCell->nRightBoundary = pCell->nRightBoundary;
|
||||
pNewCell->next = NULL;
|
||||
if (new_para->member.para.pCells)
|
||||
new_para->member.para.pLastCell->next = pNewCell;
|
||||
else
|
||||
new_para->member.para.pCells = pNewCell;
|
||||
new_para->member.para.pLastCell = pNewCell;
|
||||
}
|
||||
}
|
||||
|
||||
/* fix paragraph properties. FIXME only needed when called from RTF reader */
|
||||
if (run_para->member.para.pCells && !run_para->member.para.bTable)
|
||||
|
|
Loading…
Reference in New Issue