summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-18 00:05:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-20 11:00:39 +0100
commitcdf7a764e37c761fb1b3e4cab4c45c8570c6cb9d (patch)
treebcfa760f4654fc8a31e06ff5a24cafa42e754ac1 /cui
parent0950764b8e80151f3fca346a805daf6feb1df4fc (diff)
catch by const reference
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/macropg.cxx18
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx8
-rw-r--r--cui/source/dialogs/hldocntp.cxx2
-rw-r--r--cui/source/options/optgdlg.cxx22
4 files changed, 28 insertions, 22 deletions
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 4ca097865063..26847cc25666 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 07a11c45bcae..c099128991bb 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 356416a61753..ae30fa0b5f4c 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 03f35d6d1111..503e4bb7778e 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