diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 107dcea..4ed1f26 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -83,7 +83,7 @@ + EM_LINEINDEX + EM_LINELENGTH + EM_LINESCROLL - - EM_PASTESPECIAL + + EM_PASTESPECIAL (Only CF_TEXT format implemented) + EM_POSFROMCHAR + EM_REDO 2.0 + EM_REQUESTRESIZE @@ -2092,6 +2092,23 @@ static BOOL ME_Copy(ME_TextEditor *editor, CHARRANGE *range) return SUCCEEDED(hr) != 0; } +/* Stub implementation of EM_PASTESPECIAL, which is supposed to paste a specific clipboard format + to a richedit control. Only CF_TEXT is supported, as that does the same thing as WM_PASTE. */ +static BOOL ME_PasteSpecial(ME_TextEditor *editor, UINT cf, REPASTESPECIAL *rps) +{ + /* EM_PASTESPECIAL for CF_TEXT is the same as calling WM_PASTE according to msdn. */ + if (rps != NULL && rps->dwAspect != 0) { + FIXME("REPASTESPECIAL structure handling not yet implemented\n"); + } + + if (cf != CF_TEXT && cf != CF_UNICODETEXT) { + FIXME("Clipboard formats other than CF_TEXT and CF_UNICODETEXT not yet implemented!\n"); + return FALSE; + } + + return ME_Paste(editor); +} + /* helper to send a msg filter notification */ static BOOL ME_FilterEvent(ME_TextEditor *editor, UINT msg, WPARAM* wParam, LPARAM* lParam) @@ -2934,7 +2951,6 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, UNSUPPORTED_MSG(EM_GETTYPOGRAPHYOPTIONS) UNSUPPORTED_MSG(EM_GETUNDONAME) UNSUPPORTED_MSG(EM_GETWORDBREAKPROCEX) - UNSUPPORTED_MSG(EM_PASTESPECIAL) UNSUPPORTED_MSG(EM_SELECTIONTYPE) UNSUPPORTED_MSG(EM_SETBIDIOPTIONS) UNSUPPORTED_MSG(EM_SETEDITSTYLE) @@ -3449,6 +3465,9 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, return TRUE; return FALSE; } + case EM_PASTESPECIAL: + ME_PasteSpecial(editor, (UINT)wParam, (REPASTESPECIAL*)lParam); + return 0; case WM_PASTE: ME_Paste(editor); return 0;