richedit: Substitute space for \tab and \par control words for simple tables.
For simple tables cells are represented with tabs, and a table row is ended at the end of the paragraph, so native richedit controls substitute spaces for \tab and \par rich text format control words.
This commit is contained in:
parent
a382e35600
commit
fe1a24ff88
|
@ -936,9 +936,23 @@ static void ME_RTFSpecialCharHook(RTF_Info *info)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case rtfTab:
|
||||
case rtfPar:
|
||||
if (tableDef)
|
||||
if (info->editor->bEmulateVersion10) { /* v1.0 - 3.0 */
|
||||
ME_DisplayItem *para;
|
||||
PARAFORMAT2 *pFmt;
|
||||
RTFFlushOutputBuffer(info);
|
||||
para = ME_GetParagraph(info->editor->pCursors[0].pRun);
|
||||
pFmt = para->member.para.pFmt;
|
||||
if (pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE)
|
||||
{
|
||||
/* rtfPar is treated like a space within a table. */
|
||||
info->rtfClass = rtfText;
|
||||
info->rtfMajor = ' ';
|
||||
}
|
||||
else if (info->rtfMinor == rtfPar && tableDef)
|
||||
tableDef->numCellsInserted = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue