diff options
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx index 8d0be02e7d93..6833b9ed13ff 100644 --- a/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx +++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,7 +54,7 @@ using namespace ::__cxxabiv1; namespace CPPU_CURRENT_NAMESPACE { - + void dummy_can_throw_anything( char const * ) { } @@ -65,13 +65,13 @@ static OUString toUNOname( char const * p ) SAL_THROW( () ) #if defined BRIDGES_DEBUG char const * start = p; #endif - + // example: N3com3sun4star4lang24IllegalArgumentExceptionE - + OUStringBuffer buf( 64 ); OSL_ASSERT( 'N' == *p ); ++p; // skip N - + while ('E' != *p) { // read chars count @@ -86,7 +86,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () ) if ('E' != *p) buf.append( (sal_Unicode)'.' ); } - + #if defined BRIDGES_DEBUG OUString ret( buf.makeStringAndClear() ); OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) ); @@ -101,17 +101,17 @@ static OUString toUNOname( char const * p ) SAL_THROW( () ) class RTTI { typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map; - + Mutex m_mutex; t_rtti_map m_rttis; t_rtti_map m_generatedRttis; void * m_hApp; - + public: RTTI() SAL_THROW( () ); ~RTTI() SAL_THROW( () ); - + type_info * getRTTI( typelib_CompoundTypeDescription * ) SAL_THROW( () ); }; //__________________________________________________________________________________________________ @@ -129,9 +129,9 @@ RTTI::~RTTI() SAL_THROW( () ) type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THROW( () ) { type_info * rtti; - + OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName; - + MutexGuard guard( m_mutex ); t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) ); if (iFind == m_rttis.end()) @@ -149,7 +149,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR } while (index >= 0); buf.append( 'E' ); - + OString symName( buf.makeStringAndClear() ); rtti = (type_info *)dlsym( m_hApp, symName.getStr() ); @@ -185,7 +185,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR // this class has no base class rtti = new __class_type_info( strdup( rttiName ) ); } - + pair< t_rtti_map::iterator, bool > insertion( m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) ); OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" ); @@ -200,7 +200,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { rtti = iFind->second; } - + return rtti; } @@ -244,10 +244,10 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ), Reference< XInterface >() ); } - + pCppExc = __cxa_allocate_exception( pTypeDescr->nSize ); ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp ); - + // destruct uno exception ::uno_any_destruct( pUnoExc, 0 ); // avoiding locked counts @@ -276,7 +276,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) Reference< XInterface >() ); } } - + __cxa_throw( pCppExc, rtti, deleteException ); } @@ -296,7 +296,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping #endif return; } - + typelib_TypeDescription * pExcTypeDescr = 0; OUString unoName( toUNOname( header->exceptionType->name() ) ); #if defined BRIDGES_DEBUG |