Dylan Smith : richedit: Prevent streaming in rich text at end of table row.

Alexandre Julliard julliard at winehq.org
Fri Aug 29 07:30:45 CDT 2008


Module: wine
Branch: master
Commit: 36be721027c21bac824bcc8592c40c60cc2c9d7c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=36be721027c21bac824bcc8592c40c60cc2c9d7c

Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date:   Thu Aug 28 15:24:27 2008 -0400

richedit: Prevent streaming in rich text at end of table row.

---

 dlls/riched20/editor.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index e8720e9..3e6c79b 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -1410,6 +1410,28 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
     style = ME_GetSelectionInsertStyle(editor);
 
     ME_InternalDeleteText(editor, from, to-from, FALSE);
+
+    /* Don't insert text at the end of the table row */
+    if (!editor->bEmulateVersion10) { /* v4.1 */
+      ME_DisplayItem *para = ME_GetParagraph(editor->pCursors->pRun);
+      if (para->member.para.nFlags & MEPF_ROWEND)
+      {
+        para = para->member.para.next_para;
+        editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun);
+        editor->pCursors[0].nOffset = 0;
+      }
+      if (para->member.para.nFlags & MEPF_ROWSTART)
+      {
+        para = para->member.para.next_para;
+        editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun);
+        editor->pCursors[0].nOffset = 0;
+      }
+      editor->pCursors[1] = editor->pCursors[0];
+    } else { /* v1.0 - 3.0 */
+      if (editor->pCursors[0].pRun->member.run.nFlags & MERF_ENDPARA &&
+          ME_IsInTable(editor->pCursors[0].pRun))
+        return 0;
+    }
   }
   else {
     ME_DisplayItem *para_item;




More information about the wine-cvs mailing list