INTEGRATION: CWS uno1 (1.14.22.2.4); FILE MERGED
2003/02/25 16:41:28 dbo 1.14.22.2.4.1: #107762# avoid use of generated headers; minor modifications
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: typelib.cxx,v $
|
* $RCSfile: typelib.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.15 $
|
* $Revision: 1.16 $
|
||||||
*
|
*
|
||||||
* last change: $Author: hr $ $Date: 2003-03-19 16:55:42 $
|
* last change: $Author: vg $ $Date: 2003-03-20 12:28:15 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -59,12 +59,6 @@
|
|||||||
*
|
*
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#ifdef CPPU_ASSERTIONS
|
|
||||||
#define CPPU_TRACE OSL_TRACE
|
|
||||||
#else
|
|
||||||
#define CPPU_TRACE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <hash_map>
|
#include <hash_map>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
@@ -273,7 +267,7 @@ struct TypeDescriptor_Init_Impl
|
|||||||
|
|
||||||
inline void callChain( typelib_TypeDescription ** ppRet, rtl_uString * pName ) SAL_THROW( () );
|
inline void callChain( typelib_TypeDescription ** ppRet, rtl_uString * pName ) SAL_THROW( () );
|
||||||
|
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
// only for debugging
|
// only for debugging
|
||||||
sal_Int32 nTypeDescriptionCount;
|
sal_Int32 nTypeDescriptionCount;
|
||||||
sal_Int32 nCompoundTypeDescriptionCount;
|
sal_Int32 nCompoundTypeDescriptionCount;
|
||||||
@@ -376,7 +370,7 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () )
|
|||||||
|
|
||||||
delete [] ppTDR;
|
delete [] ppTDR;
|
||||||
|
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
aIt = pWeakMap->begin();
|
aIt = pWeakMap->begin();
|
||||||
while( aIt != pWeakMap->end() )
|
while( aIt != pWeakMap->end() )
|
||||||
{
|
{
|
||||||
@@ -384,12 +378,12 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () )
|
|||||||
if (pTDR)
|
if (pTDR)
|
||||||
{
|
{
|
||||||
OString aTypeName( OUStringToOString( pTDR->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
|
OString aTypeName( OUStringToOString( pTDR->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
|
||||||
CPPU_TRACE( "### remaining type: %s; ref count = %d",
|
OSL_TRACE(
|
||||||
aTypeName.getStr(), pTDR->nRefCount );
|
"### remaining type: %s; ref count = %d", aTypeName.getStr(), pTDR->nRefCount );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CPPU_TRACE( "### remaining null type entry!?" );
|
OSL_TRACE( "### remaining null type entry!?" );
|
||||||
}
|
}
|
||||||
++aIt;
|
++aIt;
|
||||||
}
|
}
|
||||||
@@ -398,7 +392,7 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () )
|
|||||||
delete pWeakMap;
|
delete pWeakMap;
|
||||||
pWeakMap = 0;
|
pWeakMap = 0;
|
||||||
}
|
}
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
OSL_ASSERT( nTypeDescriptionCount == 0 );
|
OSL_ASSERT( nTypeDescriptionCount == 0 );
|
||||||
OSL_ASSERT( nCompoundTypeDescriptionCount == 0 );
|
OSL_ASSERT( nCompoundTypeDescriptionCount == 0 );
|
||||||
OSL_ASSERT( nUnionTypeDescriptionCount == 0 );
|
OSL_ASSERT( nUnionTypeDescriptionCount == 0 );
|
||||||
@@ -498,11 +492,11 @@ static inline void typelib_typedescription_initTables(
|
|||||||
pReadWriteAttributes[i] = !((typelib_InterfaceAttributeTypeDescription *)pM)->bReadOnly;
|
pReadWriteAttributes[i] = !((typelib_InterfaceAttributeTypeDescription *)pM)->bReadOnly;
|
||||||
TYPELIB_DANGER_RELEASE( pM );
|
TYPELIB_DANGER_RELEASE( pM );
|
||||||
}
|
}
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OString aStr( OUStringToOString( pITD->ppAllMembers[i]->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
|
OString aStr( OUStringToOString( pITD->ppAllMembers[i]->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
|
||||||
CPPU_TRACE( "\n### cannot get attribute type description: %s", aStr.getStr() );
|
OSL_TRACE( "\n### cannot get attribute type description: %s", aStr.getStr() );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -569,7 +563,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
|
|||||||
typelib_ArrayTypeDescription * pTmp = new typelib_ArrayTypeDescription();
|
typelib_ArrayTypeDescription * pTmp = new typelib_ArrayTypeDescription();
|
||||||
typelib_IndirectTypeDescription * pIndirect = (typelib_IndirectTypeDescription *)pTmp;
|
typelib_IndirectTypeDescription * pIndirect = (typelib_IndirectTypeDescription *)pTmp;
|
||||||
pRet = (typelib_TypeDescription *)pTmp;
|
pRet = (typelib_TypeDescription *)pTmp;
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
osl_incrementInterlockedCount( &aInit.nArrayTypeDescriptionCount );
|
osl_incrementInterlockedCount( &aInit.nArrayTypeDescriptionCount );
|
||||||
#endif
|
#endif
|
||||||
pIndirect->pType = 0;
|
pIndirect->pType = 0;
|
||||||
@@ -583,7 +577,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
|
|||||||
{
|
{
|
||||||
typelib_IndirectTypeDescription * pTmp = new typelib_IndirectTypeDescription();
|
typelib_IndirectTypeDescription * pTmp = new typelib_IndirectTypeDescription();
|
||||||
pRet = (typelib_TypeDescription *)pTmp;
|
pRet = (typelib_TypeDescription *)pTmp;
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
osl_incrementInterlockedCount( &aInit.nIndirectTypeDescriptionCount );
|
osl_incrementInterlockedCount( &aInit.nIndirectTypeDescriptionCount );
|
||||||
#endif
|
#endif
|
||||||
pTmp->pType = 0;
|
pTmp->pType = 0;
|
||||||
@@ -595,7 +589,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
|
|||||||
typelib_UnionTypeDescription * pTmp;
|
typelib_UnionTypeDescription * pTmp;
|
||||||
pTmp = new typelib_UnionTypeDescription();
|
pTmp = new typelib_UnionTypeDescription();
|
||||||
pRet = (typelib_TypeDescription *)pTmp;
|
pRet = (typelib_TypeDescription *)pTmp;
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
osl_incrementInterlockedCount( &aInit.nUnionTypeDescriptionCount );
|
osl_incrementInterlockedCount( &aInit.nUnionTypeDescriptionCount );
|
||||||
#endif
|
#endif
|
||||||
pTmp->nMembers = 0;
|
pTmp->nMembers = 0;
|
||||||
@@ -614,7 +608,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
|
|||||||
typelib_CompoundTypeDescription * pTmp;
|
typelib_CompoundTypeDescription * pTmp;
|
||||||
pTmp = new typelib_CompoundTypeDescription();
|
pTmp = new typelib_CompoundTypeDescription();
|
||||||
pRet = (typelib_TypeDescription *)pTmp;
|
pRet = (typelib_TypeDescription *)pTmp;
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
osl_incrementInterlockedCount( &aInit.nCompoundTypeDescriptionCount );
|
osl_incrementInterlockedCount( &aInit.nCompoundTypeDescriptionCount );
|
||||||
#endif
|
#endif
|
||||||
pTmp->pBaseTypeDescription = 0;
|
pTmp->pBaseTypeDescription = 0;
|
||||||
@@ -628,7 +622,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
|
|||||||
{
|
{
|
||||||
typelib_EnumTypeDescription * pTmp = new typelib_EnumTypeDescription();
|
typelib_EnumTypeDescription * pTmp = new typelib_EnumTypeDescription();
|
||||||
pRet = (typelib_TypeDescription *)pTmp;
|
pRet = (typelib_TypeDescription *)pTmp;
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
osl_incrementInterlockedCount( &aInit.nEnumTypeDescriptionCount );
|
osl_incrementInterlockedCount( &aInit.nEnumTypeDescriptionCount );
|
||||||
#endif
|
#endif
|
||||||
pTmp->nDefaultEnumValue = 0;
|
pTmp->nDefaultEnumValue = 0;
|
||||||
@@ -642,7 +636,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
|
|||||||
{
|
{
|
||||||
typelib_InterfaceTypeDescription * pTmp = new typelib_InterfaceTypeDescription();
|
typelib_InterfaceTypeDescription * pTmp = new typelib_InterfaceTypeDescription();
|
||||||
pRet = (typelib_TypeDescription *)pTmp;
|
pRet = (typelib_TypeDescription *)pTmp;
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
osl_incrementInterlockedCount( &aInit.nInterfaceTypeDescriptionCount );
|
osl_incrementInterlockedCount( &aInit.nInterfaceTypeDescriptionCount );
|
||||||
#endif
|
#endif
|
||||||
pTmp->pBaseTypeDescription = 0;
|
pTmp->pBaseTypeDescription = 0;
|
||||||
@@ -660,7 +654,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
|
|||||||
{
|
{
|
||||||
typelib_InterfaceMethodTypeDescription * pTmp = new typelib_InterfaceMethodTypeDescription();
|
typelib_InterfaceMethodTypeDescription * pTmp = new typelib_InterfaceMethodTypeDescription();
|
||||||
pRet = (typelib_TypeDescription *)pTmp;
|
pRet = (typelib_TypeDescription *)pTmp;
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
osl_incrementInterlockedCount( &aInit.nInterfaceMethodTypeDescriptionCount );
|
osl_incrementInterlockedCount( &aInit.nInterfaceMethodTypeDescriptionCount );
|
||||||
#endif
|
#endif
|
||||||
pTmp->aBase.pMemberName = 0;
|
pTmp->aBase.pMemberName = 0;
|
||||||
@@ -676,7 +670,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
|
|||||||
{
|
{
|
||||||
typelib_InterfaceAttributeTypeDescription * pTmp = new typelib_InterfaceAttributeTypeDescription();
|
typelib_InterfaceAttributeTypeDescription * pTmp = new typelib_InterfaceAttributeTypeDescription();
|
||||||
pRet = (typelib_TypeDescription *)pTmp;
|
pRet = (typelib_TypeDescription *)pTmp;
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
osl_incrementInterlockedCount( &aInit.nInterfaceAttributeTypeDescriptionCount );
|
osl_incrementInterlockedCount( &aInit.nInterfaceAttributeTypeDescriptionCount );
|
||||||
#endif
|
#endif
|
||||||
pTmp->aBase.pMemberName = 0;
|
pTmp->aBase.pMemberName = 0;
|
||||||
@@ -687,7 +681,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
pRet = new typelib_TypeDescription();
|
pRet = new typelib_TypeDescription();
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
osl_incrementInterlockedCount( &aInit.nTypeDescriptionCount );
|
osl_incrementInterlockedCount( &aInit.nTypeDescriptionCount );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -721,7 +715,7 @@ extern "C" void SAL_CALL typelib_typedescription_new(
|
|||||||
{
|
{
|
||||||
if (typelib_TypeClass_TYPEDEF == eTypeClass)
|
if (typelib_TypeClass_TYPEDEF == eTypeClass)
|
||||||
{
|
{
|
||||||
CPPU_TRACE( "### unexpected typedef!" );
|
OSL_TRACE( "### unexpected typedef!" );
|
||||||
typelib_typedescriptionreference_getDescription( ppRet, pType );
|
typelib_typedescriptionreference_getDescription( ppRet, pType );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1258,7 +1252,7 @@ extern "C" void SAL_CALL typelib_typedescription_release(
|
|||||||
typelib_typedescription_destructExtendedMembers( pTD );
|
typelib_typedescription_destructExtendedMembers( pTD );
|
||||||
rtl_uString_release( pTD->pTypeName );
|
rtl_uString_release( pTD->pTypeName );
|
||||||
|
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
switch( pTD->eTypeClass )
|
switch( pTD->eTypeClass )
|
||||||
{
|
{
|
||||||
case typelib_TypeClass_ARRAY:
|
case typelib_TypeClass_ARRAY:
|
||||||
@@ -1809,7 +1803,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_new(
|
|||||||
}
|
}
|
||||||
else if (*ppTDR)
|
else if (*ppTDR)
|
||||||
{
|
{
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
OString aStr( OUStringToOString( pTypeName, RTL_TEXTENCODING_ASCII_US ) );
|
OString aStr( OUStringToOString( pTypeName, RTL_TEXTENCODING_ASCII_US ) );
|
||||||
OSL_ENSURE( !"### typedef not found: ", aStr.getStr() );
|
OSL_ENSURE( !"### typedef not found: ", aStr.getStr() );
|
||||||
#endif
|
#endif
|
||||||
@@ -1827,7 +1821,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_new(
|
|||||||
if( reallyWeak( eTypeClass ) )
|
if( reallyWeak( eTypeClass ) )
|
||||||
{
|
{
|
||||||
typelib_TypeDescriptionReference * pTDR = new typelib_TypeDescriptionReference();
|
typelib_TypeDescriptionReference * pTDR = new typelib_TypeDescriptionReference();
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
osl_incrementInterlockedCount( &aInit.nTypeDescriptionReferenceCount );
|
osl_incrementInterlockedCount( &aInit.nTypeDescriptionReferenceCount );
|
||||||
#endif
|
#endif
|
||||||
pTDR->nRefCount = 1;
|
pTDR->nRefCount = 1;
|
||||||
@@ -1885,7 +1879,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_release(
|
|||||||
|
|
||||||
rtl_uString_release( pRef->pTypeName );
|
rtl_uString_release( pRef->pTypeName );
|
||||||
OSL_ASSERT( pRef->pType == 0 );
|
OSL_ASSERT( pRef->pType == 0 );
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
osl_decrementInterlockedCount( &aInit.nTypeDescriptionReferenceCount );
|
osl_decrementInterlockedCount( &aInit.nTypeDescriptionReferenceCount );
|
||||||
#endif
|
#endif
|
||||||
delete pRef;
|
delete pRef;
|
||||||
@@ -2208,9 +2202,10 @@ extern "C" sal_Bool SAL_CALL typelib_typedescription_complete(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef CPPU_ASSERTIONS
|
#if defined DEBUG
|
||||||
OString aStr( OUStringToOString( (*ppTypeDescr)->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
|
OString aStr(
|
||||||
CPPU_TRACE( "\n### type cannot be completed: %s", aStr.getStr() );
|
OUStringToOString( (*ppTypeDescr)->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
|
||||||
|
OSL_TRACE( "\n### type cannot be completed: %s", aStr.getStr() );
|
||||||
#endif
|
#endif
|
||||||
return sal_False;
|
return sal_False;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user