richedit: Prevent assertion failure when streaming out nested tables.

The table properties are streamed out at the start of the table for
non-nested tables, and at the end of the table for nested tables.  The
assertion caught the fact that I didn't get the start of the table row
for nested tables before trying to stream out the properties.

The call to ME_GetTableRowStart will handle both of these cases by
getting the table row start paragraph and asserting that it is found.
This call was also the reason for removing the const qualifier on one
of the parameters.
This commit is contained in:
Dylan Smith 2008-09-30 17:11:41 -04:00 committed by Alexandre Julliard
parent fac8e957c5
commit ee5342e432
1 changed files with 2 additions and 2 deletions

View File

@ -286,7 +286,7 @@ ME_StreamOutRTFFontAndColorTbl(ME_OutStream *pStream, ME_DisplayItem *pFirstRun,
static BOOL
ME_StreamOutRTFTableProps(ME_TextEditor *editor, ME_OutStream *pStream,
const ME_DisplayItem *para)
ME_DisplayItem *para)
{
ME_DisplayItem *cell;
char props[STREAMOUT_BUFFER_SIZE] = "";
@ -294,7 +294,7 @@ ME_StreamOutRTFTableProps(ME_TextEditor *editor, ME_OutStream *pStream,
if (!ME_StreamOutPrint(pStream, "\\trowd"))
return FALSE;
if (!editor->bEmulateVersion10) { /* v4.1 */
assert(para->member.para.nFlags & MEPF_ROWSTART);
para = ME_GetTableRowStart(para);
cell = para->member.para.next_para->member.para.pCell;
assert(cell);
do {