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:
Dylan Smith 2008-08-12 23:15:21 -04:00 committed by Alexandre Julliard
parent a382e35600
commit fe1a24ff88
1 changed files with 16 additions and 2 deletions

View File

@ -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;
}
}