summaryrefslogtreecommitdiff
path: root/cppu/source/uno
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-31 10:18:17 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-31 10:18:17 +0100
commita2c464868aca4bb38aa8afff635da56942b597ac (patch)
treef6eba943ea933e250d98b37986e0d86773bead09 /cppu/source/uno
parent9e77c2fb7cadfd477fb1b971b011d43f30781660 (diff)
[API CHANGE] Remove UNOIDL "array" and "union" vaporware remnants from cppu
This leaves only aborting stubs (for SONAME stability) for typelib_static_array_type_init typelib_typedescription_newArray typelib_typedescription_newUnion and completely removes corresponding typelib_ArrayTypeDescription typelib_UnionTypeDescription structs and C++ inline getCppuArrayType* functions. None of this should ever have been called by client code anyway, so while technically an API change it should not matter for practical purposes. Change-Id: I23769d104d545533bf578762b79994e269d78c22
Diffstat (limited to 'cppu/source/uno')
-rw-r--r--cppu/source/uno/assign.hxx163
-rw-r--r--cppu/source/uno/constr.hxx116
-rw-r--r--cppu/source/uno/copy.hxx207
-rw-r--r--cppu/source/uno/destr.hxx85
-rw-r--r--cppu/source/uno/eq.hxx60
-rw-r--r--cppu/source/uno/prim.hxx26
-rw-r--r--cppu/source/uno/sequence.cxx95
7 files changed, 0 insertions, 752 deletions
diff --git a/cppu/source/uno/assign.hxx b/cppu/source/uno/assign.hxx
index 66b065cb834b..655fe4c6d2e4 100644
--- a/cppu/source/uno/assign.hxx
+++ b/cppu/source/uno/assign.hxx
@@ -101,128 +101,6 @@ inline sal_Bool _assignStruct(
return sal_True;
}
//--------------------------------------------------------------------------------------------------
-inline sal_Bool _assignArray(
- void * pDest, void * pSource,
- typelib_ArrayTypeDescription * pTypeDescr,
- uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
-{
- typelib_TypeDescriptionReference * pElementTypeRef =
- ((typelib_IndirectTypeDescription *)pTypeDescr)->pType;
- typelib_TypeDescription * pElementTypeDescr = NULL;
- TYPELIB_DANGER_GET( &pElementTypeDescr, pElementTypeRef );
- sal_Int32 nTotalElements = pTypeDescr->nTotalElements;
- sal_Int32 nElementSize = pElementTypeDescr->nSize;
- sal_Int32 i;
- sal_Bool bRet = sal_False;
-
- switch ( pElementTypeRef->eTypeClass )
- {
- case typelib_TypeClass_CHAR:
- case typelib_TypeClass_BOOLEAN:
- case typelib_TypeClass_BYTE:
- case typelib_TypeClass_SHORT:
- case typelib_TypeClass_UNSIGNED_SHORT:
- case typelib_TypeClass_LONG:
- case typelib_TypeClass_UNSIGNED_LONG:
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- case typelib_TypeClass_FLOAT:
- case typelib_TypeClass_DOUBLE:
- for (i=0; i < nTotalElements; i++)
- {
- memcpy((sal_Char *)pDest + i * nElementSize,
- (sal_Char *)pSource + i * nElementSize,
- nElementSize);
- }
- bRet = sal_True;
- break;
- case typelib_TypeClass_STRING:
- for (i=0; i < nTotalElements; i++)
- {
- ::rtl_uString_assign( (rtl_uString **)pDest + i,
- ((rtl_uString **)pSource)[i] );
- }
- bRet = sal_True;
- break;
- case typelib_TypeClass_TYPE:
- for (i=0; i < nTotalElements; i++)
- {
- typelib_TypeDescriptionReference ** pp = (typelib_TypeDescriptionReference **)pDest + i;
- ::typelib_typedescriptionreference_release( *pp );
- *pp = *((typelib_TypeDescriptionReference **)pSource + i);
- TYPE_ACQUIRE( *pp );
- }
- bRet = sal_True;
- break;
- case typelib_TypeClass_ANY:
- for (i=0; i < nTotalElements; i++)
- {
- _destructAny( (uno_Any *)pDest + i, release );
- _copyConstructAny( (uno_Any *)pDest + i, (uno_Any *)pSource + i,
- pElementTypeRef, pElementTypeDescr, acquire, 0 );
- }
- bRet = sal_True;
- break;
- case typelib_TypeClass_ENUM:
- for (i=0; i < nTotalElements; i++)
- {
- *((sal_Int32 *)pDest + i) = *((sal_Int32 *)pSource + i);
- }
- bRet = sal_True;
- break;
- case typelib_TypeClass_STRUCT:
- case typelib_TypeClass_EXCEPTION:
- for (i=0; i < nTotalElements; i++)
- {
- bRet = _assignStruct( (sal_Char *)pDest + i * nElementSize,
- (sal_Char *)pSource + i * nElementSize,
- (typelib_CompoundTypeDescription *)pElementTypeDescr,
- queryInterface, acquire, release );
- if (! bRet)
- break;
- }
- bRet = sal_True;
- break;
- case typelib_TypeClass_UNION:
- for (i=0; i < nTotalElements; i++)
- {
- _destructUnion( (sal_Char*)pDest + i * nElementSize, pElementTypeDescr, release );
- _copyConstructUnion( (sal_Char*)pDest + i * nElementSize,
- (sal_Char*)pSource + i * nElementSize,
- pElementTypeDescr, acquire, 0 );
- }
- bRet = sal_True;
- break;
- case typelib_TypeClass_SEQUENCE:
- for (i=0; i < nTotalElements; i++)
- {
- osl_atomic_increment( &(*((uno_Sequence **)pSource + i))->nRefCount );
- idestructSequence(
- *((uno_Sequence **)pDest + i),
- pElementTypeRef, pElementTypeDescr, release );
- *((uno_Sequence **)pDest + i) = *((uno_Sequence **)pSource + i);
- }
- bRet = sal_True;
- break;
- case typelib_TypeClass_INTERFACE:
- for (i=0; i < nTotalElements; i++)
- {
- _assignInterface(
- (void **)((sal_Char*)pDest + i * nElementSize),
- *(void **)((sal_Char*)pSource + i * nElementSize),
- acquire, release );
- }
- bRet = sal_True;
- break;
- default:
- OSL_ASSERT(false);
- break;
- }
-
- TYPELIB_DANGER_RELEASE( pElementTypeDescr );
- return bRet;
-}
-//--------------------------------------------------------------------------------------------------
inline sal_Bool _assignData(
void * pDest,
typelib_TypeDescriptionReference * pDestType, typelib_TypeDescription * pDestTypeDescr,
@@ -516,47 +394,6 @@ inline sal_Bool _assignData(
return bRet;
}
return sal_False;
- case typelib_TypeClass_ARRAY:
- {
- sal_Bool bRet = sal_False;
- if (pSourceTypeDescr)
- {
- typelib_ArrayTypeDescription * pTypeDescr =
- (typelib_ArrayTypeDescription *)pSourceTypeDescr;
- bRet = _assignArray( pDest, pSource, pTypeDescr, queryInterface, acquire, release );
- }
- else
- {
- TYPELIB_DANGER_GET( &pSourceTypeDescr, pSourceType );
- typelib_ArrayTypeDescription * pTypeDescr =
- (typelib_ArrayTypeDescription *)pSourceTypeDescr;
- if ( pTypeDescr )
- {
- bRet = _assignArray(
- pDest, pSource, pTypeDescr, queryInterface, acquire, release );
- }
- TYPELIB_DANGER_RELEASE( pSourceTypeDescr );
- }
- return bRet;
- }
- case typelib_TypeClass_UNION:
- if (_type_equals( pDestType, pSourceType ))
- {
- if (pDestTypeDescr)
- {
- _destructUnion( pDest, pDestTypeDescr, release );
- _copyConstructUnion( pDest, pSource, pDestTypeDescr, acquire, 0 );
- }
- else
- {
- TYPELIB_DANGER_GET( &pDestTypeDescr, pDestType );
- _destructUnion( pDest, pDestTypeDescr, release );
- _copyConstructUnion( pDest, pSource, pDestTypeDescr, acquire, 0 );
- TYPELIB_DANGER_RELEASE( pDestTypeDescr );
- }
- return sal_True;
- }
- return sal_False;
case typelib_TypeClass_SEQUENCE:
if (typelib_TypeClass_SEQUENCE != pSourceType->eTypeClass)
return sal_False;
diff --git a/cppu/source/uno/constr.hxx b/cppu/source/uno/constr.hxx
index dd0343a5247f..186520749d11 100644
--- a/cppu/source/uno/constr.hxx
+++ b/cppu/source/uno/constr.hxx
@@ -29,17 +29,6 @@ namespace cppu
//#### construction ################################################################################
//##################################################################################################
-//--------------------------------------------------------------------------------------------------
-inline void _defaultConstructUnion(
- void * pMem,
- typelib_TypeDescription * pTypeDescr )
- SAL_THROW(())
-{
- ::uno_type_constructData(
- (char *)pMem + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset,
- ((typelib_UnionTypeDescription *)pTypeDescr)->pDefaultTypeRef );
- *(sal_Int64 *)pMem = ((typelib_UnionTypeDescription *)pTypeDescr)->nDefaultDiscriminant;
-}
//==================================================================================================
void defaultConstructStruct(
void * pMem,
@@ -67,87 +56,6 @@ inline void _defaultConstructStruct(
}
//--------------------------------------------------------------------------------------------------
-inline void _defaultConstructArray(
- void * pMem,
- typelib_ArrayTypeDescription * pTypeDescr )
-{
- typelib_TypeDescription * pElementType = NULL;
- TYPELIB_DANGER_GET( &pElementType, ((typelib_IndirectTypeDescription *)pTypeDescr)->pType );
- sal_Int32 nTotalElements = pTypeDescr->nTotalElements;
- sal_Int32 nElementSize = pElementType->nSize;
- sal_Int32 i;
- switch ( pElementType->eTypeClass )
- {
- case typelib_TypeClass_CHAR:
- case typelib_TypeClass_BOOLEAN:
- case typelib_TypeClass_BYTE:
- case typelib_TypeClass_SHORT:
- case typelib_TypeClass_UNSIGNED_SHORT:
- case typelib_TypeClass_LONG:
- case typelib_TypeClass_UNSIGNED_LONG:
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- case typelib_TypeClass_FLOAT:
- case typelib_TypeClass_DOUBLE:
- case typelib_TypeClass_INTERFACE:
- memset(pMem, 0, nElementSize * nTotalElements);
- break;
-
- case typelib_TypeClass_STRING:
- for (i=0; i < nTotalElements; i++)
- {
- rtl_uString** ppElement = (rtl_uString **)pMem + i;
- *ppElement = 0;
- rtl_uString_new( ppElement);
- }
- break;
- case typelib_TypeClass_TYPE:
- for (i=0; i < nTotalElements; i++)
- {
- typelib_TypeDescriptionReference** ppElement = (typelib_TypeDescriptionReference **)pMem + i;
- *ppElement = _getVoidType();
- }
- break;
- case typelib_TypeClass_ANY:
- for (i=0; i < nTotalElements; i++)
- {
- CONSTRUCT_EMPTY_ANY( (uno_Any *)pMem + i );
- }
- break;
- case typelib_TypeClass_ENUM:
- for (i=0; i < nTotalElements; i++)
- {
- *((sal_Int32 *)pMem + i) = ((typelib_EnumTypeDescription *)pElementType)->nDefaultEnumValue;
- }
- break;
- case typelib_TypeClass_STRUCT:
- case typelib_TypeClass_EXCEPTION:
- for (i=0; i < nTotalElements; i++)
- {
- _defaultConstructStruct( (sal_Char*)pMem + i * nElementSize, (typelib_CompoundTypeDescription *)pElementType );
- }
- break;
- case typelib_TypeClass_UNION:
- for (i=0; i < nTotalElements; i++)
- {
- _defaultConstructUnion( (sal_Char*)pMem + i * nElementSize, pElementType );
- }
- break;
- case typelib_TypeClass_SEQUENCE:
- for (i=0; i < nTotalElements; i++)
- {
- uno_Sequence** ppElement = (uno_Sequence **)pMem + i;
- *ppElement = createEmptySequence();
- }
- break;
- default:
- OSL_ASSERT(false);
- break;
- }
- TYPELIB_DANGER_RELEASE( pElementType );
-}
-
-//--------------------------------------------------------------------------------------------------
inline void _defaultConstructData(
void * pMem,
typelib_TypeDescriptionReference * pType,
@@ -218,30 +126,6 @@ inline void _defaultConstructData(
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
- case typelib_TypeClass_ARRAY:
- if (pTypeDescr)
- {
- _defaultConstructArray( pMem, (typelib_ArrayTypeDescription *)pTypeDescr );
- }
- else
- {
- TYPELIB_DANGER_GET( &pTypeDescr, pType );
- _defaultConstructArray( pMem, (typelib_ArrayTypeDescription *)pTypeDescr );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- }
- break;
- case typelib_TypeClass_UNION:
- if (pTypeDescr)
- {
- _defaultConstructUnion( pMem, pTypeDescr );
- }
- else
- {
- TYPELIB_DANGER_GET( &pTypeDescr, pType );
- _defaultConstructUnion( pMem, pTypeDescr );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- }
- break;
case typelib_TypeClass_SEQUENCE:
*(uno_Sequence **)pMem = createEmptySequence();
break;
diff --git a/cppu/source/uno/copy.hxx b/cppu/source/uno/copy.hxx
index fb9adb3c2452..b3b536e03f48 100644
--- a/cppu/source/uno/copy.hxx
+++ b/cppu/source/uno/copy.hxx
@@ -95,65 +95,6 @@ inline void _copyConstructStruct(
}
}
}
-//--------------------------------------------------------------------------------------------------
-inline void _copyConstructArray(
- void * pDest, void * pSource,
- typelib_ArrayTypeDescription * pTypeDescr,
- uno_AcquireFunc acquire, uno_Mapping * mapping )
-{
- typelib_TypeDescriptionReference * pElementTypeRef = ((typelib_IndirectTypeDescription *)pTypeDescr)->pType;
- typelib_TypeDescription * pElementTypeDescr = NULL;
- TYPELIB_DANGER_GET( &pElementTypeDescr, pElementTypeRef );
- sal_Int32 nElementSize = ((typelib_TypeDescription*)pElementTypeDescr)->nSize;
- TYPELIB_DANGER_RELEASE( pElementTypeDescr );
- sal_Int32 nTotalElements = pTypeDescr->nTotalElements;
-
- if (mapping)
- {
- for(sal_Int32 i = 0; i < nTotalElements; i++)
- {
- ::uno_type_copyAndConvertData(
- (sal_Char *)pDest + i * nElementSize,
- (sal_Char *)pSource + i * nElementSize,
- pElementTypeRef, mapping );
- }
- }
- else
- {
- for(sal_Int32 i = 0; i < nTotalElements; i++)
- {
- ::uno_type_copyData(
- (sal_Char *)pDest + (i * nElementSize),
- (sal_Char *)pSource + (i * nElementSize),
- pElementTypeRef, acquire );
- }
- }
-}
-//--------------------------------------------------------------------------------------------------
-inline void _copyConstructUnion(
- void * pDest, void * pSource,
- typelib_TypeDescription * pTypeDescr,
- uno_AcquireFunc acquire, uno_Mapping * mapping )
- SAL_THROW (())
-{
- typelib_TypeDescriptionReference * pSetType = _unionGetSetType( pSource, pTypeDescr );
- if (mapping)
- {
- ::uno_type_copyAndConvertData(
- (char *)pDest + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset,
- (char *)pSource + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset,
- pSetType, mapping );
- }
- else
- {
- ::uno_type_copyData(
- (char *)pDest + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset,
- (char *)pSource + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset,
- pSetType, acquire );
- }
- *(sal_Int64 *)pDest = *(sal_Int64 *)pSource;
- typelib_typedescriptionreference_release( pSetType );
-}
//------------------------------------------------------------------------------
uno_Sequence * copyConstructSequence(
@@ -256,40 +197,6 @@ inline void _copyConstructAnyFromData(
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
- case typelib_TypeClass_ARRAY:
- if (pTypeDescr)
- {
- pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
- _copyConstructArray(
- pDestAny->pData, pSource,
- (typelib_ArrayTypeDescription *)pTypeDescr,
- acquire, mapping );
- }
- else
- {
- TYPELIB_DANGER_GET( &pTypeDescr, pType );
- pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
- _copyConstructArray(
- pDestAny->pData, pSource,
- (typelib_ArrayTypeDescription *)pTypeDescr,
- acquire, mapping );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- }
- break;
- case typelib_TypeClass_UNION:
- if (pTypeDescr)
- {
- pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
- _copyConstructUnion( pDestAny->pData, pSource, pTypeDescr, acquire, mapping );
- }
- else
- {
- TYPELIB_DANGER_GET( &pTypeDescr, pType );
- pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
- _copyConstructUnion( pDestAny->pData, pSource, pTypeDescr, acquire, mapping );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- }
- break;
case typelib_TypeClass_SEQUENCE:
pDestAny->pData = &pDestAny->pReserved;
if (pTypeDescr)
@@ -450,36 +357,6 @@ inline void _copyConstructAny(
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
- case typelib_TypeClass_ARRAY:
- if (pTypeDescr)
- {
- pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
- _defaultConstructArray(
- pDestAny->pData, (typelib_ArrayTypeDescription *)pTypeDescr );
- }
- else
- {
- TYPELIB_DANGER_GET( &pTypeDescr, pType );
- pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
- _defaultConstructArray(
- pDestAny->pData, (typelib_ArrayTypeDescription *)pTypeDescr );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- }
- break;
- case typelib_TypeClass_UNION:
- if (pTypeDescr)
- {
- pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
- _defaultConstructUnion( pDestAny->pData, pTypeDescr );
- }
- else
- {
- TYPELIB_DANGER_GET( &pTypeDescr, pType );
- pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
- _defaultConstructUnion( pDestAny->pData, pTypeDescr );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- }
- break;
case typelib_TypeClass_SEQUENCE:
pDestAny->pData = &pDestAny->pReserved;
*(uno_Sequence **)pDestAny->pData = createEmptySequence();
@@ -568,60 +445,6 @@ inline uno_Sequence * icopyConstructSequence(
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
break;
}
- case typelib_TypeClass_ARRAY:
- {
- typelib_TypeDescription * pElementTypeDescr = 0;
- TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
- sal_Int32 nElementSize = pElementTypeDescr->nSize;
- char * pSourceElements = pSource->elements;
- pDest = allocSeq( nElementSize, nElements );
- if (pDest != 0)
- {
- char * pElements = pDest->elements;
- for ( sal_Int32 nPos = nElements; nPos--; )
- {
- _copyConstructArray(
- pElements + (nPos * nElementSize),
- pSourceElements + (nPos * nElementSize),
- (typelib_ArrayTypeDescription *)pElementTypeDescr,
- acquire, mapping );
- }
- }
- TYPELIB_DANGER_RELEASE( pElementTypeDescr );
- break;
- }
- case typelib_TypeClass_UNION:
- {
- typelib_TypeDescription * pElementTypeDescr = 0;
- TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
- sal_Int32 nElementSize = pElementTypeDescr->nSize;
- sal_Int32 nValueOffset =
- ((typelib_UnionTypeDescription *)
- pElementTypeDescr)->nValueOffset;
- pDest = allocSeq( nElementSize, nElements );
- if (pDest != 0)
- {
- char * pElements = pDest->elements;
- char * pSourceElements = pSource->elements;
- for ( sal_Int32 nPos = nElements; nPos--; )
- {
- char * pDest2 =
- pElements + (nPos * nElementSize);
- char * pSource2 =
- pSourceElements + (nPos * nElementSize);
-
- typelib_TypeDescriptionReference * pSetType =
- _unionGetSetType( pSource2, pElementTypeDescr );
- ::uno_type_copyAndConvertData(
- pDest2 + nValueOffset, pSource2 + nValueOffset,
- pSetType, mapping );
- *(sal_Int64 *)pDest2 = *(sal_Int64 *)pSource2;
- ::typelib_typedescriptionreference_release( pSetType );
- }
- }
- TYPELIB_DANGER_RELEASE( pElementTypeDescr );
- break;
- }
case typelib_TypeClass_SEQUENCE: // sequence of sequence
{
pDest = allocSeq( sizeof (uno_Sequence *), nElements );
@@ -765,36 +588,6 @@ inline void _copyConstructData(
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
- case typelib_TypeClass_ARRAY:
- if (pTypeDescr)
- {
- _copyConstructArray(
- pDest, pSource,
- (typelib_ArrayTypeDescription *)pTypeDescr,
- acquire, mapping );
- }
- else
- {
- TYPELIB_DANGER_GET( &pTypeDescr, pType );
- _copyConstructArray(
- pDest, pSource,
- (typelib_ArrayTypeDescription *)pTypeDescr,
- acquire, mapping );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- }
- break;
- case typelib_TypeClass_UNION:
- if (pTypeDescr)
- {
- _copyConstructUnion( pDest, pSource, pTypeDescr, acquire, mapping );
- }
- else
- {
- TYPELIB_DANGER_GET( &pTypeDescr, pType );
- _copyConstructUnion( pDest, pSource, pTypeDescr, acquire, mapping );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- }
- break;
case typelib_TypeClass_SEQUENCE:
if (mapping)
{
diff --git a/cppu/source/uno/destr.hxx b/cppu/source/uno/destr.hxx
index f3bc26ff3927..c02e7cf7a267 100644
--- a/cppu/source/uno/destr.hxx
+++ b/cppu/source/uno/destr.hxx
@@ -29,19 +29,6 @@ namespace cppu
//#### destruction #################################################################################
//##################################################################################################
-//--------------------------------------------------------------------------------------------------
-inline void _destructUnion(
- void * pValue,
- typelib_TypeDescription * pTypeDescr,
- uno_ReleaseFunc release )
- SAL_THROW(())
-{
- typelib_TypeDescriptionReference * pType = _unionGetSetType( pValue, pTypeDescr );
- ::uno_type_destructData(
- (char *)pValue + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset,
- pType, release );
- ::typelib_typedescriptionreference_release( pType );
-}
//==================================================================================================
void destructStruct(
void * pValue,
@@ -71,29 +58,6 @@ inline void _destructStruct(
}
}
-//--------------------------------------------------------------------------------------------------
-inline void _destructArray(
- void * pValue,
- typelib_ArrayTypeDescription * pTypeDescr,
- uno_ReleaseFunc release )
- throw ()
-{
- typelib_TypeDescription * pElementType = NULL;
- TYPELIB_DANGER_GET( &pElementType, ((typelib_IndirectTypeDescription *)pTypeDescr)->pType );
- sal_Int32 nElementSize = pElementType->nSize;
- TYPELIB_DANGER_RELEASE( pElementType );
-
- sal_Int32 nTotalElements = pTypeDescr->nTotalElements;
- for(sal_Int32 i=0; i < nTotalElements; i++)
- {
- ::uno_type_destructData(
- (sal_Char *)pValue + i * nElementSize,
- ((typelib_IndirectTypeDescription *)pTypeDescr)->pType, release );
- }
-
- typelib_typedescriptionreference_release(((typelib_IndirectTypeDescription *)pTypeDescr)->pType);
-}
-
//==============================================================================
void destructSequence(
uno_Sequence * pSequence,
@@ -155,15 +119,6 @@ inline void _destructAny(
::rtl_freeMemory( pAny->pData );
break;
}
- case typelib_TypeClass_UNION:
- {
- typelib_TypeDescription * pTypeDescr = 0;
- TYPELIB_DANGER_GET( &pTypeDescr, pType );
- _destructUnion( pAny->pData, pTypeDescr, release );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- ::rtl_freeMemory( pAny->pData );
- break;
- }
case typelib_TypeClass_SEQUENCE:
{
destructSequence(
@@ -257,22 +212,6 @@ inline sal_Int32 idestructElements(
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
return nSize;
}
- case typelib_TypeClass_UNION:
- {
- typelib_TypeDescription * pElementTypeDescr = 0;
- TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
- sal_Int32 nElementSize = pElementTypeDescr->nSize;
- for ( sal_Int32 nPos = nStartIndex; nPos < nStopIndex; ++nPos )
- {
- _destructUnion(
- (char *)pElements + (nElementSize * nPos),
- pElementTypeDescr,
- release );
- }
- sal_Int32 nSize = pElementTypeDescr->nSize;
- TYPELIB_DANGER_RELEASE( pElementTypeDescr );
- return nSize;
- }
case typelib_TypeClass_SEQUENCE:
{
typelib_TypeDescription * pElementTypeDescr = 0;
@@ -387,30 +326,6 @@ inline void _destructData(
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
- case typelib_TypeClass_ARRAY:
- if (pTypeDescr)
- {
- _destructArray( pValue, (typelib_ArrayTypeDescription *)pTypeDescr, release );
- }
- else
- {
- TYPELIB_DANGER_GET( &pTypeDescr, pType );
- _destructArray( pValue, (typelib_ArrayTypeDescription *)pTypeDescr, release );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- }
- break;
- case typelib_TypeClass_UNION:
- if (pTypeDescr)
- {
- _destructUnion( pValue, pTypeDescr, release );
- }
- else
- {
- TYPELIB_DANGER_GET( &pTypeDescr, pType );
- _destructUnion( pValue, pTypeDescr, release );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- }
- break;
case typelib_TypeClass_SEQUENCE:
{
idestructSequence(
diff --git a/cppu/source/uno/eq.hxx b/cppu/source/uno/eq.hxx
index a3a26bf08ba9..c1496cb77900 100644
--- a/cppu/source/uno/eq.hxx
+++ b/cppu/source/uno/eq.hxx
@@ -226,32 +226,6 @@ inline sal_Bool _equalSequence(
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
return sal_True;
}
- case typelib_TypeClass_UNION:
- {
- typelib_TypeDescription * pElementTypeDescr = 0;
- TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
- sal_Int32 nElementSize = pElementTypeDescr->nSize;
- sal_Int32 nValueOffset = ((typelib_UnionTypeDescription *)pElementTypeDescr)->nValueOffset;
- for ( sal_Int32 nPos = nElements; nPos--; )
- {
- char * pDest2 = (char *)pDestElements + (nPos * nElementSize);
- char * pSource2 = (char *)pSourceElements + (nPos * nElementSize);
- typelib_TypeDescriptionReference * pSetType = _unionGetSetType(
- pDest2, pElementTypeDescr );
- sal_Bool bRet = ::uno_type_equalData(
- pDest2 + nValueOffset, pSetType,
- pSource2 + nValueOffset, pSetType,
- queryInterface, release );
- ::typelib_typedescriptionreference_release( pSetType );
- if (! bRet)
- {
- TYPELIB_DANGER_RELEASE( pElementTypeDescr );
- return sal_False;
- }
- }
- TYPELIB_DANGER_RELEASE( pElementTypeDescr );
- return sal_True;
- }
case typelib_TypeClass_SEQUENCE: // sequence of sequence
{
typelib_TypeDescription * pElementTypeDescr = 0;
@@ -586,40 +560,6 @@ inline sal_Bool _equalData(
TYPELIB_DANGER_RELEASE( pDestTypeDescr );
return bRet;
}
- case typelib_TypeClass_UNION:
- if (_type_equals( pDestType, pSourceType ) &&
- *(sal_Int64 *)pDest == *(sal_Int64 *)pSource) // same discriminant
- {
- sal_Bool bRet;
- if (pDestTypeDescr)
- {
- typelib_TypeDescriptionReference * pSetType = _unionGetSetType(
- pDest, pDestTypeDescr );
- bRet = ::uno_type_equalData(
- (char *)pDest + ((typelib_UnionTypeDescription *)pDestTypeDescr)->nValueOffset,
- pSetType,
- (char *)pSource + ((typelib_UnionTypeDescription *)pDestTypeDescr)->nValueOffset,
- pSetType,
- queryInterface, release );
- typelib_typedescriptionreference_release( pSetType );
- }
- else
- {
- TYPELIB_DANGER_GET( &pDestTypeDescr, pDestType );
- typelib_TypeDescriptionReference * pSetType = _unionGetSetType(
- pDest, pDestTypeDescr );
- bRet = ::uno_type_equalData(
- (char *)pDest + ((typelib_UnionTypeDescription *)pDestTypeDescr)->nValueOffset,
- pSetType,
- (char *)pSource + ((typelib_UnionTypeDescription *)pDestTypeDescr)->nValueOffset,
- pSetType,
- queryInterface, release );
- typelib_typedescriptionreference_release( pSetType );
- TYPELIB_DANGER_RELEASE( pDestTypeDescr );
- }
- return bRet;
- }
- return sal_False;
case typelib_TypeClass_SEQUENCE:
if (_type_equals( pDestType, pSourceType ))
{
diff --git a/cppu/source/uno/prim.hxx b/cppu/source/uno/prim.hxx
index b40dac398eb3..5be342a6ca25 100644
--- a/cppu/source/uno/prim.hxx
+++ b/cppu/source/uno/prim.hxx
@@ -151,32 +151,6 @@ extern "C" void * binuno_queryInterface(
void * pUnoI, typelib_TypeDescriptionReference * pDestType );
//--------------------------------------------------------------------------------------------------
-inline typelib_TypeDescriptionReference * _unionGetSetType(
- void * pUnion, typelib_TypeDescription * pTD )
- SAL_THROW(())
-{
- typelib_TypeDescriptionReference * pRet = 0;
- sal_Int32 nPos;
-
- sal_Int64 * pDiscr = ((typelib_UnionTypeDescription *)pTD)->pDiscriminants;
- sal_Int64 nDiscr = *(sal_Int64 *)pUnion;
- for ( nPos = ((typelib_UnionTypeDescription *)pTD)->nMembers; nPos--; )
- {
- if (pDiscr[nPos] == nDiscr)
- {
- pRet = ((typelib_UnionTypeDescription *)pTD)->ppTypeRefs[nPos];
- break;
- }
- }
- if (nPos >= 0)
- {
- // default
- pRet = ((typelib_UnionTypeDescription *)pTD)->pDefaultTypeRef;
- }
- typelib_typedescriptionreference_acquire( pRet );
- return pRet;
-}
-//--------------------------------------------------------------------------------------------------
inline sal_Bool _type_equals(
typelib_TypeDescriptionReference * pType1, typelib_TypeDescriptionReference * pType2 )
SAL_THROW(())
diff --git a/cppu/source/uno/sequence.cxx b/cppu/source/uno/sequence.cxx
index d570461f9297..03198c175353 100644
--- a/cppu/source/uno/sequence.cxx
+++ b/cppu/source/uno/sequence.cxx
@@ -265,65 +265,6 @@ static inline bool idefaultConstructElements(
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
break;
}
- case typelib_TypeClass_ARRAY:
- {
- typelib_TypeDescription * pElementTypeDescr = 0;
- TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
- sal_Int32 nElementSize = pElementTypeDescr->nSize;
-
- if (nAlloc >= 0)
- pSeq = reallocSeq( pSeq, nElementSize, nAlloc );
- if (pSeq != 0)
- {
- char * pElements = pSeq->elements;
- for ( sal_Int32 nPos = nStartIndex; nPos < nStopIndex; ++nPos )
- {
- _defaultConstructArray(
- pElements + (nElementSize * nPos),
- (typelib_ArrayTypeDescription *)pElementTypeDescr );
- }
- }
-
- TYPELIB_DANGER_RELEASE( pElementTypeDescr );
- break;
- }
- case typelib_TypeClass_UNION:
- {
- typelib_TypeDescription * pElementTypeDescr = 0;
- TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
- sal_Int32 nElementSize = pElementTypeDescr->nSize;
-
- if (nAlloc >= 0)
- pSeq = reallocSeq( pSeq, nElementSize, nAlloc );
- if (pSeq != 0)
- {
- sal_Int32 nValueOffset =
- ((typelib_UnionTypeDescription *)
- pElementTypeDescr)->nValueOffset;
- sal_Int64 nDefaultDiscr =
- ((typelib_UnionTypeDescription *)
- pElementTypeDescr)->nDefaultDiscriminant;
-
- typelib_TypeDescription * pDefaultTypeDescr = 0;
- TYPELIB_DANGER_GET(
- &pDefaultTypeDescr,
- ((typelib_UnionTypeDescription *)
- pElementTypeDescr)->pDefaultTypeRef );
-
- char * pElements = pSeq->elements;
- for ( sal_Int32 nPos = nStartIndex; nPos < nStopIndex; ++nPos )
- {
- char * pMem = pElements + (nElementSize * nPos);
- ::uno_constructData(
- (char *)pMem + nValueOffset, pDefaultTypeDescr );
- *(sal_Int64 *)pMem = nDefaultDiscr;
- }
- TYPELIB_DANGER_RELEASE( pDefaultTypeDescr );
- }
-
- TYPELIB_DANGER_RELEASE( pElementTypeDescr );
- break;
- }
case typelib_TypeClass_SEQUENCE:
{
if (nAlloc >= 0)
@@ -588,42 +529,6 @@ static inline bool icopyConstructFromElements(
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
break;
}
- case typelib_TypeClass_UNION:
- {
- typelib_TypeDescription * pElementTypeDescr = 0;
- TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
- sal_Int32 nElementSize = pElementTypeDescr->nSize;
-
- if (nAlloc >= 0)
- pSeq = reallocSeq( pSeq, nElementSize, nAlloc );
- if (pSeq != 0)
- {
- char * pDestElements = pSeq->elements;
-
- sal_Int32 nValueOffset =
- ((typelib_UnionTypeDescription *)
- pElementTypeDescr)->nValueOffset;
- for ( sal_Int32 nPos = nStartIndex; nPos < nStopIndex; ++nPos )
- {
- char * pDest =
- pDestElements + (nElementSize * nPos);
- char * pSource =
- (char *)pSourceElements + (nElementSize * nPos);
-
- typelib_TypeDescriptionReference * pSetType = _unionGetSetType(
- pSource, pElementTypeDescr );
- ::uno_type_copyData(
- pDest + nValueOffset,
- pSource + nValueOffset,
- pSetType, acquire );
- *(sal_Int64 *)pDest = *(sal_Int64 *)pSource;
- typelib_typedescriptionreference_release( pSetType );
- }
- }
-
- TYPELIB_DANGER_RELEASE( pElementTypeDescr );
- break;
- }
case typelib_TypeClass_SEQUENCE: // sequence of sequence
{
if (nAlloc >= 0)