Generate ending \par in RTF output of RichEdit when streaming out a

whole document.
This commit is contained in:
Phil Krylov 2005-07-26 10:32:46 +00:00 committed by Alexandre Julliard
parent 6dd67f3d48
commit 2b6b09f591
1 changed files with 7 additions and 0 deletions

View File

@ -681,6 +681,8 @@ ME_StreamOutRTF(ME_TextEditor *editor, int nStart, int nChars, int dwFormat)
if (!ME_StreamOutPrint(editor, "\r\n\\par")) if (!ME_StreamOutPrint(editor, "\r\n\\par"))
return FALSE; return FALSE;
nChars--; nChars--;
if (editor->bEmulateVersion10 && nChars)
nChars--;
} else { } else {
int nEnd; int nEnd;
@ -790,7 +792,12 @@ ME_StreamOut(ME_TextEditor *editor, DWORD dwFormat, EDITSTREAM *stream)
nTo = -1; nTo = -1;
} }
if (nTo == -1) if (nTo == -1)
{
nTo = ME_GetTextLength(editor); nTo = ME_GetTextLength(editor);
/* Generate an end-of-paragraph at the end of SCF_ALL RTF output */
if (dwFormat & SF_RTF)
nTo++;
}
TRACE("from %d to %d\n", nStart, nTo); TRACE("from %d to %d\n", nStart, nTo);
if (dwFormat & SF_RTF) if (dwFormat & SF_RTF)