Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1567

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/67/1567/1

test on the return of pOleObject->Close

Change-Id: Iee64f6f369e2312d479fa81e7a59fb962ed8d90e
---
M embedserv/source/inprocserv/inprocembobj.cxx
1 file changed, 6 insertions(+), 1 deletion(-)



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::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 @@
         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;
 }
 
 //-------------------------------------------------------------------------------

-- 
To view, visit https://gerrit.libreoffice.org/1567
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee64f6f369e2312d479fa81e7a59fb962ed8d90e
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Julien Nabet <serval2412@yahoo.fr>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.