Kaydet (Commit) ccf477c6 authored tarafından Rüdiger Timm's avatar Rüdiger Timm

INTEGRATION: CWS npower5 (1.45.14); FILE MERGED

2007/01/10 15:48:39 npower 1.45.14.1: #i72062# allow error handlers propagate errors backwards to parent handlers
üst 3c0abdd8
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: sbunoobj.cxx,v $ * $RCSfile: sbunoobj.cxx,v $
* *
* $Revision: 1.45 $ * $Revision: 1.46 $
* *
* last change: $Author: vg $ $Date: 2006-11-21 17:30:52 $ * last change: $Author: rt $ $Date: 2007-01-29 15:05:07 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -504,7 +504,7 @@ SbxDataType unoToSbxType( const Reference< XIdlClass >& xIdlClass ) ...@@ -504,7 +504,7 @@ SbxDataType unoToSbxType( const Reference< XIdlClass >& xIdlClass )
return eRetType; return eRetType;
} }
void unoToSbxValue( SbxVariable* pVar, const Any& aValue ); void unoToSbxValue( SbxVariable* pVar, const Any& aValue );
static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int32 >& indices, Sequence< sal_Int32 >& sizes, const Any& aValue, sal_Int32& dimension, sal_Bool bIsZeroIndex ) static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int32 >& indices, Sequence< sal_Int32 >& sizes, const Any& aValue, sal_Int32& dimension, sal_Bool bIsZeroIndex, Type* pType = NULL )
{ {
Type aType = aValue.getValueType(); Type aType = aValue.getValueType();
TypeClass eTypeClass = aType.getTypeClass(); TypeClass eTypeClass = aType.getTypeClass();
...@@ -516,6 +516,11 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int ...@@ -516,6 +516,11 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int
{ {
Reference< XIdlClass > xIdlTargetClass = TypeToIdlClass( aType ); Reference< XIdlClass > xIdlTargetClass = TypeToIdlClass( aType );
Reference< XIdlArray > xIdlArray = xIdlTargetClass->getArray(); Reference< XIdlArray > xIdlArray = xIdlTargetClass->getArray();
typelib_TypeDescription * pTD = 0;
aType.getDescription( &pTD );
Type aElementType( ((typelib_IndirectTypeDescription *)pTD)->pType );
::typelib_typedescription_release( pTD );
sal_Int32 nLen = xIdlArray->getLen( aValue ); sal_Int32 nLen = xIdlArray->getLen( aValue );
for ( sal_Int32 index = 0; index < nLen; ++index ) for ( sal_Int32 index = 0; index < nLen; ++index )
{ {
...@@ -538,7 +543,7 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int ...@@ -538,7 +543,7 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int
else else
indices[ dimCopy - 1] = index + 1; indices[ dimCopy - 1] = index + 1;
implSequenceToMultiDimArray( pArray, indices, sizes, aElementAny, dimCopy, bIsZeroIndex ); implSequenceToMultiDimArray( pArray, indices, sizes, aElementAny, dimCopy, bIsZeroIndex, &aElementType );
} }
} }
...@@ -554,9 +559,9 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int ...@@ -554,9 +559,9 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int
return; return;
} }
SbxDataType eSbxElementType = unoToSbxType( pType ? pType->getTypeClass() : aValue.getValueTypeClass() );
if ( !pArray ) if ( !pArray )
{ {
SbxDataType eSbxElementType = unoToSbxType( aValue.getValueTypeClass() );
pArray = new SbxDimArray( eSbxElementType ); pArray = new SbxDimArray( eSbxElementType );
sal_Int32 nIndexLen = indices.getLength(); sal_Int32 nIndexLen = indices.getLength();
...@@ -573,7 +578,6 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int ...@@ -573,7 +578,6 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int
if ( pArray ) if ( pArray )
{ {
SbxDataType eSbxElementType = unoToSbxType( aValue.getValueTypeClass() );
SbxVariableRef xVar = new SbxVariable( eSbxElementType ); SbxVariableRef xVar = new SbxVariable( eSbxElementType );
unoToSbxValue( (SbxVariable*)xVar, aValue ); unoToSbxValue( (SbxVariable*)xVar, aValue );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment