summaryrefslogtreecommitdiff
path: root/cppu/source/uno/copy.hxx
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/copy.hxx
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/copy.hxx')
-rw-r--r--cppu/source/uno/copy.hxx207
1 files changed, 0 insertions, 207 deletions
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)
{