[Libreoffice-commits] .: Branch 'libreoffice-3-4' - extensions/source

Noel Power noelp at kemper.freedesktop.org
Wed Apr 13 08:01:38 PDT 2011


 extensions/source/ole/oleobjw.cxx |   11 ++++++++---
 extensions/source/ole/oleobjw.hxx |    4 ++--
 2 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit cf07a26b571f3d3111577ad1fbdbfecf68029fc7
Author: Noel Power <noel.power at novell.com>
Date:   Wed Apr 13 15:59:52 2011 +0100

    fix fdo#36209 ( various vba automation related regressions )

diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index 3a6933c..6bdcf35 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 44bc67d..e83f4a3 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>
 


More information about the Libreoffice-commits mailing list