From 466cb51bc3a27c0ec19d0c841d7376ab2eae3f9a Mon Sep 17 00:00:00 2001 From: Noel Power Date: Thu, 23 Feb 2012 12:36:05 +0000 Subject: Revert "fix handling of SAFEARRAY(s) returned as variant in olebridge (fdo#38441)" This reverts commit 3fcb94311fd7dd40c05ca132e3a30a888316cbbe. Signed-off-by: Noel Power --- extensions/source/ole/unoconversionutilities.hxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx index 359009e4d485..b6ac7f1caff0 100644 --- a/extensions/source/ole/unoconversionutilities.hxx +++ b/extensions/source/ole/unoconversionutilities.hxx @@ -134,7 +134,7 @@ public: /** @exception com.sun.star.lang.IllegalArgumentException If rSeq does not contain a sequence then the exception is thrown. */ - VARTYPE createUnoSequenceWrapper(const Any& rSeq, SAFEARRAY*& pOutArray ); + SAFEARRAY* createUnoSequenceWrapper(const Any& rSeq); /** @exception com.sun.star.lang.IllegalArgumentException If rSeq does not contain a sequence or elemtype has no proper value then the exception is thrown. @@ -779,12 +779,11 @@ void UnoConversionUtilities::anyToVariant(VARIANT* pVariant, const Any& rAny) } case TypeClass_SEQUENCE: // sequence ??? SafeArray descriptor { - SAFEARRAY* pOutArray = NULL; - VARTYPE eArrayType = createUnoSequenceWrapper(rAny, pOutArray ); - if (pOutArray) + SAFEARRAY* pArray = createUnoSequenceWrapper(rAny); + if (pArray) { - V_VT(pVariant) = VT_ARRAY | eArrayType; - V_ARRAY(pVariant) = pOutArray; + V_VT(pVariant) = VT_ARRAY | VT_VARIANT; + V_ARRAY(pVariant) = pArray; } else { @@ -1296,8 +1295,9 @@ void UnoConversionUtilities::getElementCountAndTypeOfSequence( const Any& rS template -VARTYPE UnoConversionUtilities::createUnoSequenceWrapper(const Any& rSeq, SAFEARRAY*& pArray) +SAFEARRAY* UnoConversionUtilities::createUnoSequenceWrapper(const Any& rSeq) { + SAFEARRAY* pArray = NULL; sal_uInt32 n = 0; if( rSeq.getValueTypeClass() != TypeClass_SEQUENCE ) @@ -1361,7 +1361,7 @@ VARTYPE UnoConversionUtilities::createUnoSequenceWrapper(const Any& rSeq, SA TYPELIB_DANGER_RELEASE( pSeqElementDesc); - return eTargetElementType; + return pArray; } /* The argument rObj can contain -- cgit