Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
944ff51a
Commit
944ff51a
authored
Aug 18, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 18, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added IOleCommandTerget interface to the test.
- Make Wine pass the test. - Fix bug reported by Saulius Krasuckas.
parent
bdf90439
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
195 additions
and
14 deletions
+195
-14
oleobj.c
dlls/mshtml/oleobj.c
+44
-3
htmldoc.c
dlls/mshtml/tests/htmldoc.c
+136
-11
view.c
dlls/mshtml/view.c
+15
-0
No files found.
dlls/mshtml/oleobj.c
View file @
944ff51a
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "winbase.h"
#include "winbase.h"
#include "winuser.h"
#include "winuser.h"
#include "ole2.h"
#include "ole2.h"
#include "shlguid.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -62,6 +63,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
...
@@ -62,6 +63,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
{
{
HTMLDocument
*
This
=
OLEOBJ_THIS
(
iface
);
HTMLDocument
*
This
=
OLEOBJ_THIS
(
iface
);
IDocHostUIHandler
*
pDocHostUIHandler
=
NULL
;
IDocHostUIHandler
*
pDocHostUIHandler
=
NULL
;
IOleCommandTarget
*
cmdtrg
=
NULL
;
HRESULT
hres
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pClientSite
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pClientSite
);
...
@@ -132,6 +134,21 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
...
@@ -132,6 +134,21 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
}
}
}
}
hres
=
IOleClientSite_QueryInterface
(
pClientSite
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
if
(
SUCCEEDED
(
hres
))
{
VARIANT
var
;
OLECMD
cmd
=
{
OLECMDID_SETPROGRESSTEXT
,
0
};
IOleCommandTarget_QueryStatus
(
cmdtrg
,
NULL
,
1
,
&
cmd
,
NULL
);
V_VT
(
&
var
)
=
VT_I4
;
V_I4
(
&
var
)
=
0
;
IOleCommandTarget_Exec
(
cmdtrg
,
NULL
,
OLECMDID_SETPROGRESSMAX
,
0
,
&
var
,
NULL
);
IOleCommandTarget_Exec
(
cmdtrg
,
NULL
,
OLECMDID_SETPROGRESSPOS
,
0
,
&
var
,
NULL
);
IOleCommandTarget_Release
(
cmdtrg
);
}
IOleClientSite_AddRef
(
pClientSite
);
IOleClientSite_AddRef
(
pClientSite
);
This
->
client
=
pClientSite
;
This
->
client
=
pClientSite
;
This
->
hostui
=
pDocHostUIHandler
;
This
->
hostui
=
pDocHostUIHandler
;
...
@@ -719,7 +736,7 @@ static HRESULT WINAPI OleCommandTarget_QueryStatus(IOleCommandTarget *iface, con
...
@@ -719,7 +736,7 @@ static HRESULT WINAPI OleCommandTarget_QueryStatus(IOleCommandTarget *iface, con
ULONG
cCmds
,
OLECMD
prgCmds
[],
OLECMDTEXT
*
pCmdText
)
ULONG
cCmds
,
OLECMD
prgCmds
[],
OLECMDTEXT
*
pCmdText
)
{
{
HTMLDocument
*
This
=
CMDTARGET_THIS
(
iface
);
HTMLDocument
*
This
=
CMDTARGET_THIS
(
iface
);
HRESULT
hres
=
S_OK
;
HRESULT
hres
=
S_OK
,
hr
;
TRACE
(
"(%p)->(%s %ld %p %p)
\n
"
,
This
,
debugstr_guid
(
pguidCmdGroup
),
cCmds
,
prgCmds
,
pCmdText
);
TRACE
(
"(%p)->(%s %ld %p %p)
\n
"
,
This
,
debugstr_guid
(
pguidCmdGroup
),
cCmds
,
prgCmds
,
pCmdText
);
...
@@ -732,8 +749,29 @@ static HRESULT WINAPI OleCommandTarget_QueryStatus(IOleCommandTarget *iface, con
...
@@ -732,8 +749,29 @@ static HRESULT WINAPI OleCommandTarget_QueryStatus(IOleCommandTarget *iface, con
prgCmds
[
i
].
cmdf
=
0
;
prgCmds
[
i
].
cmdf
=
0
;
hres
=
OLECMDERR_E_NOTSUPPORTED
;
hres
=
OLECMDERR_E_NOTSUPPORTED
;
}
else
{
}
else
{
prgCmds
[
i
].
cmdf
=
exec_table
[
prgCmds
[
i
].
cmdID
].
cmdf
;
if
(
prgCmds
[
i
].
cmdID
==
OLECMDID_OPEN
||
prgCmds
[
i
].
cmdID
==
OLECMDID_NEW
)
{
TRACE
(
"cmdID = %ld returning %lx
\n
"
,
prgCmds
[
i
].
cmdID
,
prgCmds
[
i
].
cmdf
);
IOleCommandTarget
*
cmdtrg
=
NULL
;
OLECMD
olecmd
;
prgCmds
[
i
].
cmdf
=
OLECMDF_SUPPORTED
;
if
(
This
->
client
)
{
hr
=
IOleClientSite_QueryInterface
(
This
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
if
(
SUCCEEDED
(
hr
))
{
olecmd
.
cmdID
=
prgCmds
[
i
].
cmdID
;
olecmd
.
cmdf
=
0
;
hr
=
IOleCommandTarget_QueryStatus
(
cmdtrg
,
NULL
,
1
,
&
olecmd
,
NULL
);
if
(
SUCCEEDED
(
hr
)
&&
olecmd
.
cmdf
)
prgCmds
[
i
].
cmdf
=
olecmd
.
cmdf
;
}
}
else
{
ERR
(
"This->client == NULL, native would crash
\n
"
);
}
}
else
{
prgCmds
[
i
].
cmdf
=
exec_table
[
prgCmds
[
i
].
cmdID
].
cmdf
;
TRACE
(
"cmdID = %ld returning %lx
\n
"
,
prgCmds
[
i
].
cmdID
,
prgCmds
[
i
].
cmdf
);
}
hres
=
S_OK
;
hres
=
S_OK
;
}
}
}
}
...
@@ -760,6 +798,9 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
...
@@ -760,6 +798,9 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
}
}
return
exec_table
[
nCmdID
].
func
(
This
,
nCmdexecopt
,
pvaIn
,
pvaOut
);
return
exec_table
[
nCmdID
].
func
(
This
,
nCmdexecopt
,
pvaIn
,
pvaOut
);
}
else
if
(
IsEqualGUID
(
&
CGID_ShellDocView
,
pguidCmdGroup
))
{
FIXME
(
"unsupported nCmdID %ld of CGID_ShellDocView group
\n
"
,
nCmdID
);
return
OLECMDERR_E_UNKNOWNGROUP
;
}
}
FIXME
(
"Unsupported pguidCmdGroup %s
\n
"
,
debugstr_guid
(
pguidCmdGroup
));
FIXME
(
"Unsupported pguidCmdGroup %s
\n
"
,
debugstr_guid
(
pguidCmdGroup
));
...
...
dlls/mshtml/tests/htmldoc.c
View file @
944ff51a
This diff is collapsed.
Click to expand it.
dlls/mshtml/view.c
View file @
944ff51a
...
@@ -127,6 +127,7 @@ static HRESULT activate_window(HTMLDocument *This)
...
@@ -127,6 +127,7 @@ static HRESULT activate_window(HTMLDocument *This)
{
{
IOleInPlaceUIWindow
*
pIPWnd
;
IOleInPlaceUIWindow
*
pIPWnd
;
IOleInPlaceFrame
*
pIPFrame
;
IOleInPlaceFrame
*
pIPFrame
;
IOleCommandTarget
*
cmdtrg
;
RECT
posrect
,
cliprect
;
RECT
posrect
,
cliprect
;
OLEINPLACEFRAMEINFO
frameinfo
;
OLEINPLACEFRAMEINFO
frameinfo
;
HWND
parent_hwnd
;
HWND
parent_hwnd
;
...
@@ -195,6 +196,20 @@ static HRESULT activate_window(HTMLDocument *This)
...
@@ -195,6 +196,20 @@ static HRESULT activate_window(HTMLDocument *This)
return
hres
;
return
hres
;
}
}
hres
=
IOleClientSite_QueryInterface
(
This
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
if
(
SUCCEEDED
(
hres
))
{
VARIANT
var
;
IOleInPlaceFrame_SetStatusText
(
pIPFrame
,
NULL
);
V_VT
(
&
var
)
=
VT_I4
;
V_I4
(
&
var
)
=
0
;
IOleCommandTarget_Exec
(
cmdtrg
,
NULL
,
OLECMDID_SETPROGRESSMAX
,
0
,
&
var
,
NULL
);
IOleCommandTarget_Exec
(
cmdtrg
,
NULL
,
OLECMDID_SETPROGRESSPOS
,
0
,
&
var
,
NULL
);
IOleCommandTarget_Release
(
cmdtrg
);
}
if
(
This
->
frame
)
if
(
This
->
frame
)
IOleInPlaceFrame_Release
(
This
->
frame
);
IOleInPlaceFrame_Release
(
This
->
frame
);
This
->
frame
=
pIPFrame
;
This
->
frame
=
pIPFrame
;
...
...
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