summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-02-23 15:16:23 +0000
committerNoel Power <noel.power@novell.com>2012-02-23 15:49:52 +0000
commitdcbc2f5417a96b34d2dab7a6ea1e30ce4fb6a8d2 (patch)
tree228dbe2698e1a960b92bbb7dee9b62842b339c1a
parent3c70c38272e6a5d042f558b69044d21adc9fe7d0 (diff)
Revert "fix handling of SAFEARRAY(s) returned as variant in olebridge (fdo#38441)"
This reverts commit ab802aee181ca6df397ca53e461d5f53808cef9d. Signed-off-by: Michael Meeks<michael.meeks@suse.com>
-rw-r--r--extensions/source/ole/unoconversionutilities.hxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx
index 99f49c9ed..328fec41e 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<T>::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<T>::getElementCountAndTypeOfSequence( const Any& rS
template<class T>
-VARTYPE UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq, SAFEARRAY*& pArray)
+SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq)
{
+ SAFEARRAY* pArray = NULL;
sal_uInt32 n = 0;
if( rSeq.getValueTypeClass() != TypeClass_SEQUENCE )
@@ -1361,7 +1361,7 @@ VARTYPE UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq, SA
TYPELIB_DANGER_RELEASE( pSeqElementDesc);
- return eTargetElementType;
+ return pArray;
}
/* The argument rObj can contain