Commit 8739f450 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

riched20: Don't emit paragraph props if they're the same as the previous paragraph's.

parent 2019ec38
...@@ -429,6 +429,10 @@ ME_StreamOutRTFParaProps(ME_TextEditor *editor, ME_OutStream *pStream, ...@@ -429,6 +429,10 @@ ME_StreamOutRTFParaProps(ME_TextEditor *editor, ME_OutStream *pStream,
PARAFORMAT2 *fmt = &para->member.para.fmt; PARAFORMAT2 *fmt = &para->member.para.fmt;
char props[STREAMOUT_BUFFER_SIZE] = ""; char props[STREAMOUT_BUFFER_SIZE] = "";
int i; int i;
ME_Paragraph *prev_para = NULL;
if (para->member.para.prev_para->type == diParagraph)
prev_para = &para->member.para.prev_para->member.para;
if (!editor->bEmulateVersion10) { /* v4.1 */ if (!editor->bEmulateVersion10) { /* v4.1 */
if (para->member.para.nFlags & MEPF_ROWSTART) { if (para->member.para.nFlags & MEPF_ROWSTART) {
...@@ -462,7 +466,9 @@ ME_StreamOutRTFParaProps(ME_TextEditor *editor, ME_OutStream *pStream, ...@@ -462,7 +466,9 @@ ME_StreamOutRTFParaProps(ME_TextEditor *editor, ME_OutStream *pStream,
} }
} }
/* TODO: Don't emit anything if the last PARAFORMAT2 is inherited */ if (prev_para && !memcmp( fmt, &prev_para->fmt, sizeof(*fmt) ))
return TRUE;
if (!ME_StreamOutPrint(pStream, "\\pard")) if (!ME_StreamOutPrint(pStream, "\\pard"))
return FALSE; return FALSE;
......
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