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
24601ed1
Commit
24601ed1
authored
Dec 07, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added Advise handling to OleObject_Close.
parent
91dd9bbb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
oleobj.c
dlls/mshtml/oleobj.c
+3
-0
htmldoc.c
dlls/mshtml/tests/htmldoc.c
+20
-1
No files found.
dlls/mshtml/oleobj.c
View file @
24601ed1
...
...
@@ -250,6 +250,9 @@ static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
IOleInPlaceObjectWindowless_InPlaceDeactivate
(
INPLACEWIN
(
This
));
HTMLDocument_LockContainer
(
This
->
doc_obj
,
FALSE
);
if
(
This
->
advise_holder
)
IOleAdviseHolder_SendOnClose
(
This
->
advise_holder
);
return
S_OK
;
}
...
...
dlls/mshtml/tests/htmldoc.c
View file @
24601ed1
...
...
@@ -150,6 +150,7 @@ DEFINE_EXPECT(Frame_EnableModeless_TRUE);
DEFINE_EXPECT
(
Frame_EnableModeless_FALSE
);
DEFINE_EXPECT
(
Frame_GetWindow
);
DEFINE_EXPECT
(
TranslateUrl
);
DEFINE_EXPECT
(
Advise_Close
);
static
IUnknown
*
doc_unk
;
static
IMoniker
*
doc_mon
;
...
...
@@ -2589,7 +2590,7 @@ static void WINAPI AdviseSink_OnSave(IAdviseSink *iface)
static
void
WINAPI
AdviseSink_OnClose
(
IAdviseSink
*
iface
)
{
ok
(
0
,
"unexpected call
\n
"
);
CHECK_EXPECT
(
Advise_Close
);
}
static
const
IAdviseSinkVtbl
AdviseSinkVtbl
=
{
...
...
@@ -4395,6 +4396,7 @@ static void test_HTMLDocument_StreamLoad(void)
{
IOleObject
*
oleobj
;
IUnknown
*
unk
;
DWORD
conn
;
HRESULT
hres
;
ULONG
ref
;
...
...
@@ -4411,6 +4413,9 @@ static void test_HTMLDocument_StreamLoad(void)
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IOleObject
,
(
void
**
)
&
oleobj
);
ok
(
hres
==
S_OK
,
"Could not get IOleObject: %08x
\n
"
,
hres
);
hres
=
IOleObject_Advise
(
oleobj
,
&
AdviseSink
,
&
conn
);
ok
(
hres
==
S_OK
,
"Advise failed: %08x
\n
"
,
hres
);
test_readyState
(
unk
);
test_IsDirty
(
unk
,
S_FALSE
);
test_ConnectionPointContainer
(
unk
);
...
...
@@ -4427,7 +4432,9 @@ static void test_HTMLDocument_StreamLoad(void)
test_UIDeactivate
();
test_InPlaceDeactivate
(
unk
,
TRUE
);
SET_EXPECT
(
Advise_Close
);
test_Close
(
unk
,
FALSE
);
CHECK_CALLED
(
Advise_Close
);
test_IsDirty
(
unk
,
S_FALSE
);
if
(
view
)
{
...
...
@@ -4444,6 +4451,7 @@ static void test_HTMLDocument_StreamInitNew(void)
{
IOleObject
*
oleobj
;
IUnknown
*
unk
;
DWORD
conn
;
HRESULT
hres
;
ULONG
ref
;
...
...
@@ -4460,6 +4468,9 @@ static void test_HTMLDocument_StreamInitNew(void)
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IOleObject
,
(
void
**
)
&
oleobj
);
ok
(
hres
==
S_OK
,
"Could not get IOleObject: %08x
\n
"
,
hres
);
hres
=
IOleObject_Advise
(
oleobj
,
&
AdviseSink
,
&
conn
);
ok
(
hres
==
S_OK
,
"Advise failed: %08x
\n
"
,
hres
);
test_readyState
(
unk
);
test_IsDirty
(
unk
,
S_FALSE
);
test_ConnectionPointContainer
(
unk
);
...
...
@@ -4476,7 +4487,9 @@ static void test_HTMLDocument_StreamInitNew(void)
test_UIDeactivate
();
test_InPlaceDeactivate
(
unk
,
TRUE
);
SET_EXPECT
(
Advise_Close
);
test_Close
(
unk
,
FALSE
);
CHECK_CALLED
(
Advise_Close
);
test_IsDirty
(
unk
,
S_FALSE
);
if
(
view
)
{
...
...
@@ -4520,6 +4533,7 @@ static void test_editing_mode(BOOL do_load)
{
IUnknown
*
unk
;
IOleObject
*
oleobj
;
DWORD
conn
;
HRESULT
hres
;
ULONG
ref
;
...
...
@@ -4536,6 +4550,9 @@ static void test_editing_mode(BOOL do_load)
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IOleObject
,
(
void
**
)
&
oleobj
);
ok
(
hres
==
S_OK
,
"Could not get IOleObject: %08x
\n
"
,
hres
);
hres
=
IOleObject_Advise
(
oleobj
,
&
AdviseSink
,
&
conn
);
ok
(
hres
==
S_OK
,
"Advise failed: %08x
\n
"
,
hres
);
test_readyState
(
unk
);
test_ConnectionPointContainer
(
unk
);
test_ClientSite
(
oleobj
,
CLIENTSITE_EXPECTPATH
);
...
...
@@ -4586,7 +4603,9 @@ static void test_editing_mode(BOOL do_load)
test_UIDeactivate
();
test_InPlaceDeactivate
(
unk
,
TRUE
);
SET_EXPECT
(
Advise_Close
);
test_Close
(
unk
,
FALSE
);
CHECK_CALLED
(
Advise_Close
);
if
(
view
)
{
IOleDocumentView_Release
(
view
);
...
...
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