Jacek Caban : mshtml: Added support for IDM_CUT command in browser mode.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Dec 10 15:34:08 CST 2014


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Dec 10 19:02:37 2014 +0100

mshtml: Added support for IDM_CUT command in browser mode.

---

 dlls/mshtml/olecmd.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/olecmd.c b/dlls/mshtml/olecmd.c
index a49949d..c45e9c9 100644
--- a/dlls/mshtml/olecmd.c
+++ b/dlls/mshtml/olecmd.c
@@ -573,13 +573,26 @@ static HRESULT query_mshtml_cut(HTMLDocument *This, OLECMD *cmd)
 
 static HRESULT exec_mshtml_cut(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out)
 {
+    nsIClipboardCommands *clipboard_commands;
+    nsresult nsres;
+
     TRACE("(%p)->(%08x %p %p)\n", This, cmdexecopt, in, out);
 
     if(This->doc_obj->usermode == EDITMODE)
         return editor_exec_cut(This, cmdexecopt, in, out);
 
-    FIXME("Unimplemented in browse mode\n");
-    return E_NOTIMPL;
+    clipboard_commands = get_clipboard_commands(This);
+    if(!clipboard_commands)
+        return E_UNEXPECTED;
+
+    nsres = nsIClipboardCommands_CutSelection(clipboard_commands);
+    nsIClipboardCommands_Release(clipboard_commands);
+    if(NS_FAILED(nsres)) {
+        ERR("Paste failed: %08x\n", nsres);
+        return E_FAIL;
+    }
+
+    return S_OK;
 }
 
 static HRESULT query_mshtml_paste(HTMLDocument *This, OLECMD *cmd)




More information about the wine-cvs mailing list