diff options
author | Noel Power <noel.power@novell.com> | 2011-04-13 15:59:52 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-04-13 16:01:29 +0100 |
commit | cf07a26b571f3d3111577ad1fbdbfecf68029fc7 (patch) | |
tree | ec236f5d4dd6ad6dc29c393acc5ffe61c69f7ac8 | |
parent | 735437ebacbf55d16aac91da60424c824cf0d20c (diff) |
fix fdo#36209 ( various vba automation related regressions )
-rw-r--r-- | extensions/source/ole/oleobjw.cxx | 11 | ||||
-rw-r--r-- | extensions/source/ole/oleobjw.hxx | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index 3a6933ca9..6bdcf355e 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -160,9 +160,14 @@ Any IUnknownWrapper_Impl::queryInterface(const Type& t) return Any(); if ( ( t == getCppuType(static_cast<Reference<XInvocation>*>( 0)) || t == getCppuType(static_cast<Reference<XAutomationInvocation>*>( 0)) ) && !m_spDispatch) return Any(); - - return WeakImplHelper7<XInvocation, XBridgeSupplier2, - XInitialization, XAutomationObject, XDefaultProperty, XDefaultMethod, XDirectInvocation>::queryInterface(t); + // XDirectInvocation seems to be an oracle replacement for XAutomationInvocation, however it is flawed esecially wrt. assumptions about whether to invoke a + // Put or Get property, the implementation code has no business guessing that, it's up to the caller to decide that. Worse XDirectInvocation duplicates lots of code. + // XAutomationInvocation provides seperate calls for put& get + // properties. Note: Currently the basic runtime doesn't call put properties directly, it should... after all the basic runtime should know whether it is calling a put or get property. + // For the moment for ease of merging we will let the XDirectInvoke and XAuthomationInvocation interfaces stay side by side ( and for the momemnt at least I would prefer the basic + // runtime to call XAutomationInvocation instead of XDirectInvoke + return WeakImplHelper8<XInvocation, XBridgeSupplier2, + XInitialization, XAutomationObject, XDefaultProperty, XDefaultMethod, XDirectInvocation, XAutomationInvocation >::queryInterface(t); } Reference<XIntrospectionAccess> SAL_CALL IUnknownWrapper_Impl::getIntrospection(void) diff --git a/extensions/source/ole/oleobjw.hxx b/extensions/source/ole/oleobjw.hxx index 44bc67ddd..e83f4a339 100644 --- a/extensions/source/ole/oleobjw.hxx +++ b/extensions/source/ole/oleobjw.hxx @@ -51,7 +51,7 @@ #endif #include <cppuhelper/implbase3.hxx> #include <cppuhelper/implbase4.hxx> -#include <cppuhelper/implbase7.hxx> +#include <cppuhelper/implbase8.hxx> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp> @@ -84,7 +84,7 @@ typedef boost::unordered_multimap<OUString, unsigned int, hashOUString_Impl, equ // This class wraps an IDispatch and maps XInvocation calls to IDispatch calls on the wrapped object. // If m_TypeDescription is set then this class represents an UNO interface implemented in a COM component. // The interface is not a real interface in terms of an abstract class but is realized through IDispatch. -class IUnknownWrapper_Impl : public WeakImplHelper7< XInvocation, XBridgeSupplier2, XInitialization, XAutomationObject, XDefaultProperty, XDefaultMethod, XDirectInvocation >, +class IUnknownWrapper_Impl : public WeakImplHelper8< XInvocation, XBridgeSupplier2, XInitialization, XAutomationObject, XDefaultProperty, XDefaultMethod, XDirectInvocation, XAutomationInvocation >, public UnoConversionUtilities<IUnknownWrapper_Impl> |