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
37c3091f
Commit
37c3091f
authored
Dec 23, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: COM cleanup for the IOleDocumentView iface.
parent
041c6ec3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
33 deletions
+32
-33
htmldoc.c
dlls/mshtml/htmldoc.c
+2
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-3
oleobj.c
dlls/mshtml/oleobj.c
+7
-7
olewnd.c
dlls/mshtml/olewnd.c
+1
-1
view.c
dlls/mshtml/view.c
+21
-20
No files found.
dlls/mshtml/htmldoc.c
View file @
37c3091f
...
...
@@ -1749,7 +1749,7 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
*
ppv
=
&
This
->
IOleDocument_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IOleDocumentView
,
riid
))
{
TRACE
(
"(%p)->(IID_IOleDocumentView, %p)
\n
"
,
This
,
ppv
);
*
ppv
=
DOCVIEW
(
This
)
;
*
ppv
=
&
This
->
IOleDocumentView_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IOleInPlaceActiveObject
,
riid
))
{
TRACE
(
"(%p)->(IID_IOleInPlaceActiveObject, %p)
\n
"
,
This
,
ppv
);
*
ppv
=
ACTOBJ
(
This
);
...
...
@@ -2108,7 +2108,7 @@ static ULONG WINAPI CustomDoc_Release(ICustomDoc *iface)
if
(
This
->
in_place_active
)
IOleInPlaceObjectWindowless_InPlaceDeactivate
(
INPLACEWIN
(
&
This
->
basedoc
));
if
(
This
->
ipsite
)
IOleDocumentView_SetInPlaceSite
(
DOCVIEW
(
&
This
->
basedoc
)
,
NULL
);
IOleDocumentView_SetInPlaceSite
(
&
This
->
basedoc
.
IOleDocumentView_iface
,
NULL
);
if
(
This
->
undomgr
)
IOleUndoManager_Release
(
This
->
undomgr
);
if
(
This
->
tooltips_hwnd
)
...
...
dlls/mshtml/mshtml_private.h
View file @
37c3091f
...
...
@@ -353,7 +353,7 @@ struct HTMLDocument {
IMonikerProp
IMonikerProp_iface
;
IOleObject
IOleObject_iface
;
IOleDocument
IOleDocument_iface
;
const
IOleDocumentViewVtbl
*
lpOleDocumentViewVtbl
;
IOleDocumentView
IOleDocumentView_iface
;
const
IOleInPlaceActiveObjectVtbl
*
lpOleInPlaceActiveObjectVtbl
;
const
IViewObjectExVtbl
*
lpViewObjectExVtbl
;
const
IOleInPlaceObjectWindowlessVtbl
*
lpOleInPlaceObjectWindowlessVtbl
;
...
...
@@ -625,8 +625,6 @@ struct HTMLDocumentNode {
#define HTMLWINDOW2(x) ((IHTMLWindow2*) &(x)->lpHTMLWindow2Vtbl)
#define HTMLWINDOW3(x) ((IHTMLWindow3*) &(x)->lpHTMLWindow3Vtbl)
#define HTMLWINDOW4(x) ((IHTMLWindow4*) &(x)->lpHTMLWindow4Vtbl)
#define DOCVIEW(x) ((IOleDocumentView*) &(x)->lpOleDocumentViewVtbl)
#define OLEWIN(x) ((IOleWindow*) &(x)->lpOleInPlaceActiveObjectVtbl)
#define ACTOBJ(x) ((IOleInPlaceActiveObject*) &(x)->lpOleInPlaceActiveObjectVtbl)
#define VIEWOBJ(x) ((IViewObject*) &(x)->lpViewObjectExVtbl)
...
...
dlls/mshtml/oleobj.c
View file @
37c3091f
...
...
@@ -328,17 +328,17 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpms
HTMLDocument_LockContainer
(
This
->
doc_obj
,
TRUE
);
/* FIXME: Create new IOleDocumentView. See CreateView for more info. */
hres
=
IOleDocumentSite_ActivateMe
(
pDocSite
,
DOCVIEW
(
This
)
);
hres
=
IOleDocumentSite_ActivateMe
(
pDocSite
,
&
This
->
IOleDocumentView_iface
);
IOleDocumentSite_Release
(
pDocSite
);
}
else
{
hres
=
IOleDocumentView_UIActivate
(
DOCVIEW
(
This
)
,
TRUE
);
hres
=
IOleDocumentView_UIActivate
(
&
This
->
IOleDocumentView_iface
,
TRUE
);
if
(
SUCCEEDED
(
hres
))
{
if
(
lprcPosRect
)
{
RECT
rect
;
/* We need to pass rect as not const pointer */
rect
=
*
lprcPosRect
;
IOleDocumentView_SetRect
(
DOCVIEW
(
This
)
,
&
rect
);
IOleDocumentView_SetRect
(
&
This
->
IOleDocumentView_iface
,
&
rect
);
}
IOleDocumentView_Show
(
DOCVIEW
(
This
)
,
TRUE
);
IOleDocumentView_Show
(
&
This
->
IOleDocumentView_iface
,
TRUE
);
}
}
...
...
@@ -532,7 +532,7 @@ static HRESULT WINAPI OleDocument_CreateView(IOleDocument *iface, IOleInPlaceSit
*/
if
(
pIPSite
)
{
hres
=
IOleDocumentView_SetInPlaceSite
(
DOCVIEW
(
This
)
,
pIPSite
);
hres
=
IOleDocumentView_SetInPlaceSite
(
&
This
->
IOleDocumentView_iface
,
pIPSite
);
if
(
FAILED
(
hres
))
return
hres
;
}
...
...
@@ -540,8 +540,8 @@ static HRESULT WINAPI OleDocument_CreateView(IOleDocument *iface, IOleInPlaceSit
if
(
pstm
)
FIXME
(
"pstm is not supported
\n
"
);
IOleDocumentView_AddRef
(
DOCVIEW
(
This
)
);
*
ppView
=
DOCVIEW
(
This
)
;
IOleDocumentView_AddRef
(
&
This
->
IOleDocumentView_iface
);
*
ppView
=
&
This
->
IOleDocumentView_iface
;
return
S_OK
;
}
...
...
dlls/mshtml/olewnd.c
View file @
37c3091f
...
...
@@ -187,7 +187,7 @@ static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceOb
TRACE
(
"(%p)
\n
"
,
This
);
if
(
This
->
doc_obj
->
ui_active
)
IOleDocumentView_UIActivate
(
DOCVIEW
(
This
)
,
FALSE
);
IOleDocumentView_UIActivate
(
&
This
->
IOleDocumentView_iface
,
FALSE
);
This
->
doc_obj
->
window_active
=
FALSE
;
if
(
!
This
->
doc_obj
->
in_place_active
)
...
...
dlls/mshtml/view.c
View file @
37c3091f
...
...
@@ -445,29 +445,32 @@ HRESULT call_set_active_object(IOleInPlaceUIWindow *window, IOleInPlaceActiveObj
* IOleDocumentView implementation
*/
#define DOCVIEW_THIS(iface) DEFINE_THIS(HTMLDocument, OleDocumentView, iface)
static
inline
HTMLDocument
*
impl_from_IOleDocumentView
(
IOleDocumentView
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLDocument
,
IOleDocumentView_iface
);
}
static
HRESULT
WINAPI
OleDocumentView_QueryInterface
(
IOleDocumentView
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
return
htmldoc_query_interface
(
This
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
OleDocumentView_AddRef
(
IOleDocumentView
*
iface
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
return
htmldoc_addref
(
This
);
}
static
ULONG
WINAPI
OleDocumentView_Release
(
IOleDocumentView
*
iface
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
return
htmldoc_release
(
This
);
}
static
HRESULT
WINAPI
OleDocumentView_SetInPlaceSite
(
IOleDocumentView
*
iface
,
IOleInPlaceSite
*
pIPSite
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pIPSite
);
if
(
pIPSite
)
...
...
@@ -483,7 +486,7 @@ static HRESULT WINAPI OleDocumentView_SetInPlaceSite(IOleDocumentView *iface, IO
static
HRESULT
WINAPI
OleDocumentView_GetInPlaceSite
(
IOleDocumentView
*
iface
,
IOleInPlaceSite
**
ppIPSite
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppIPSite
);
if
(
!
ppIPSite
)
...
...
@@ -498,7 +501,7 @@ static HRESULT WINAPI OleDocumentView_GetInPlaceSite(IOleDocumentView *iface, IO
static
HRESULT
WINAPI
OleDocumentView_GetDocument
(
IOleDocumentView
*
iface
,
IUnknown
**
ppunk
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppunk
);
if
(
!
ppunk
)
...
...
@@ -511,7 +514,7 @@ static HRESULT WINAPI OleDocumentView_GetDocument(IOleDocumentView *iface, IUnkn
static
HRESULT
WINAPI
OleDocumentView_SetRect
(
IOleDocumentView
*
iface
,
LPRECT
prcView
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
RECT
rect
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
prcView
);
...
...
@@ -533,7 +536,7 @@ static HRESULT WINAPI OleDocumentView_SetRect(IOleDocumentView *iface, LPRECT pr
static
HRESULT
WINAPI
OleDocumentView_GetRect
(
IOleDocumentView
*
iface
,
LPRECT
prcView
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
prcView
);
...
...
@@ -547,14 +550,14 @@ static HRESULT WINAPI OleDocumentView_GetRect(IOleDocumentView *iface, LPRECT pr
static
HRESULT
WINAPI
OleDocumentView_SetRectComplex
(
IOleDocumentView
*
iface
,
LPRECT
prcView
,
LPRECT
prcHScroll
,
LPRECT
prcVScroll
,
LPRECT
prcSizeBox
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
FIXME
(
"(%p)->(%p %p %p %p)
\n
"
,
This
,
prcView
,
prcHScroll
,
prcVScroll
,
prcSizeBox
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
OleDocumentView_Show
(
IOleDocumentView
*
iface
,
BOOL
fShow
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
HRESULT
hres
;
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
fShow
);
...
...
@@ -584,7 +587,7 @@ static HRESULT WINAPI OleDocumentView_Show(IOleDocumentView *iface, BOOL fShow)
static
HRESULT
WINAPI
OleDocumentView_UIActivate
(
IOleDocumentView
*
iface
,
BOOL
fUIActivate
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
HRESULT
hres
;
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
fUIActivate
);
...
...
@@ -686,14 +689,14 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
static
HRESULT
WINAPI
OleDocumentView_Open
(
IOleDocumentView
*
iface
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
OleDocumentView_CloseView
(
IOleDocumentView
*
iface
,
DWORD
dwReserved
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
dwReserved
);
if
(
dwReserved
)
...
...
@@ -711,14 +714,14 @@ static HRESULT WINAPI OleDocumentView_CloseView(IOleDocumentView *iface, DWORD d
static
HRESULT
WINAPI
OleDocumentView_SaveViewState
(
IOleDocumentView
*
iface
,
LPSTREAM
pstm
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pstm
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
OleDocumentView_ApplyViewState
(
IOleDocumentView
*
iface
,
LPSTREAM
pstm
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pstm
);
return
E_NOTIMPL
;
}
...
...
@@ -726,13 +729,11 @@ static HRESULT WINAPI OleDocumentView_ApplyViewState(IOleDocumentView *iface, LP
static
HRESULT
WINAPI
OleDocumentView_Clone
(
IOleDocumentView
*
iface
,
IOleInPlaceSite
*
pIPSiteNew
,
IOleDocumentView
**
ppViewNew
)
{
HTMLDocument
*
This
=
DOCVIEW_THIS
(
iface
);
HTMLDocument
*
This
=
impl_from_IOleDocumentView
(
iface
);
FIXME
(
"(%p)->(%p %p)
\n
"
,
This
,
pIPSiteNew
,
ppViewNew
);
return
E_NOTIMPL
;
}
#undef DOCVIEW_THIS
static
const
IOleDocumentViewVtbl
OleDocumentViewVtbl
=
{
OleDocumentView_QueryInterface
,
OleDocumentView_AddRef
,
...
...
@@ -904,6 +905,6 @@ static const IViewObjectExVtbl ViewObjectVtbl = {
void
HTMLDocument_View_Init
(
HTMLDocument
*
This
)
{
This
->
lpOleDocumentView
Vtbl
=
&
OleDocumentViewVtbl
;
This
->
IOleDocumentView_iface
.
lp
Vtbl
=
&
OleDocumentViewVtbl
;
This
->
lpViewObjectExVtbl
=
&
ViewObjectVtbl
;
}
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