diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-18 00:05:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-20 11:00:39 +0100 |
commit | b7795f55ccf3971c0f7afb5f74153a0eec7c88fc (patch) | |
tree | 629b5304ba7ee27288221b2a85b51ad2dbeffd9c | |
parent | 1b10ca272fee3f956d3126b5a02136c2c700f7fb (diff) |
catch by const reference
-rw-r--r-- | cui/source/customize/macropg.cxx | 18 | ||||
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 8 | ||||
-rw-r--r-- | cui/source/dialogs/hldocntp.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/optgdlg.cxx | 22 |
4 files changed, 28 insertions, 22 deletions
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 90c6765fa..944d6d0cb 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -344,7 +344,7 @@ sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) { m_xAppEvents->replaceByName( eventName, GetPropsByName( eventName, m_appEventsHash ) ); } - catch( const Exception& ) + catch (const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -361,7 +361,7 @@ sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) { m_xDocEvents->replaceByName( eventName, GetPropsByName( eventName, m_docEventsHash ) ); } - catch( const Exception& ) + catch (const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -375,7 +375,7 @@ sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) } } } - catch(Exception&) + catch (const Exception&) { } // what is the return value about?? @@ -420,7 +420,7 @@ void _SvxMacroTabPage::Reset() } } } - catch(Exception&) + catch (const Exception&) { } DisplayAppEvents(bAppEvents); @@ -763,8 +763,9 @@ void _SvxMacroTabPage::InitAndSetHandler( Reference< container::XNameReplace> xA { m_appEventsHash[ eventNames[nEvent] ] = GetPairFromAny( m_xAppEvents->getByName( eventNames[nEvent] ) ); } - catch (Exception e) - {} + catch (const Exception&) + { + } } if(m_xDocEvents.is()) { @@ -776,8 +777,9 @@ void _SvxMacroTabPage::InitAndSetHandler( Reference< container::XNameReplace> xA { m_docEventsHash[ eventNames[nEvent] ] = GetPairFromAny( m_xDocEvents->getByName( eventNames[nEvent] ) ); } - catch (Exception e) - {} + catch (const Exception&) + { + } } } } diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 07a11c45b..c09912899 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -205,13 +205,13 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, } } } - catch( const ContentCreationException& ) + catch (const ContentCreationException&) { } - catch( const ::com::sun::star::uno::RuntimeException& ) + catch (const ::com::sun::star::uno::RuntimeException&) { } - catch( const ::com::sun::star::uno::Exception& ) + catch (const ::com::sun::star::uno::Exception&) { } } @@ -1091,7 +1091,7 @@ IMPL_LINK( TPGalleryThemeProperties, ClickSearchHdl, void *, EMPTYARG ) } } } - catch(IllegalArgumentException) + catch (const IllegalArgumentException&) { OSL_FAIL( "Folder picker failed with illegal arguments" ); } diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 7bd15f793..212416c64 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -395,7 +395,7 @@ void SvxHyperlinkNewDocTp::DoApply () } } } - catch( uno::Exception ) + catch (const uno::Exception&) { } diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 7cab00aeb..018049c40 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -180,9 +180,12 @@ namespace if ( xEnum.is() && xEnum->hasMoreElements() ) bRet = sal_True; } - - catch( IllegalArgumentException ) {} - catch( ElementExistException ) {} + catch (const IllegalArgumentException&) + { + } + catch (const ElementExistException&) + { + } return bRet; } } @@ -639,7 +642,7 @@ CanvasSettings::CanvasSettings() : ++pCurr; } } - catch( Exception& ) + catch (const Exception&) { } } @@ -677,8 +680,9 @@ sal_Bool CanvasSettings::IsHardwareAccelerationAvailable() const return mbHWAccelAvailable; } } - catch (Exception &) - {} + catch (const Exception&) + { + } ++pCurrImpl; } @@ -1339,7 +1343,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe } } - catch (Exception &e) + catch (const Exception &e) { // we'll just leave the box in it's default setting and won't // even give it event handler... @@ -1522,7 +1526,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) } } } - catch (Exception& e) + catch (const Exception& e) { // we'll just leave the box in it's default setting and won't // even give it event handler... @@ -1757,7 +1761,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) aCTLLang >>= aLocale; eCurLangCTL = MsLangId::convertLocaleToLanguage( aLocale ); } - catch(Exception&) + catch (const Exception&) { } //overwrite them by the values provided by the DocShell |