Commit 17c91f60 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Share OLECMDID_SELECTALL implementation with IDM_SELECTALL.

parent 3f158bf2
......@@ -60,7 +60,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define NSCMD_OL "cmd_ol"
#define NSCMD_OUTDENT "cmd_outdent"
#define NSCMD_PASTE "cmd_paste"
#define NSCMD_SELECTALL "cmd_selectAll"
#define NSCMD_SELECTBEGINLINE "cmd_selectBeginLine"
#define NSCMD_SELECTBOTTOM "cmd_selectBottom"
#define NSCMD_SELECTCHARNEXT "cmd_selectCharNext"
......@@ -651,20 +650,6 @@ static HRESULT exec_font(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARI
return E_NOTIMPL;
}
static HRESULT exec_selectall(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out)
{
TRACE("(%p)\n", This);
if(in || out)
FIXME("unsupported args\n");
if(This->doc_obj->nscontainer)
do_ns_command(This, NSCMD_SELECTALL, NULL);
update_doc(This, UPDATE_UI);
return S_OK;
}
static HRESULT exec_bold(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out)
{
TRACE("(%p)\n", This);
......@@ -1208,19 +1193,10 @@ static HRESULT exec_hyperlink(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
return hres;
}
static HRESULT query_selall_status(HTMLDocument *This, OLECMD *cmd)
{
TRACE("(%p)->(%p)\n", This, cmd);
cmd->cmdf = OLECMDF_SUPPORTED|OLECMDF_ENABLED;
return S_OK;
}
const cmdtable_t editmode_cmds[] = {
{IDM_DELETE, query_edit_status, exec_delete},
{IDM_FONTNAME, query_edit_status, exec_fontname},
{IDM_FONTSIZE, query_edit_status, exec_fontsize},
{IDM_SELECTALL, query_selall_status , exec_selectall},
{IDM_FORECOLOR, query_edit_status, exec_forecolor},
{IDM_BOLD, query_edit_status, exec_bold},
{IDM_ITALIC, query_edit_status, exec_italic},
......
......@@ -38,6 +38,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define NSCMD_COPY "cmd_copy"
#define NSCMD_SELECTALL "cmd_selectAll"
void do_ns_command(HTMLDocument *This, const char *cmd, nsICommandParams *nsparam)
{
......@@ -385,10 +386,18 @@ static HRESULT exec_rendo(HTMLDocument *This, DWORD nCmdexecopt, VARIANT *pvaIn,
return E_NOTIMPL;
}
static HRESULT exec_select_all(HTMLDocument *This, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
static HRESULT exec_select_all(HTMLDocument *This, DWORD nCmdexecopt, VARIANT *in, VARIANT *out)
{
FIXME("(%p)->(%d %p %p)\n", This, nCmdexecopt, pvaIn, pvaOut);
return E_NOTIMPL;
TRACE("(%p)\n", This);
if(in || out)
FIXME("unsupported args\n");
if(This->doc_obj->nscontainer)
do_ns_command(This, NSCMD_SELECTALL, NULL);
update_doc(This, UPDATE_UI);
return S_OK;
}
static HRESULT exec_clear_selection(HTMLDocument *This, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
......@@ -641,6 +650,14 @@ static HRESULT exec_mshtml_paste(HTMLDocument *This, DWORD cmdexecopt, VARIANT *
return S_OK;
}
static HRESULT query_selall_status(HTMLDocument *This, OLECMD *cmd)
{
TRACE("(%p)->(%p)\n", This, cmd);
cmd->cmdf = OLECMDF_SUPPORTED|OLECMDF_ENABLED;
return S_OK;
}
static HRESULT exec_browsemode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out)
{
WARN("(%p)->(%08x %p %p)\n", This, cmdexecopt, in, out);
......@@ -759,6 +776,7 @@ static const cmdtable_t base_cmds[] = {
{IDM_COPY, query_mshtml_copy, exec_mshtml_copy},
{IDM_PASTE, query_mshtml_paste, exec_mshtml_paste},
{IDM_CUT, query_mshtml_cut, exec_mshtml_cut},
{IDM_SELECTALL, query_selall_status, exec_select_all},
{IDM_BROWSEMODE, NULL, exec_browsemode},
{IDM_EDITMODE, NULL, exec_editmode},
{IDM_PRINT, query_enabled_stub, exec_print},
......
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