[Libreoffice-commits] .: embedserv/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Jan 8 01:40:53 PST 2013
embedserv/source/inprocserv/inprocembobj.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 1f5ae5e8c18138d8537e5b080d87d0b61f451449
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Mon Jan 7 22:16:37 2013 +0100
test on the return of pOleObject->Close
Change-Id: Iee64f6f369e2312d479fa81e7a59fb962ed8d90e
Reviewed-on: https://gerrit.libreoffice.org/1567
Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
Tested-by: Miklos Vajna <vmiklos at suse.cz>
diff --git a/embedserv/source/inprocserv/inprocembobj.cxx b/embedserv/source/inprocserv/inprocembobj.cxx
index c6bad46..27c28ad 100644
--- a/embedserv/source/inprocserv/inprocembobj.cxx
+++ b/embedserv/source/inprocserv/inprocembobj.cxx
@@ -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;
}
//-------------------------------------------------------------------------------
More information about the Libreoffice-commits
mailing list