Jacek Caban : mshtml: Added edit mode IDM_COPY implementation.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jun 11 08:46:40 CDT 2007
Module: wine
Branch: master
Commit: 4231c9e2ee4bac80396db7ed47944b9c194d7597
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4231c9e2ee4bac80396db7ed47944b9c194d7597
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Jun 11 00:28:48 2007 +0200
mshtml: Added edit mode IDM_COPY implementation.
---
dlls/mshtml/editor.c | 12 ++++++++++++
dlls/mshtml/mshtml_private.h | 1 +
dlls/mshtml/olecmd.c | 7 ++++++-
3 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c
index 6edf951..432f48c 100644
--- a/dlls/mshtml/editor.c
+++ b/dlls/mshtml/editor.c
@@ -41,6 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define NSCMD_BOLD "cmd_bold"
#define NSCMD_CHARNEXT "cmd_charNext"
#define NSCMD_CHARPREVIOUS "cmd_charPrevious"
+#define NSCMD_COPY "cmd_copy"
#define NSCMD_FONTCOLOR "cmd_fontColor"
#define NSCMD_FONTFACE "cmd_fontFace"
#define NSCMD_INDENT "cmd_indent"
@@ -933,6 +934,17 @@ static HRESULT exec_composesettings(HTMLDocument *This, DWORD cmdexecopt, VARIAN
return S_OK;
}
+HRESULT editor_exec_copy(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out)
+{
+ update_doc(This, UPDATE_UI);
+
+ if(!This->nscontainer)
+ return E_FAIL;
+
+ do_ns_editor_command(This->nscontainer, NSCMD_COPY);
+ return S_OK;
+}
+
static HRESULT query_edit_status(HTMLDocument *This, OLECMD *cmd)
{
switch(cmd->cmdID) {
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 44d6645..33806f6 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -398,6 +398,7 @@ void update_title(HTMLDocument*);
void init_editor(HTMLDocument*);
void set_ns_editmode(NSContainer*);
void handle_edit_event(HTMLDocument*,nsIDOMEvent*);
+HRESULT editor_exec_copy(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
extern DWORD mshtml_tls;
diff --git a/dlls/mshtml/olecmd.c b/dlls/mshtml/olecmd.c
index 8f8837d..61deb68 100644
--- a/dlls/mshtml/olecmd.c
+++ b/dlls/mshtml/olecmd.c
@@ -469,7 +469,12 @@ static HRESULT query_mshtml_copy(HTMLDocument *This, OLECMD *cmd)
static HRESULT exec_mshtml_copy(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out)
{
- FIXME("(%p)->(%08x %p %p)\n", This, cmdexecopt, in, out);
+ TRACE("(%p)->(%08x %p %p)\n", This, cmdexecopt, in, out);
+
+ if(This->usermode == EDITMODE)
+ return editor_exec_copy(This, cmdexecopt, in, out);
+
+ FIXME("Unimplemented in browse mode\n");
return E_NOTIMPL;
}
More information about the wine-cvs
mailing list