Implement OLE object notifications, making sure to cope with the case

of the advise holder not being created because no notifications are
needed.
This commit is contained in:
Robert Shearman 2005-11-03 19:32:49 +00:00 committed by Alexandre Julliard
parent 40ffc286f5
commit fe4015201b
1 changed files with 14 additions and 3 deletions

View File

@ -1339,13 +1339,23 @@ static void WINAPI DefaultHandler_IAdviseSink_OnRename(
IAdviseSink *iface,
IMoniker *pmk)
{
FIXME(": stub\n");
DefaultHandler *This = impl_from_IAdviseSink(iface);
TRACE("(%p)\n", pmk);
if (This->oleAdviseHolder)
IOleAdviseHolder_SendOnRename(This->oleAdviseHolder, pmk);
}
static void WINAPI DefaultHandler_IAdviseSink_OnSave(
IAdviseSink *iface)
{
FIXME(": stub\n");
DefaultHandler *This = impl_from_IAdviseSink(iface);
TRACE("()\n");
if (This->oleAdviseHolder)
IOleAdviseHolder_SendOnSave(This->oleAdviseHolder);
}
static void WINAPI DefaultHandler_IAdviseSink_OnClose(
@ -1355,7 +1365,8 @@ static void WINAPI DefaultHandler_IAdviseSink_OnClose(
TRACE("()\n");
IOleAdviseHolder_SendOnClose(This->oleAdviseHolder);
if (This->oleAdviseHolder)
IOleAdviseHolder_SendOnClose(This->oleAdviseHolder);
DefaultHandler_Stop(This);
}