basic/source/app/app.cxx | 4 ++-- basic/source/classes/eventatt.cxx | 4 ++-- basic/source/classes/sbunoobj.cxx | 13 ++++++------- basic/source/uno/namecont.cxx | 4 ++-- 4 files changed, 12 insertions(+), 13 deletions(-)
New commits: commit e2de4357f5e1bf6d7f205402f6823032c9d35b1b Author: Takeshi Abe <t...@fixedpoint.jp> Date: Wed Nov 23 02:21:12 2011 +0900 catch by const reference diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx index e017569..71bde6b 100644 --- a/basic/source/app/app.cxx +++ b/basic/source/app/app.cxx @@ -198,7 +198,7 @@ uno::Reference< XContentProviderManager > InitializeUCB( void ) defaultBootstrap_InitialComponentContext()->getServiceManager(), UNO_QUERY_THROW); } - catch( com::sun::star::uno::Exception & exc ) + catch( const com::sun::star::uno::Exception & exc ) { fprintf( stderr, "Couldn't bootstrap uno servicemanager for reason : %s\n" , OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); @@ -328,7 +328,7 @@ int BasicApp::Main( ) RemoveAccel( pMainAccel ); } - catch( class Exception & rEx) + catch(const class Exception & rEx) { printf( "Exception not caught: %s\n", ByteString( String(rEx.Message), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); String aMsg( String::CreateFromAscii( "Exception not caught: " ) ); diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index d93a12a..9d5f5ff 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -151,13 +151,13 @@ void SFURL_firing_impl( const ScriptEvent& aScriptEvent, Any* pRet, const Refere *pRet = result; } } - catch ( RuntimeException& re ) + catch ( const RuntimeException& re ) { OSL_TRACE("SFURL_firing_impl() Caught RuntimeException reason %s.", ::rtl::OUStringToOString( re.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer ); } - catch ( Exception& e ) + catch ( const Exception& e ) { OSL_TRACE("SFURL_firing_impl() Caught Exception reason %s.", ::rtl::OUStringToOString( e.Message, diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index b503f85..ae9d857 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -393,7 +393,7 @@ Any convertAny( const Any& rVal, const Type& aDestType ) implGetExceptionMsg( ::cppu::getCaughtException() ) ); return aConvertedVal; } - catch( CannotConvertException& e2 ) + catch( const CannotConvertException& e2 ) { ::rtl::OUString aCannotConvertExceptionName ( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.IllegalArgumentException" ) ); @@ -2480,7 +2480,7 @@ void SbUnoObject::doIntrospection( void ) { mxUnoAccess = xIntrospection->inspect( maTmpUnoObj ); } - catch( RuntimeException& e ) + catch( const RuntimeException& e ) { StarBASIC::Error( ERRCODE_BASIC_EXCEPTION, implGetExceptionMsg( e ) ); } @@ -2728,7 +2728,7 @@ SbxVariable* SbUnoObject::Find( const String& rName, SbxClassType t ) unoToSbxValue( pRes, aAny ); } } - catch( NoSuchElementException& e ) + catch( const NoSuchElementException& e ) { StarBASIC::Error( ERRCODE_BASIC_EXCEPTION, implGetExceptionMsg( e ) ); } @@ -2779,7 +2779,7 @@ SbxVariable* SbUnoObject::Find( const String& rName, SbxClassType t ) } } - catch( RuntimeException& e ) + catch( const RuntimeException& e ) { // Establish so that the exeption error will not be overwriten if( !pRes ) @@ -3476,9 +3476,8 @@ SbxVariable* SbUnoClass::Find( const XubString& rName, SbxClassType t ) unoToSbxValue( pRes, aValue ); } } - catch( NoSuchElementException& e1 ) + catch( const NoSuchElementException& ) { - ::rtl::OUString aMsg = implGetExceptionMsg( e1 ); } } @@ -4306,7 +4305,7 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite { aRet = xTypeAccess->getByHierarchicalName( aTypeName ); } - catch( NoSuchElementException& e1 ) + catch( const NoSuchElementException& e1 ) { ::rtl::OUString aNoSuchElementExceptionName ( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.NoSuchElementException" ) ); diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 8151b74..5815e61 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -820,12 +820,12 @@ sal_Bool SfxLibraryContainer::init_Impl( xParser->setDocumentHandler( ::xmlscript::importLibraryContainer( pLibArray ) ); xParser->parseStream( source ); } - catch ( xml::sax::SAXException& e ) + catch ( const xml::sax::SAXException& e ) { SAL_WARN_S("basic", e.Message); return sal_False; } - catch ( io::IOException& e ) + catch ( const io::IOException& e ) { SAL_WARN_S("basic", e.Message); return sal_False; _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits