Dylan Smith : richedit: Return number of chars inserted for EM_STREAMIN with SF_RTF.
Alexandre Julliard
julliard at winehq.org
Mon Sep 26 16:15:08 CDT 2011
Module: wine
Branch: master
Commit: f61d417a3493c61d62f678995a363e8f9ae25291
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f61d417a3493c61d62f678995a363e8f9ae25291
Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date: Sun Sep 25 22:17:28 2011 -0400
richedit: Return number of chars inserted for EM_STREAMIN with SF_RTF.
---
dlls/riched20/editor.c | 4 ++++
dlls/riched20/tests/editor.c | 8 ++++----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 8051889..5dda1ea 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -1470,6 +1470,8 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
if (!invalidRTF && !inStream.editstream->dwError)
{
if (format & SF_RTF) {
+ from = ME_GetCursorOfs(&editor->pCursors[0]);
+
/* setup the RTF parser */
memset(&parser, 0, sizeof parser);
RTFSetEditStream(&parser, &inStream);
@@ -1563,6 +1565,8 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
}
}
}
+ to = ME_GetCursorOfs(&editor->pCursors[0]);
+ num_read = to - from;
style = parser.style;
}
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index 5058b7a..c8d8e0d 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -5062,7 +5062,7 @@ static void test_EM_STREAMIN(void)
es.dwError = 0;
es.pfnCallback = test_EM_STREAMIN_esCallback;
result = SendMessage(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es);
- todo_wine ok(result == 12, "got %ld, expected %d\n", result, 12);
+ ok(result == 12, "got %ld, expected %d\n", result, 12);
result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer);
ok (result == 12,
@@ -5077,7 +5077,7 @@ static void test_EM_STREAMIN(void)
es.dwError = 0;
es.pfnCallback = test_EM_STREAMIN_esCallback;
result = SendMessage(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es);
- todo_wine ok(result == 12, "got %ld, expected %d\n", result, 12);
+ ok(result == 12, "got %ld, expected %d\n", result, 12);
result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer);
ok (result == 12,
@@ -5092,7 +5092,7 @@ static void test_EM_STREAMIN(void)
es.dwError = 0;
es.pfnCallback = test_EM_STREAMIN_esCallback;
result = SendMessage(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es);
- todo_wine ok(result == 13, "got %ld, expected %d\n", result, 13);
+ ok(result == 13, "got %ld, expected %d\n", result, 13);
result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer);
ok (result == 14,
@@ -5106,7 +5106,7 @@ static void test_EM_STREAMIN(void)
es.dwError = 0;
es.pfnCallback = test_EM_STREAMIN_esCallback;
result = SendMessage(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es);
- todo_wine ok(result == 12, "got %ld, expected %d\n", result, 12);
+ ok(result == 12, "got %ld, expected %d\n", result, 12);
result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer);
ok (result == 12,
More information about the wine-cvs
mailing list