diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-02-08 21:57:22 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2018-02-21 14:00:43 +0100 |
commit | 3cd3d1044d03fdb733922bad74254f3ad65d898e (patch) | |
tree | 06b75494c27ed0f208dfea402bee0c4d4448e2fe /extensions | |
parent | 16a3d8f4f010ad9b9413ac4d40ef8fe0f7d633e7 (diff) |
Pass missing (hopefully optional) parameters as Any()
Change-Id: I93e69e589cd81fbc9606b1b08233da7fb8f5d043
Reviewed-on: https://gerrit.libreoffice.org/50089
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/ole/unoobjw.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index ba2b2fd0ceea..a9d2a4a4cd06 100644 --- a/extensions/source/ole/unoobjw.cxx +++ b/extensions/source/ole/unoobjw.cxx @@ -813,6 +813,17 @@ STDMETHODIMP InterfaceOleWrapper_Impl::Invoke(DISPID dispidMember, convertDispparamsArgs(dispidMember, wFlags, pdispparams , params ); + // Pass missing (hopefully optional) parameters as Any(). + InvocationInfo aInvocationInfo; + getInvocationInfoForCall(dispidMember, aInvocationInfo); + if (pdispparams->cArgs < (UINT)aInvocationInfo.aParamTypes.getLength()) + { + params.realloc(aInvocationInfo.aParamTypes.getLength()); + Any* pParams = params.getArray(); + for (int i = pdispparams->cArgs; i < aInvocationInfo.aParamTypes.getLength(); ++i) + pParams[i] = Any(); + } + ret= doInvoke(pdispparams, pvarResult, pexcepinfo, puArgErr, d.name, params); } |