summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-01-07 15:50:41 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-01-07 15:51:31 +0900
commite4ce7225dd987f9b2f250f055d9688de79931444 (patch)
tree410ae8624915809274fc28759eef78919a980f60 /sw/source
parentd74c77428deba9619c678a59d6442ec281385264 (diff)
catch exception by constant reference
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/edit/edundo.cxx6
-rw-r--r--sw/source/core/tox/toxhlp.cxx12
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx4
-rw-r--r--sw/source/core/unocore/unoport.cxx6
-rw-r--r--sw/source/core/unocore/unorefmk.cxx2
-rw-r--r--sw/source/core/unocore/unosect.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx4
-rw-r--r--sw/source/filter/xml/swxml.cxx10
8 files changed, 23 insertions, 23 deletions
diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx
index 7b2ae832c795..95c925283198 100644
--- a/sw/source/core/edit/edundo.cxx
+++ b/sw/source/core/edit/edundo.cxx
@@ -136,7 +136,7 @@ bool SwEditShell::Undo(sal_uInt16 const nCount)
bRet = GetDoc()->GetIDocumentUndoRedo().Undo()
|| bRet;
}
- } catch (::com::sun::star::uno::Exception & e) {
+ } catch (const ::com::sun::star::uno::Exception & e) {
OSL_TRACE("SwEditShell::Undo(): exception caught:\n %s",
::rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8)
.getStr());
@@ -187,7 +187,7 @@ bool SwEditShell::Redo(sal_uInt16 const nCount)
bRet = GetDoc()->GetIDocumentUndoRedo().Redo()
|| bRet;
}
- } catch (::com::sun::star::uno::Exception & e) {
+ } catch (const ::com::sun::star::uno::Exception & e) {
OSL_TRACE("SwEditShell::Redo(): exception caught:\n %s",
::rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8)
.getStr());
@@ -217,7 +217,7 @@ bool SwEditShell::Repeat(sal_uInt16 const nCount)
::sw::RepeatContext context(*GetDoc(), *GetCrsr());
bRet = GetDoc()->GetIDocumentUndoRedo().Repeat( context, nCount )
|| bRet;
- } catch (::com::sun::star::uno::Exception & e) {
+ } catch (const ::com::sun::star::uno::Exception & e) {
OSL_TRACE("SwEditShell::Repeat(): exception caught:\n %s",
::rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8)
.getStr());
diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx
index 95e5a2056c22..f1ae9862d4b9 100644
--- a/sw/source/core/tox/toxhlp.cxx
+++ b/sw/source/core/tox/toxhlp.cxx
@@ -55,7 +55,7 @@ IndexEntrySupplierWrapper::IndexEntrySupplierWrapper()
x >>= xIES;
}
}
- catch ( UNO_NMSPC::Exception&
+ catch (const UNO_NMSPC::Exception&
#if OSL_DEBUG_LEVEL > 0
e
#endif
@@ -81,7 +81,7 @@ String IndexEntrySupplierWrapper::GetIndexKey( const String& rTxt,
try {
sRet = xIES->getIndexKey( rTxt, rTxtReading, rLocale );
}
- catch ( UNO_NMSPC::Exception&
+ catch (const UNO_NMSPC::Exception&
#if OSL_DEBUG_LEVEL > 0
e
#endif
@@ -102,7 +102,7 @@ String IndexEntrySupplierWrapper::GetFollowingText( sal_Bool bMorePages ) const
try {
sRet = xIES->getIndexFollowPageWord( bMorePages, aLcl );
}
- catch ( UNO_NMSPC::Exception&
+ catch (const UNO_NMSPC::Exception&
#if OSL_DEBUG_LEVEL > 0
e
#endif
@@ -125,7 +125,7 @@ IndexEntrySupplierWrapper::GetAlgorithmList( const STAR_NMSPC::lang::Locale& rLc
try {
sRet = xIES->getAlgorithmList( rLcl );
}
- catch ( UNO_NMSPC::Exception&
+ catch (const UNO_NMSPC::Exception&
#if OSL_DEBUG_LEVEL > 0
e
#endif
@@ -148,7 +148,7 @@ sal_Bool IndexEntrySupplierWrapper::LoadAlgorithm(
try {
bRet = xIES->loadAlgorithm( rLcl, sSortAlgorithm, nOptions );
}
- catch ( UNO_NMSPC::Exception&
+ catch (const UNO_NMSPC::Exception&
#if OSL_DEBUG_LEVEL > 0
e
#endif
@@ -174,7 +174,7 @@ sal_Int16 IndexEntrySupplierWrapper::CompareIndexEntry(
nRet = xIES->compareIndexEntry( rTxt1, rTxtReading1, rLocale1,
rTxt2, rTxtReading2, rLocale2 );
}
- catch ( UNO_NMSPC::Exception&
+ catch (const UNO_NMSPC::Exception&
#if OSL_DEBUG_LEVEL > 0
e
#endif
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index 930eaf9376d9..0f8a4120433e 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -432,7 +432,7 @@ throw (beans::PropertyVetoException, lang::IllegalArgumentException,
{
m_pImpl->SetPropertyValues_Impl( rPropertyNames, rValues );
}
- catch (beans::UnknownPropertyException &rException)
+ catch (const beans::UnknownPropertyException &rException)
{
// wrap the original (here not allowed) exception in
// a lang::WrappedTargetException that gets thrown instead.
@@ -605,7 +605,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
catch (beans::UnknownPropertyException &)
{
// should not occur because property was searched for before
- OSL_FAIL( "unexpected exception catched" );
+ OSL_FAIL( "unexpected exception caught" );
pFailed[ nFailed++ ].Result =
beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
}
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index 57ee034b72ca..334dc04f0a7e 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -483,7 +483,7 @@ void SwXTextPortion::setPropertyValues(
{
SetPropertyValues_Impl( rPropertyNames, rValues );
}
- catch (beans::UnknownPropertyException &rException)
+ catch (const beans::UnknownPropertyException &rException)
{
// wrap the original (here not allowed) exception in
// a lang::WrappedTargetException that gets thrown instead.
@@ -569,7 +569,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SwXTextPortion::setPr
catch (beans::UnknownPropertyException &)
{
// should not occur because property was searched for before
- OSL_FAIL( "unexpected exception catched" );
+ OSL_FAIL( "unexpected exception caught" );
pFailed[ nFailed++ ].Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
}
catch (lang::IllegalArgumentException &)
@@ -681,7 +681,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion:
catch (beans::UnknownPropertyException &)
{
// should not occur because property was searched for before
- OSL_FAIL( "unexpected exception catched" );
+ OSL_FAIL( "unexpected exception caught" );
aResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
}
catch (lang::IllegalArgumentException &)
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index c3b051d8734b..00b069c66971 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -1603,7 +1603,7 @@ getPrefixAndSuffix(
}
} catch (uno::RuntimeException &) {
throw;
- } catch (uno::Exception & e) {
+ } catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPrefixAndSuffix: exception")),
0, uno::makeAny(e));
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 535ff043cb21..836c6790111d 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -946,7 +946,7 @@ throw (beans::PropertyVetoException, lang::IllegalArgumentException,
{
m_pImpl->SetPropertyValues_Impl( rPropertyNames, rValues );
}
- catch (beans::UnknownPropertyException &rException)
+ catch (const beans::UnknownPropertyException &rException)
{
// wrap the original (here not allowed) exception in
// a WrappedTargetException that gets thrown instead.
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index c5cb4c5e4870..9b8b4959e67c 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2153,7 +2153,7 @@ void SwXStyle::setPropertyValues(
{
SetPropertyValues_Impl( rPropertyNames, rValues );
}
- catch (beans::UnknownPropertyException &rException)
+ catch (const beans::UnknownPropertyException &rException)
{
// wrap the original (here not allowed) exception in
// a lang::WrappedTargetException that gets thrown instead.
@@ -3181,7 +3181,7 @@ void SwXPageStyle::setPropertyValues(
{
SetPropertyValues_Impl( rPropertyNames, rValues );
}
- catch (beans::UnknownPropertyException &rException)
+ catch (const beans::UnknownPropertyException &rException)
{
// wrap the original (here not allowed) exception in
// a lang::WrappedTargetException that gets thrown instead.
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index ee20492fa9d4..d0be6210d7fd 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -247,7 +247,7 @@ sal_Int32 ReadThroughComponent(
ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR );
}
}
- catch( xml::sax::SAXException& r)
+ catch(const xml::sax::SAXException& r)
{
packages::zip::ZipIOException aBrokenPackage;
if ( r.WrappedException >>= aBrokenPackage )
@@ -266,7 +266,7 @@ sal_Int32 ReadThroughComponent(
return ERR_SWG_READ_ERROR;
}
- catch( packages::zip::ZipIOException& r)
+ catch(const packages::zip::ZipIOException& r)
{
(void)r;
#if OSL_DEBUG_LEVEL > 0
@@ -278,7 +278,7 @@ sal_Int32 ReadThroughComponent(
#endif
return ERRCODE_IO_BROKENPACKAGE;
}
- catch( io::IOException& r)
+ catch(const io::IOException& r)
{
(void)r;
#if OSL_DEBUG_LEVEL > 0
@@ -290,7 +290,7 @@ sal_Int32 ReadThroughComponent(
#endif
return ERR_SWG_READ_ERROR;
}
- catch( uno::Exception& r)
+ catch(const uno::Exception& r)
{
(void)r;
#if OSL_DEBUG_LEVEL > 0
@@ -891,7 +891,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
pDocSh->GetMedium()->GetInteractionHandler() );
xDMA->loadMetadataFromStorage(xStorage, xBaseURI, xHandler);
}
- catch (lang::WrappedTargetException & e)
+ catch (const lang::WrappedTargetException & e)
{
ucb::InteractiveAugmentedIOException iaioe;
if (e.TargetException >>= iaioe)