summaryrefslogtreecommitdiff
path: root/embedserv
diff options
context:
space:
mode:
authorMikhail Voitenko <mav@openoffice.org>2003-03-11 12:02:14 +0000
committerMikhail Voitenko <mav@openoffice.org>2003-03-11 12:02:14 +0000
commit21efcfe2798d499e082be07cec57239cccd11c72 (patch)
tree9439443672c0e458adf531c56a0ead0409919803 /embedserv
parent8e4706812d1f46cedd1b21c476b2a69debfda527 (diff)
#i2822# notification on close
Diffstat (limited to 'embedserv')
-rwxr-xr-xembedserv/source/embed/ed_ioleobject.cxx25
1 files changed, 21 insertions, 4 deletions
diff --git a/embedserv/source/embed/ed_ioleobject.cxx b/embedserv/source/embed/ed_ioleobject.cxx
index 239f336d82ce..eb811339082d 100755
--- a/embedserv/source/embed/ed_ioleobject.cxx
+++ b/embedserv/source/embed/ed_ioleobject.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ed_ioleobject.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mav $ $Date: 2003-03-10 16:10:22 $
+ * last change: $Author: mav $ $Date: 2003-03-11 13:02:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,9 +78,26 @@ STDMETHODIMP EmbedDocument_Impl::SetHostNames( LPCOLESTR szContainerApp, LPCOLES
return S_OK;
}
-STDMETHODIMP EmbedDocument_Impl::Close( DWORD dwSaveOption)
+STDMETHODIMP EmbedDocument_Impl::Close( DWORD dwSaveOption )
{
- return S_OK;
+ HRESULT hr = S_OK;
+
+ if ( dwSaveOption && m_pClientSite )
+ hr = m_pClientSite->SaveObject();
+
+ if ( m_pDAdviseHolder )
+ m_pDAdviseHolder->SendOnDataChange( (IDataObject*)this, 0, ADVF_DATAONSTOP );
+
+ if ( m_pClientSite )
+ m_pClientSite->OnShowWindow( FALSE );
+
+ for ( AdviseSinkHashMapIterator iAdvise = m_aAdviseHashMap.begin(); iAdvise != m_aAdviseHashMap.end(); iAdvise++ )
+ {
+ if ( iAdvise->second )
+ iAdvise->second->OnClose();
+ }
+
+ return hr;
}
STDMETHODIMP EmbedDocument_Impl::SetMoniker( DWORD dwWhichMoniker, IMoniker *pmk )