summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
index 6e61196df98e..4556172651cf 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_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
@@ -55,7 +55,7 @@ using namespace ::__cxxabiv1;
namespace CPPU_CURRENT_NAMESPACE
{
-
+
void dummy_can_throw_anything( char const * )
{
}
@@ -66,13 +66,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
@@ -87,7 +87,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 ) );
@@ -102,17 +102,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( () );
};
//__________________________________________________________________________________________________
@@ -130,9 +130,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())
@@ -150,7 +150,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() );
@@ -186,7 +186,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?!" );
@@ -201,7 +201,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
{
rtti = iFind->second;
}
-
+
return rtti;
}
@@ -245,10 +245,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
@@ -277,7 +277,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
Reference< XInterface >() );
}
}
-
+
__cxa_throw( pCppExc, rtti, deleteException );
}
@@ -297,7 +297,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