Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/riched20/editor.c | 2 +- dlls/riched20/txthost.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 9ac5d49a3db..cacad463963 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3953,7 +3953,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ME_StreamInRTFString(editor, 0, (char *)lParam); } else - ME_SetText(editor, (void*)lParam, unicode); + ME_SetText( editor, (void*)lParam, TRUE ); } else TRACE("WM_SETTEXT - NULL\n"); diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index 14cb19e8f45..23c9962bb3a 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -863,6 +863,18 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam, SetWindowLongW( hwnd, GWL_STYLE, style ); return res; } + case WM_SETTEXT: + { + char *textA = (char *)lparam; + WCHAR *text = (WCHAR *)lparam; + int len; + + if (!unicode && textA && strncmp( textA, "{\rtf", 5 ) && strncmp( textA, "{\urtf", 6 )) + text = ME_ToUnicode( CP_ACP, textA, &len ); + hr = ITextServices_TxSendMessage( host->text_srv, msg, wparam, (LPARAM)text, &res ); + if (text != (WCHAR *)lparam) ME_EndToUnicode( CP_ACP, text ); + break; + } default: res = ME_HandleMessage( editor, msg, wparam, lparam, unicode, &hr ); }
Huw Davies huw@codeweavers.com writes:
Signed-off-by: Huw Davies huw@codeweavers.com
dlls/riched20/editor.c | 2 +- dlls/riched20/txthost.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)
This breaks the non-PE build:
clang -m32 -c -o dlls/riched20/txthost.o ../wine/dlls/riched20/txthost.c -Idlls/riched20 -I../wine/dlls/riched20 -Iinclude \ -I../wine/include -I../wine/include/msvcrt -D__WINESRC__ -D_UCRT -D_REENTRANT -fno-PIC \ -fasynchronous-unwind-tables -fno-builtin -fshort-wchar -Wall -pipe -fcf-protection=none \ -fno-stack-protector -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body \ -Wignored-qualifiers -Wno-pragma-pack -Wstrict-prototypes -Wtype-limits -Wvla -Wwrite-strings \ -Wpointer-arith -gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer -g -O2 -Wno-enum-conversion -Wno-sometimes-uninitialized -Wno-ignored-attributes -Wno-array-bounds -Wno-absolute-value -Wno-incompatible-pointer-types ../wine/dlls/riched20/txthost.c:874:14: error: use of undeclared identifier 'text_services_stdcall_vtbl' hr = ITextServices_TxSendMessage( host->text_srv, msg, wparam, (LPARAM)text, &res ); ^ ../wine/dlls/riched20/editor.h:387:51: note: expanded from macro 'ITextServices_TxSendMessage' #define ITextServices_TxSendMessage(This,a,b,c,d) TXTSERV_VTABLE(This)->TxSendMessage(This,a,b,c,d) ^ ../wine/dlls/riched20/editor.h:383:32: note: expanded from macro 'TXTSERV_VTABLE' #define TXTSERV_VTABLE(This) (&text_services_stdcall_vtbl) ^ 1 error generated. make: *** [Makefile:134523: dlls/riched20/txthost.o] Error 1