diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c
index 022f41dbc36..a6270777d01 100644
--- a/dlls/mshtml/editor.c
+++ b/dlls/mshtml/editor.c
@@ -62,6 +62,7 @@ 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"
@@ -778,6 +779,20 @@ static HRESULT exec_fontsize(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
return S_OK;
}
+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->nscontainer)
+ do_ns_command(This->nscontainer, 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);
@@ -1110,10 +1125,19 @@ static HRESULT query_edit_status(HTMLDocument *This, OLECMD *cmd)
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;
+}
+
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},
diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c
index 4379cdcf02b..d54e7cc1368 100644
--- a/dlls/mshtml/tests/htmldoc.c
+++ b/dlls/mshtml/tests/htmldoc.c
@@ -2727,6 +2727,7 @@ static void test_MSHTML_QueryStatus(IUnknown *unk, DWORD cmdf)
test_QueryStatus(unk, &CGID_MSHTML, IDM_FONTNAME, cmdf);
test_QueryStatus(unk, &CGID_MSHTML, IDM_FONTSIZE, cmdf);
+ test_QueryStatus(unk, &CGID_MSHTML, IDM_SELECTALL, cmdf|OLECMDF_ENABLED);
test_QueryStatus(unk, &CGID_MSHTML, IDM_BOLD, cmdf);
test_QueryStatus(unk, &CGID_MSHTML, IDM_FORECOLOR, cmdf);
test_QueryStatus(unk, &CGID_MSHTML, IDM_JUSTIFYCENTER, cmdf);