summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2011-12-20 12:06:48 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2011-12-20 12:07:50 +0900
commit1f2fd91bf1acc4b6e0b102738c319ce074b7faf7 (patch)
tree6b066dc32fdbac18dd6dea3cadb5999860412b7b /linguistic
parentadd0b7de36f4b0d133906fdd9647d742c33dd63b (diff)
catch exception by constant reference
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/convdic.cxx6
-rw-r--r--linguistic/source/dicimp.cxx6
-rw-r--r--linguistic/source/dlistimp.cxx3
-rw-r--r--linguistic/source/gciterator.cxx2
-rw-r--r--linguistic/source/lngsvcmgr.cxx12
5 files changed, 10 insertions, 19 deletions
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index 4662a360776e..3febdd461f6a 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -99,10 +99,9 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport )
A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW );
xIn = xAccess->openFileRead( rMainURL );
}
- catch (uno::Exception & e)
+ catch (const uno::Exception &)
{
DBG_ASSERT( 0, "failed to get input stream" );
- (void) e;
}
if (!xIn.is())
return;
@@ -274,10 +273,9 @@ void ConvDic::Save()
A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW );
xStream = xAccess->openFileReadWrite( aMainURL );
}
- catch (uno::Exception & e)
+ catch (const uno::Exception &)
{
DBG_ASSERT( 0, "failed to get input stream" );
- (void) e;
}
if (!xStream.is())
return;
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 6d7d1c6672eb..3f6257cc2bc9 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -284,10 +284,9 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL)
A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW );
xStream = xAccess->openFileRead( rMainURL );
}
- catch (uno::Exception & e)
+ catch (const uno::Exception &)
{
DBG_ASSERT( 0, "failed to get input stream" );
- (void) e;
}
if (!xStream.is())
return static_cast< sal_uLong >(-1);
@@ -427,10 +426,9 @@ sal_uLong DictionaryNeo::saveEntries(const OUString &rURL)
A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW );
xStream = xAccess->openFileReadWrite( rURL );
}
- catch (uno::Exception & e)
+ catch (const uno::Exception &)
{
DBG_ASSERT( 0, "failed to get input stream" );
- (void) e;
}
if (!xStream.is())
return static_cast< sal_uLong >(-1);
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index bec538d6c706..ac4f143847a7 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -909,10 +909,9 @@ static sal_Bool IsVers2OrNewer( const String& rFileURL, sal_uInt16& nLng, sal_Bo
A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW );
xStream = xAccess->openFileRead( rFileURL );
}
- catch (uno::Exception & e)
+ catch (const uno::Exception &)
{
DBG_ASSERT( 0, "failed to get input stream" );
- (void) e;
}
DBG_ASSERT( xStream.is(), "failed to get stream for read" );
if (!xStream.is())
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 91c407ca8e74..1f6ef1417efd 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -867,7 +867,7 @@ throw (uno::RuntimeException)
{
throw;
}
- catch (::uno::Exception &rE)
+ catch (const ::uno::Exception &rE)
{
(void) rE;
// ignore
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index b93364b8e50e..6744739b7e30 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -759,9 +759,8 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl()
xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xContext;
xSvc = uno::Reference< linguistic2::XSpellChecker >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
}
- catch (uno::Exception &rEx)
+ catch (const uno::Exception &)
{
- (void) rEx;
DBG_ASSERT( 0, "createInstance failed" );
}
}
@@ -825,9 +824,8 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl()
xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xContext;
xSvc = uno::Reference< linguistic2::XProofreader >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
}
- catch (uno::Exception &rEx)
+ catch (const uno::Exception &)
{
- (void) rEx;
DBG_ASSERT( 0, "createInstance failed" );
}
}
@@ -890,9 +888,8 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl()
xSvc = uno::Reference< linguistic2::XHyphenator >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
}
- catch (uno::Exception &rEx)
+ catch (const uno::Exception &)
{
- (void) rEx;
DBG_ASSERT( 0, "createInstance failed" );
}
}
@@ -957,9 +954,8 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl()
xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xContext;
xSvc = uno::Reference< linguistic2::XThesaurus >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
}
- catch (uno::Exception &rEx)
+ catch (const uno::Exception &)
{
- (void) rEx;
DBG_ASSERT( 0, "createInstance failed" );
}
}