From e7bc3cab019fbf040f9fb8b53ae2cf3f977d200b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 23 May 2014 12:03:21 +0200 Subject: remove boilerplate in UNO Exception constructor calls Now that we have default values for Exception constructor params, remove lots of boilerplate code. Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74 --- bridges/source/cpp_uno/gcc3_linux_mips/except.cxx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'bridges/source/cpp_uno/gcc3_linux_mips/except.cxx') diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx b/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx index 84b12a35e8e8..0a6a211f272e 100644 --- a/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx @@ -227,8 +227,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) { throw RuntimeException( OUString("cannot get typedescription for type ") + - *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ), - Reference< XInterface >() ); + *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) ); } pCppExc = __cxa_allocate_exception( pTypeDescr->nSize ); @@ -258,8 +257,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) { throw RuntimeException( OUString("no rtti for type ") + - *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ), - Reference< XInterface >() ); + *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) ); } } @@ -270,9 +268,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping { if (! header) { - RuntimeException aRE( - OUString("no exception header!"), - Reference< XInterface >() ); + RuntimeException aRE( "no exception header!" ); Type const & rType = ::getCppuType( &aRE ); uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); #if defined _DEBUG @@ -291,9 +287,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData ); if (0 == pExcTypeDescr) { - RuntimeException aRE( - OUString("exception type not found: ") + unoName, - Reference< XInterface >() ); + RuntimeException aRE( OUString("exception type not found: ") + unoName ); Type const & rType = ::getCppuType( &aRE ); uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); #if defined _DEBUG -- cgit