[Libreoffice-commits] core.git: extensions/source

Tor Lillqvist tml at collabora.com
Thu May 31 05:25:15 UTC 2018


 extensions/source/ole/unoobjw.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 98630a6edf91183dbd8f1bdb02616889251927de
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Mar 22 20:01:41 2018 +0200

    Remove leftover hardcoded check for SwVbaApplication
    
    Instead, be generic, check whether the objects implements
    ooo::vba::XConnectable. That's what we do in the
    IID_IConnectionPointContainer case, too.
    
    Change-Id: Ib499aa011775f79a2accaef64e19738bdb7ed143
    Reviewed-on: https://gerrit.libreoffice.org/55109
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index b7aa0fa48cd3..4acd25081315 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -207,9 +207,11 @@ STDMETHODIMP InterfaceOleWrapper::QueryInterface(REFIID riid, LPVOID FAR * ppv)
         *ppv = static_cast<IDispatch*>(this);
         SAL_INFO("extensions.olebridge", "  " << *ppv);
     }
-    else if (IsEqualIID(riid, IID_IProvideClassInfo) &&
-             m_sImplementationName == "SwVbaApplication")
+    else if (IsEqualIID(riid, IID_IProvideClassInfo))
     {
+        Reference<ooo::vba::XConnectable> xConnectable(m_xOrigin, UNO_QUERY);
+        if (!xConnectable.is())
+            return E_NOINTERFACE;
         AddRef();
         *ppv = static_cast<IProvideClassInfo*>(this);
         SAL_INFO("extensions.olebridge", "  " << *ppv);


More information about the Libreoffice-commits mailing list