Commit fe1a24ff authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

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.
parent a382e356
......@@ -936,9 +936,23 @@ static void ME_RTFSpecialCharHook(RTF_Info *info)
}
break;
}
case rtfTab:
case rtfPar:
if (tableDef)
tableDef->numCellsInserted = 0;
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;
}
}
......
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