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
64adaf72
Commit
64adaf72
authored
Feb 23, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Added QueryStatus implementation.
parent
7ac34f9e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
2 deletions
+52
-2
oleobject.c
dlls/shdocvw/oleobject.c
+19
-2
webbrowser.c
dlls/shdocvw/tests/webbrowser.c
+33
-0
No files found.
dlls/shdocvw/oleobject.c
View file @
64adaf72
...
...
@@ -868,9 +868,26 @@ static HRESULT WINAPI WBOleCommandTarget_QueryStatus(IOleCommandTarget *iface,
const
GUID
*
pguidCmdGroup
,
ULONG
cCmds
,
OLECMD
prgCmds
[],
OLECMDTEXT
*
pCmdText
)
{
WebBrowser
*
This
=
OLECMD_THIS
(
iface
);
FIXME
(
"(%p)->(%s %u %p %p)
\n
"
,
This
,
debugstr_guid
(
pguidCmdGroup
),
cCmds
,
prgCmds
,
IOleCommandTarget
*
cmdtrg
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s %u %p %p)
\n
"
,
This
,
debugstr_guid
(
pguidCmdGroup
),
cCmds
,
prgCmds
,
pCmdText
);
return
E_NOTIMPL
;
if
(
!
This
->
doc_host
.
document
)
return
0x80040104
;
/* NOTE: There are probably some commands that we should handle here
* instead of forwarding to document object. */
hres
=
IUnknown_QueryInterface
(
This
->
doc_host
.
document
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IOleCommandTarget_QueryStatus
(
cmdtrg
,
pguidCmdGroup
,
cCmds
,
prgCmds
,
pCmdText
);
IOleCommandTarget_Release
(
cmdtrg
);
return
hres
;
}
static
HRESULT
WINAPI
WBOleCommandTarget_Exec
(
IOleCommandTarget
*
iface
,
...
...
dlls/shdocvw/tests/webbrowser.c
View file @
64adaf72
...
...
@@ -30,6 +30,7 @@
#include "exdisp.h"
#include "htiframe.h"
#include "mshtmhst.h"
#include "mshtmcid.h"
#include "idispids.h"
#include "olectl.h"
#include "mshtmdid.h"
...
...
@@ -2123,6 +2124,36 @@ static void test_download(void)
CHECK_CALLED
(
Invoke_DOCUMENTCOMPLETE
);
}
static
void
test_olecmd
(
IUnknown
*
unk
,
BOOL
loaded
)
{
IOleCommandTarget
*
cmdtrg
;
OLECMD
cmds
[
3
];
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
ok
(
hres
==
S_OK
,
"Could not get IOleCommandTarget iface: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
cmds
[
0
].
cmdID
=
OLECMDID_SPELL
;
cmds
[
0
].
cmdf
=
0xdeadbeef
;
cmds
[
1
].
cmdID
=
OLECMDID_REFRESH
;
cmds
[
1
].
cmdf
=
0xdeadbeef
;
hres
=
IOleCommandTarget_QueryStatus
(
cmdtrg
,
NULL
,
2
,
cmds
,
NULL
);
if
(
loaded
)
{
ok
(
hres
==
S_OK
,
"QueryStatus failed: %08x
\n
"
,
hres
);
ok
(
cmds
[
0
].
cmdf
==
OLECMDF_SUPPORTED
,
"OLECMDID_SPELL cmdf = %x
\n
"
,
cmds
[
0
].
cmdf
);
ok
(
cmds
[
1
].
cmdf
==
(
OLECMDF_ENABLED
|
OLECMDF_SUPPORTED
),
"OLECMDID_REFRESH cmdf = %x
\n
"
,
cmds
[
1
].
cmdf
);
}
else
{
ok
(
hres
==
0x80040104
,
"QueryStatus failed: %08x
\n
"
,
hres
);
ok
(
cmds
[
0
].
cmdf
==
0xdeadbeef
,
"OLECMDID_SPELL cmdf = %x
\n
"
,
cmds
[
0
].
cmdf
);
ok
(
cmds
[
1
].
cmdf
==
0xdeadbeef
,
"OLECMDID_REFRESH cmdf = %x
\n
"
,
cmds
[
0
].
cmdf
);
}
IOleCommandTarget_Release
(
cmdtrg
);
}
static
void
test_IServiceProvider
(
IUnknown
*
unk
)
{
IServiceProvider
*
servprov
=
(
void
*
)
0xdeadbeef
;
...
...
@@ -2213,10 +2244,12 @@ static void test_WebBrowser(BOOL do_download)
test_Extent
(
unk
);
test_wb_funcs
(
unk
,
TRUE
);
test_DoVerb
(
unk
);
test_olecmd
(
unk
,
FALSE
);
test_Navigate2
(
unk
);
if
(
do_download
)
{
test_download
();
test_olecmd
(
unk
,
TRUE
);
}
test_ClientSite
(
unk
,
NULL
);
...
...
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