diff options
Diffstat (limited to 'cppu/source/typelib/static_types.cxx')
-rw-r--r-- | cppu/source/typelib/static_types.cxx | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx index 83f52abfb369..fb146038ea91 100644 --- a/cppu/source/typelib/static_types.cxx +++ b/cppu/source/typelib/static_types.cxx @@ -573,71 +573,6 @@ CPPU_DLLPUBLIC void SAL_CALL typelib_static_enum_type_init( } } -//################################################################################################## -CPPU_DLLPUBLIC void SAL_CALL typelib_static_array_type_init( - typelib_TypeDescriptionReference ** ppRef, - typelib_TypeDescriptionReference * pElementTypeRef, - sal_Int32 nDimensions, ... ) - SAL_THROW_EXTERN_C() -{ - if (! *ppRef) - { - MutexGuard aGuard( typelib_StaticInitMutex::get() ); - if (! *ppRef) - { - OUStringBuffer aBuf( 32 ); - aBuf.append( pElementTypeRef->pTypeName ); - - va_list dimArgs; - va_start( dimArgs, nDimensions ); - sal_Int32 dim = 0; - sal_Int32 nElements = 1; - sal_Int32* pDimensions = new sal_Int32[nDimensions]; - for (sal_Int32 i=0; i < nDimensions; i++) - { - dim = va_arg( dimArgs, int); - pDimensions[i] = dim; - aBuf.appendAscii("["); - aBuf.append(dim); - aBuf.appendAscii("]"); - nElements *= dim; - } - va_end( dimArgs ); - OUString aTypeName( aBuf.makeStringAndClear() ); - - assert( ! TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK(typelib_TypeClass_ARRAY) ); - *ppRef = igetTypeByName( aTypeName.pData ); - if (!*ppRef) - { - typelib_TypeDescription * pReg = 0; - ::typelib_typedescription_newEmpty( - &pReg, typelib_TypeClass_ARRAY, aTypeName.pData ); - typelib_ArrayTypeDescription * pArray = (typelib_ArrayTypeDescription *)pReg; - - pArray->nDimensions = nDimensions; - pArray->nTotalElements = nElements; - pArray->pDimensions = pDimensions; - - typelib_typedescriptionreference_acquire(pElementTypeRef); - ((typelib_IndirectTypeDescription*)pArray)->pType = pElementTypeRef; - - pReg->pWeakRef = (typelib_TypeDescriptionReference *)pReg; - // sizeof( void ) not allowed - pReg->nSize = ::typelib_typedescription_getAlignedUnoSize( pReg, 0, pReg->nAlignment ); - pReg->nAlignment = ::adjustAlignment( pReg->nAlignment ); - pReg->bComplete = sal_True; - - ::typelib_typedescription_register( &pReg ); - *ppRef = (typelib_TypeDescriptionReference *)pReg; - assert( *ppRef == pReg->pWeakRef ); - } else - delete [] pDimensions; - // another static ref: - ++((*ppRef)->nStaticRefCount); - } - } -} - } // extern "C" } |