Jacek Caban : mshtml: Reload page in exec_editmode if available.
Alexandre Julliard
julliard at winehq.org
Tue Nov 20 10:54:56 CST 2007
Module: wine
Branch: master
Commit: 5d9e64554b69d7bb4065738985fbdfe4529c11cd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5d9e64554b69d7bb4065738985fbdfe4529c11cd
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Nov 20 01:51:03 2007 +0100
mshtml: Reload page in exec_editmode if available.
---
dlls/mshtml/olecmd.c | 35 +++++++++++++++++++++++++++--------
1 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/olecmd.c b/dlls/mshtml/olecmd.c
index db2d629..326b0b0 100644
--- a/dlls/mshtml/olecmd.c
+++ b/dlls/mshtml/olecmd.c
@@ -534,8 +534,6 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
IMoniker *mon;
HRESULT hres;
- static const WCHAR wszAboutBlank[] = {'a','b','o','u','t',':','b','l','a','n','k',0};
-
TRACE("(%p)->(%08x %p %p)\n", This, cmdexecopt, in, out);
if(in || out)
@@ -546,9 +544,20 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
This->usermode = EDITMODE;
+ if(This->mon) {
+ CLSID clsid = IID_NULL;
+ hres = IMoniker_GetClassID(This->mon, &clsid);
+ if(SUCCEEDED(hres)) {
+ /* We should use IMoniker::Save here */
+ FIXME("Use CLSID %s\n", debugstr_guid(&clsid));
+ }
+ }
+
if(This->frame)
IOleInPlaceFrame_SetStatusText(This->frame, NULL);
+ This->readystate = READYSTATE_UNINITIALIZED;
+
if(This->client) {
IOleCommandTarget *cmdtrg;
@@ -581,14 +590,24 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
if(This->nscontainer)
set_ns_editmode(This->nscontainer);
- hres = CreateURLMoniker(NULL, wszAboutBlank, &mon);
- if(FAILED(hres)) {
- FIXME("CreateURLMoniker failed: %08x\n", hres);
- return hres;
- }
-
update_doc(This, UPDATE_UI);
+ if(This->mon) {
+ /* FIXME: We should find nicer way to do this */
+ remove_doc_tasks(This);
+
+ mon = This->mon;
+ IMoniker_AddRef(mon);
+ }else {
+ static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k',0};
+
+ hres = CreateURLMoniker(NULL, about_blankW, &mon);
+ if(FAILED(hres)) {
+ FIXME("CreateURLMoniker failed: %08x\n", hres);
+ return hres;
+ }
+ }
+
hres = IPersistMoniker_Load(PERSISTMON(This), TRUE, mon, NULL, 0);
IMoniker_Release(mon);
if(FAILED(hres))
More information about the wine-cvs
mailing list