Commit 99e6592c authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Move most code from handle_editor_load to exec_editmode.

parent fdfa760c
......@@ -505,29 +505,6 @@ void handle_edit_event(HTMLDocument *This, nsIDOMEvent *event)
void handle_edit_load(HTMLDocument *This)
{
get_editor_controller(This->nscontainer);
if(This->ui_active) {
OLECHAR wszHTMLDocument[30];
RECT rcBorderWidths;
if(This->ip_window)
IOleInPlaceUIWindow_SetActiveObject(This->ip_window, NULL, NULL);
if(This->hostui)
IDocHostUIHandler_HideUI(This->hostui);
if(This->hostui)
IDocHostUIHandler_ShowUI(This->hostui, DOCHOSTUITYPE_AUTHOR, ACTOBJ(This), CMDTARGET(This),
This->frame, This->ip_window);
LoadStringW(hInst, IDS_HTMLDOCUMENT, wszHTMLDocument,
sizeof(wszHTMLDocument)/sizeof(WCHAR));
if(This->ip_window)
IOleInPlaceUIWindow_SetActiveObject(This->ip_window, ACTOBJ(This), wszHTMLDocument);
memset(&rcBorderWidths, 0, sizeof(rcBorderWidths));
IOleInPlaceFrame_SetBorderSpace(This->frame, &rcBorderWidths);
}
}
static void set_ns_fontname(NSContainer *This, const char *fontname)
......
......@@ -583,7 +583,35 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
update_doc(This, UPDATE_UI);
return IPersistMoniker_Load(PERSISTMON(This), TRUE, mon, NULL, 0);
hres = IPersistMoniker_Load(PERSISTMON(This), TRUE, mon, NULL, 0);
IMoniker_Release(mon);
if(FAILED(hres))
return hres;
if(This->ui_active) {
OLECHAR wszHTMLDocument[30];
RECT rcBorderWidths;
if(This->ip_window)
IOleInPlaceUIWindow_SetActiveObject(This->ip_window, NULL, NULL);
if(This->hostui)
IDocHostUIHandler_HideUI(This->hostui);
if(This->hostui)
IDocHostUIHandler_ShowUI(This->hostui, DOCHOSTUITYPE_AUTHOR, ACTOBJ(This), CMDTARGET(This),
This->frame, This->ip_window);
LoadStringW(hInst, IDS_HTMLDOCUMENT, wszHTMLDocument,
sizeof(wszHTMLDocument)/sizeof(WCHAR));
if(This->ip_window)
IOleInPlaceUIWindow_SetActiveObject(This->ip_window, ACTOBJ(This), wszHTMLDocument);
memset(&rcBorderWidths, 0, sizeof(rcBorderWidths));
IOleInPlaceFrame_SetBorderSpace(This->frame, &rcBorderWidths);
}
return S_OK;
}
static HRESULT exec_htmleditmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment