Module: wine Branch: master Commit: 0d8e9e622ff74c0083e70722aa0352acdef1c45b URL: http://source.winehq.org/git/wine.git/?a=commit;h=0d8e9e622ff74c0083e70722aa...
Author: Dylan Smith dylan.ah.smith@gmail.com Date: Thu Sep 11 13:32:06 2008 -0400
richedit: Make sure the nested tables' RTF properties are not skipped.
---
dlls/riched20/editor.c | 3 +++ dlls/riched20/reader.c | 10 ++++++++++ dlls/riched20/rtf.h | 1 + 3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 0ae8844..01ef9c1 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1476,7 +1476,10 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre RTFSetDestinationCallback(&parser, rtfPict, ME_RTFReadPictGroup); RTFSetDestinationCallback(&parser, rtfObject, ME_RTFReadObjectGroup); if (!parser.editor->bEmulateVersion10) /* v4.1 */ + { RTFSetDestinationCallback(&parser, rtfNoNestTables, RTFSkipGroup); + RTFSetDestinationCallback(&parser, rtfNestTableProps, RTFReadGroup); + } BeginFile(&parser);
/* do the parsing */ diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c index 95d88f7..c455c57 100644 --- a/dlls/riched20/reader.c +++ b/dlls/riched20/reader.c @@ -406,6 +406,16 @@ void RTFSkipGroup(RTF_Info *info) } }
+/* + * Do no special processing on the group. + * + * This acts as a placeholder for a callback in order to indicate that it + * shouldn't be ignored. Instead it will fallback on the loop in RTFRead. + */ +void RTFReadGroup (RTF_Info *info) +{ +} +
/* * Read one token. Call the read hook if there is one. The diff --git a/dlls/riched20/rtf.h b/dlls/riched20/rtf.h index ec08161..8fc8abc 100644 --- a/dlls/riched20/rtf.h +++ b/dlls/riched20/rtf.h @@ -1211,6 +1211,7 @@ void RTFSetReadHook (RTF_Info *, RTFFuncPtr); RTFFuncPtr RTFGetReadHook (const RTF_Info *); void RTFRouteToken (RTF_Info *); void RTFSkipGroup (RTF_Info *); +void RTFReadGroup (RTF_Info *); void RTFExpandStyle (RTF_Info *, int); int RTFCheckCM (const RTF_Info *, int, int); int RTFCheckCMM (const RTF_Info *, int, int, int);