Jacek Caban : mshtml: Don'
t do anything in exec_editmode if edit mode is already set.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jun 11 08:46:35 CDT 2007
Module: wine
Branch: master
Commit: 239b86fe8ff16c6be952421823beea36a4f55452
URL: http://source.winehq.org/git/wine.git/?a=commit;h=239b86fe8ff16c6be952421823beea36a4f55452
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sun Jun 10 11:37:37 2007 +0200
mshtml: Don't do anything in exec_editmode if edit mode is already set.
---
dlls/mshtml/olecmd.c | 3 +++
dlls/mshtml/tests/htmldoc.c | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/mshtml/olecmd.c b/dlls/mshtml/olecmd.c
index 468c401..8c4b8cf 100644
--- a/dlls/mshtml/olecmd.c
+++ b/dlls/mshtml/olecmd.c
@@ -523,6 +523,9 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
if(in || out)
FIXME("unsupported args\n");
+ if(This->usermode == EDITMODE)
+ return S_OK;
+
This->usermode = EDITMODE;
if(This->frame)
diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c
index 2627a85..083181a 100644
--- a/dlls/mshtml/tests/htmldoc.c
+++ b/dlls/mshtml/tests/htmldoc.c
@@ -2571,6 +2571,10 @@ static void test_exec_editmode(IUnknown *unk)
IOleCommandTarget_Release(cmdtrg);
editmode = TRUE;
+
+ hres = IOleCommandTarget_Exec(cmdtrg, &CGID_MSHTML, IDM_EDITMODE,
+ OLECMDEXECOPT_DODEFAULT, NULL, NULL);
+ ok(hres == S_OK, "Exec failed: %08x\n", hres);
}
static HWND create_container_window(void)
More information about the wine-cvs
mailing list