22#include <osl/diagnose.h>
33 typelib_CompoundTypeDescription * pCompType );
37 typelib_CompoundTypeDescription * pTypeDescr )
39 if (pTypeDescr->pBaseTypeDescription)
44 typelib_TypeDescriptionReference ** ppTypeRefs = pTypeDescr->ppTypeRefs;
45 sal_Int32 * pMemberOffsets = pTypeDescr->pMemberOffsets;
46 sal_Int32 nDescr = pTypeDescr->nMembers;
57 typelib_TypeDescriptionReference * pType,
60 switch (pType->eTypeClass)
62 case typelib_TypeClass_CHAR:
65 case typelib_TypeClass_BOOLEAN:
66 *
static_cast<sal_Bool *
>(pMem) =
false;
68 case typelib_TypeClass_BYTE:
71 case typelib_TypeClass_SHORT:
72 case typelib_TypeClass_UNSIGNED_SHORT:
73 *
static_cast<sal_Int16 *
>(pMem) = 0;
75 case typelib_TypeClass_LONG:
76 case typelib_TypeClass_UNSIGNED_LONG:
77 *
static_cast<sal_Int32 *
>(pMem) = 0;
79 case typelib_TypeClass_HYPER:
80 case typelib_TypeClass_UNSIGNED_HYPER:
81 *
static_cast<sal_Int64 *
>(pMem) = 0;
83 case typelib_TypeClass_FLOAT:
84 *
static_cast<float *
>(pMem) = 0.0;
86 case typelib_TypeClass_DOUBLE:
87 *
static_cast<double *
>(pMem) = 0.0;
89 case typelib_TypeClass_STRING:
90 *
static_cast<rtl_uString **
>(pMem) =
nullptr;
91 ::rtl_uString_new(
static_cast<rtl_uString **
>(pMem) );
93 case typelib_TypeClass_TYPE:
94 *
static_cast<typelib_TypeDescriptionReference **
>(pMem) =
_getVoidType();
96 case typelib_TypeClass_ANY:
99 case typelib_TypeClass_ENUM:
102 *
static_cast<sal_Int32 *
>(pMem) =
reinterpret_cast<typelib_EnumTypeDescription *
>(pTypeDescr)->nDefaultEnumValue;
106 TYPELIB_DANGER_GET( &pTypeDescr, pType );
107 *
static_cast<sal_Int32 *
>(pMem) =
reinterpret_cast<typelib_EnumTypeDescription *
>(pTypeDescr)->nDefaultEnumValue;
108 TYPELIB_DANGER_RELEASE( pTypeDescr );
111 case typelib_TypeClass_STRUCT:
112 case typelib_TypeClass_EXCEPTION:
119 TYPELIB_DANGER_GET( &pTypeDescr, pType );
121 TYPELIB_DANGER_RELEASE( pTypeDescr );
124 case typelib_TypeClass_SEQUENCE:
127 case typelib_TypeClass_INTERFACE:
128 *
static_cast<void **
>(pMem) =
nullptr;
void SAL_CALL uno_type_constructData(void *pMem, typelib_TypeDescriptionReference *pType) SAL_THROW_EXTERN_C()
struct _typelib_TypeDescription typelib_TypeDescription
void _defaultConstructStruct(void *pMem, typelib_CompoundTypeDescription *pTypeDescr)
void _defaultConstructData(void *pMem, typelib_TypeDescriptionReference *pType, typelib_TypeDescription *pTypeDescr)
typelib_TypeDescriptionReference * _getVoidType()
void defaultConstructStruct(void *pMem, typelib_CompoundTypeDescription *pCompType)
void CONSTRUCT_EMPTY_ANY(uno_Any *pAny)
uno_Sequence * createEmptySequence()