Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
510481b7
Commit
510481b7
authored
Jun 10, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added command table for CGID_MSHTML commands.
parent
85f29f52
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
12 deletions
+41
-12
mshtml_private.h
dlls/mshtml/mshtml_private.h
+6
-0
olecmd.c
dlls/mshtml/olecmd.c
+35
-12
No files found.
dlls/mshtml/mshtml_private.h
View file @
510481b7
...
@@ -374,6 +374,12 @@ void release_nodes(HTMLDocument*);
...
@@ -374,6 +374,12 @@ void release_nodes(HTMLDocument*);
BOOL
install_wine_gecko
(
void
);
BOOL
install_wine_gecko
(
void
);
typedef
struct
{
DWORD
id
;
HRESULT
(
*
query
)(
HTMLDocument
*
,
OLECMD
*
);
HRESULT
(
*
exec
)(
HTMLDocument
*
,
DWORD
,
VARIANT
*
,
VARIANT
*
);
}
cmdtable_t
;
/* editor */
/* editor */
void
handle_edit_event
(
HTMLDocument
*
,
nsIDOMEvent
*
);
void
handle_edit_event
(
HTMLDocument
*
,
nsIDOMEvent
*
);
...
...
dlls/mshtml/olecmd.c
View file @
510481b7
...
@@ -777,9 +777,12 @@ static HRESULT exec_underline(HTMLDocument *This)
...
@@ -777,9 +777,12 @@ static HRESULT exec_underline(HTMLDocument *This)
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
exec_browsemode
(
HTMLDocument
*
This
)
static
HRESULT
exec_browsemode
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
{
WARN
(
"(%p)
\n
"
,
This
);
WARN
(
"(%p)->(%08x %p %p)
\n
"
,
This
,
cmdexecopt
,
in
,
out
);
if
(
in
||
out
)
FIXME
(
"unsupported args
\n
"
);
This
->
usermode
=
BROWSEMODE
;
This
->
usermode
=
BROWSEMODE
;
...
@@ -834,14 +837,17 @@ static void setup_ns_editing(NSContainer *This)
...
@@ -834,14 +837,17 @@ static void setup_ns_editing(NSContainer *This)
nsIWebBrowser_SetParentURIContentListener
(
This
->
webbrowser
,
NSURICL
(
This
));
nsIWebBrowser_SetParentURIContentListener
(
This
->
webbrowser
,
NSURICL
(
This
));
}
}
static
HRESULT
exec_editmode
(
HTMLDocument
*
This
)
static
HRESULT
exec_editmode
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
{
IMoniker
*
mon
;
IMoniker
*
mon
;
HRESULT
hres
;
HRESULT
hres
;
static
const
WCHAR
wszAboutBlank
[]
=
{
'a'
,
'b'
,
'o'
,
'u'
,
't'
,
':'
,
'b'
,
'l'
,
'a'
,
'n'
,
'k'
,
0
};
static
const
WCHAR
wszAboutBlank
[]
=
{
'a'
,
'b'
,
'o'
,
'u'
,
't'
,
':'
,
'b'
,
'l'
,
'a'
,
'n'
,
'k'
,
0
};
TRACE
(
"(%p)
\n
"
,
This
);
TRACE
(
"(%p)->(%08x %p %p)
\n
"
,
This
,
cmdexecopt
,
in
,
out
);
if
(
in
||
out
)
FIXME
(
"unsupported args
\n
"
);
This
->
usermode
=
EDITMODE
;
This
->
usermode
=
EDITMODE
;
...
@@ -998,6 +1004,12 @@ static const struct {
...
@@ -998,6 +1004,12 @@ static const struct {
{
OLECMDF_SUPPORTED
,
exec_get_print_template
}
/* OLECMDID_GETPRINTTEMPLATE */
{
OLECMDF_SUPPORTED
,
exec_get_print_template
}
/* OLECMDID_GETPRINTTEMPLATE */
};
};
static
const
cmdtable_t
base_cmds
[]
=
{
{
IDM_BROWSEMODE
,
NULL
,
exec_browsemode
},
{
IDM_EDITMODE
,
NULL
,
exec_editmode
},
{
0
,
NULL
,
NULL
}
};
static
HRESULT
WINAPI
OleCommandTarget_QueryInterface
(
IOleCommandTarget
*
iface
,
REFIID
riid
,
void
**
ppv
)
static
HRESULT
WINAPI
OleCommandTarget_QueryInterface
(
IOleCommandTarget
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
{
HTMLDocument
*
This
=
CMDTARGET_THIS
(
iface
);
HTMLDocument
*
This
=
CMDTARGET_THIS
(
iface
);
...
@@ -1165,6 +1177,20 @@ static HRESULT WINAPI OleCommandTarget_QueryStatus(IOleCommandTarget *iface, con
...
@@ -1165,6 +1177,20 @@ static HRESULT WINAPI OleCommandTarget_QueryStatus(IOleCommandTarget *iface, con
return
hres
;
return
hres
;
}
}
static
HRESULT
exec_from_table
(
HTMLDocument
*
This
,
const
cmdtable_t
*
cmdtable
,
DWORD
cmdid
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
const
cmdtable_t
*
iter
=
cmdtable
;
while
(
iter
->
id
&&
iter
->
id
!=
cmdid
)
iter
++
;
if
(
!
iter
->
id
||
!
iter
->
exec
)
return
OLECMDERR_E_NOTSUPPORTED
;
return
iter
->
exec
(
This
,
cmdexecopt
,
in
,
out
);
}
static
HRESULT
WINAPI
OleCommandTarget_Exec
(
IOleCommandTarget
*
iface
,
const
GUID
*
pguidCmdGroup
,
static
HRESULT
WINAPI
OleCommandTarget_Exec
(
IOleCommandTarget
*
iface
,
const
GUID
*
pguidCmdGroup
,
DWORD
nCmdID
,
DWORD
nCmdexecopt
,
VARIANT
*
pvaIn
,
VARIANT
*
pvaOut
)
DWORD
nCmdID
,
DWORD
nCmdexecopt
,
VARIANT
*
pvaIn
,
VARIANT
*
pvaOut
)
{
{
...
@@ -1185,6 +1211,11 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
...
@@ -1185,6 +1211,11 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
FIXME
(
"unsupported nCmdID %d of CGID_ShellDocView group
\n
"
,
nCmdID
);
FIXME
(
"unsupported nCmdID %d of CGID_ShellDocView group
\n
"
,
nCmdID
);
return
OLECMDERR_E_NOTSUPPORTED
;
return
OLECMDERR_E_NOTSUPPORTED
;
}
else
if
(
IsEqualGUID
(
&
CGID_MSHTML
,
pguidCmdGroup
))
{
}
else
if
(
IsEqualGUID
(
&
CGID_MSHTML
,
pguidCmdGroup
))
{
HRESULT
hres
=
exec_from_table
(
This
,
base_cmds
,
nCmdID
,
nCmdexecopt
,
pvaIn
,
pvaOut
);
if
(
hres
!=
OLECMDERR_E_NOTSUPPORTED
)
return
hres
;
switch
(
nCmdID
)
{
switch
(
nCmdID
)
{
case
IDM_COPY
:
case
IDM_COPY
:
if
(
pvaIn
||
pvaOut
)
if
(
pvaIn
||
pvaOut
)
...
@@ -1230,14 +1261,6 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
...
@@ -1230,14 +1261,6 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
if
(
pvaIn
||
pvaOut
)
if
(
pvaIn
||
pvaOut
)
FIXME
(
"unsupported arguments
\n
"
);
FIXME
(
"unsupported arguments
\n
"
);
return
exec_underline
(
This
);
return
exec_underline
(
This
);
case
IDM_BROWSEMODE
:
if
(
pvaIn
||
pvaOut
)
FIXME
(
"unsupported arguments
\n
"
);
return
exec_browsemode
(
This
);
case
IDM_EDITMODE
:
if
(
pvaIn
||
pvaOut
)
FIXME
(
"unsupported arguments
\n
"
);
return
exec_editmode
(
This
);
case
IDM_BASELINEFONT3
:
case
IDM_BASELINEFONT3
:
return
exec_baselinefont3
(
This
);
return
exec_baselinefont3
(
This
);
case
IDM_HORIZONTALLINE
:
case
IDM_HORIZONTALLINE
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment