diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-13 23:40:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-14 09:56:45 +0100 |
commit | f2ef13b2199f038c43a975258b3b59438e02797d (patch) | |
tree | 97797dcc6b174ff4c9f49f973c5a90e0330889c4 /svtools | |
parent | Precision unused (diff) | |
download | core-f2ef13b2199f038c43a975258b3b59438e02797d.tar.gz core-f2ef13b2199f038c43a975258b3b59438e02797d.zip |
catch by const reference
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/valueacc.cxx | 10 | ||||
-rw-r--r-- | svtools/source/dialogs/insdlg.cxx | 4 | ||||
-rw-r--r-- | svtools/source/filter/filter.cxx | 10 | ||||
-rw-r--r-- | svtools/source/misc/embedhlp.cxx | 12 |
4 files changed, 18 insertions, 18 deletions
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 69e90935dbad..137c17a65faf 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -125,7 +125,7 @@ void ValueSetAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOldValue { (*aIter)->notifyEvent( aEvtObject ); } - catch( uno::Exception& ) + catch(const uno::Exception&) { } @@ -154,7 +154,7 @@ ValueSetAcc* ValueSetAcc::getImplementation( const uno::Reference< uno::XInterfa uno::Reference< lang::XUnoTunnel > xUnoTunnel( rxData, uno::UNO_QUERY ); return( xUnoTunnel.is() ? reinterpret_cast<ValueSetAcc*>(sal::static_int_cast<sal_IntPtr>(xUnoTunnel->getSomething( ValueSetAcc::getUnoTunnelId() ))) : NULL ); } - catch( const ::com::sun::star::uno::Exception& ) + catch(const ::com::sun::star::uno::Exception&) { return NULL; } @@ -719,7 +719,7 @@ void SAL_CALL ValueSetAcc::disposing (void) { (*aListenerIterator)->disposing (aEvent); } - catch( uno::Exception& ) + catch(const uno::Exception&) { // Ignore exceptions. } @@ -864,7 +864,7 @@ ValueItemAcc* ValueItemAcc::getImplementation( const uno::Reference< uno::XInter uno::Reference< lang::XUnoTunnel > xUnoTunnel( rxData, uno::UNO_QUERY ); return( xUnoTunnel.is() ? reinterpret_cast<ValueItemAcc*>(sal::static_int_cast<sal_IntPtr>(xUnoTunnel->getSomething( ValueItemAcc::getUnoTunnelId() ))) : NULL ); } - catch( const ::com::sun::star::uno::Exception& ) + catch(const ::com::sun::star::uno::Exception&) { return NULL; } @@ -932,7 +932,7 @@ sal_Int32 SAL_CALL ValueItemAcc::getAccessibleIndexInParent() { pItem = mpParent->mrParent.ImplGetVisibleItem (i); } - catch (lang::IndexOutOfBoundsException aException) + catch (const lang::IndexOutOfBoundsException&) { pItem = NULL; } diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index b102f3845f4b..7d6bcb9187cf 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -223,9 +223,9 @@ void SvObjectServerList::FillInsertObjects() aObjectServerList.push_back( SvObjectServer( aOleFact, aOleObj ) ); #endif - }catch( container::NoSuchElementException) + }catch(const container::NoSuchElementException&) { - }catch( uno::Exception) + }catch(const uno::Exception&) { } catch(...) diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx index 830082fa6eb0..eb4d4a57ce75 100644 --- a/svtools/source/filter/filter.cxx +++ b/svtools/source/filter/filter.cxx @@ -131,11 +131,11 @@ sal_Bool ImplDirEntryHelper::Exists( const INetURLObject& rObj ) bExists = aCnt.isDocument(); } - catch( ::com::sun::star::ucb::CommandAbortedException& ) + catch(const ::com::sun::star::ucb::CommandAbortedException&) { DBG_ERRORFILE( "CommandAbortedException" ); } - catch( ::com::sun::star::ucb::ContentCreationException& ) + catch(const ::com::sun::star::ucb::ContentCreationException&) { DBG_ERRORFILE( "ContentCreationException" ); } @@ -158,7 +158,7 @@ void ImplDirEntryHelper::Kill( const String& rMainUrl ) aCnt.executeCommand( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" )), ::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) ); } - catch( ::com::sun::star::ucb::CommandAbortedException& ) + catch(const ::com::sun::star::ucb::CommandAbortedException&) { DBG_ERRORFILE( "CommandAbortedException" ); } @@ -1665,7 +1665,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, { pBuf = new sal_uInt8[ nBufSize ]; } - catch (std::bad_alloc) + catch (const std::bad_alloc&) { nStatus = GRFILTER_TOOBIG; } @@ -2020,7 +2020,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& } } } - catch( ::com::sun::star::uno::Exception& ) + catch(const ::com::sun::star::uno::Exception&) { nStatus = GRFILTER_IOERROR; } diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index f31fe586d667..2d589f59b53a 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -339,11 +339,11 @@ void EmbeddedObjectRef::Clear() mxObj->changeState( embed::EmbedStates::LOADED ); xClose->close( sal_True ); } - catch ( util::CloseVetoException& ) + catch (const util::CloseVetoException&) { // there's still someone who needs the object! } - catch ( uno::Exception& ) + catch (const uno::Exception&) { OSL_FAIL( "Error on switching of the object to loaded state and closing!\n" ); } @@ -484,10 +484,10 @@ Size EmbeddedObjectRef::GetSize( MapMode* pTargetMapMode ) const { aSize = mxObj->getVisualAreaSize( mpImp->nViewAspect ); } - catch( embed::NoVisualAreaSizeException& ) + catch(const embed::NoVisualAreaSizeException&) { } - catch( uno::Exception& ) + catch(const uno::Exception&) { OSL_FAIL( "Something went wrong on getting of the size of the object!" ); } @@ -496,7 +496,7 @@ Size EmbeddedObjectRef::GetSize( MapMode* pTargetMapMode ) const { aSourceMapMode = VCLUnoHelper::UnoEmbed2VCLMapUnit( mxObj->getMapUnit( mpImp->nViewAspect ) ); } - catch( uno::Exception ) + catch(const uno::Exception&) { OSL_FAIL( "Can not get the map mode!" ); } @@ -733,7 +733,7 @@ sal_Bool EmbeddedObjectRef::TryRunningState( const uno::Reference < embed::XEmbe if ( xEmbObj->getCurrentState() == embed::EmbedStates::LOADED ) xEmbObj->changeState( embed::EmbedStates::RUNNING ); } - catch ( uno::Exception& ) + catch (const uno::Exception&) { return sal_False; } |