Kaydet (Commit) 1f5ae5e8 authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Miklos Vajna

test on the return of pOleObject->Close

Change-Id: Iee64f6f369e2312d479fa81e7a59fb962ed8d90e
Reviewed-on: https://gerrit.libreoffice.org/1567Reviewed-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
Tested-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
üst f8552dca
......@@ -771,6 +771,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetHostNames( LPCOLESTR szContainerApp, L
//-------------------------------------------------------------------------------
STDMETHODIMP InprocEmbedDocument_Impl::Close( DWORD dwSaveOption )
{
HRESULT ret = S_OK;
if ( m_pDefHandler && CheckDefHandler() )
{
// no need to close if there is no default handler.
......@@ -781,14 +782,18 @@ STDMETHODIMP InprocEmbedDocument_Impl::Close( DWORD dwSaveOption )
if ( SUCCEEDED( hr ) && pOleObject )
{
hr = pOleObject->Close( dwSaveOption );
if (!SUCCEEDED(hr))
ret = hr;
hr = CoDisconnectObject( (IUnknown*)(IPersistStorage*)this, 0 );
if (!(SUCCEEDED(hr) && SUCCEEDED(ret)))
ret = hr;
}
}
// if the object is closed from outside that means that it should go to uninitialized state
Clean();
return S_OK;
return ret;
}
//-------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment