diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-03-22 20:01:41 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2018-05-31 21:42:05 +0300 |
commit | 05aa70c121a322c3933f898d9db8841fdffda2bf (patch) | |
tree | 6e1deab33ed67bef309426766f62f0bf4ba143ae | |
parent | d87afec9cfad8f7157eabac6b2ac6bd714a25c12 (diff) |
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@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 98630a6edf91183dbd8f1bdb02616889251927de)
-rw-r--r-- | extensions/source/ole/unoobjw.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index 62583719d20f..c60a1d905859 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); |