summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-01-09 03:16:33 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-01-09 03:17:20 +0900
commitb35c0ae4ffce43b881d66efe74a19f1bf6299331 (patch)
tree7afefa031973519717e8cb9812ade85de444df02
parentbc2a59e09d1a554b2d55412d1f10a3fa1fe86086 (diff)
catch exception by constant reference
-rw-r--r--vcl/aqua/source/a11y/aqua11yfocuslistener.cxx4
-rw-r--r--writerfilter/qa/cppunittests/qname/testQName.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx3
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx2
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx3
-rw-r--r--writerfilter/source/doctok/WW8DocumentImpl.cxx18
-rw-r--r--writerfilter/source/resourcemodel/TagLogger.cxx2
-rw-r--r--writerfilter/source/resourcemodel/resourcemodel.cxx10
-rw-r--r--writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx2
-rw-r--r--xmloff/source/chart/SchXMLImport.cxx4
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx14
-rw-r--r--xmloff/source/chart/SchXMLSeriesHelper.cxx6
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx3
-rw-r--r--xmloff/source/draw/XMLShapeStyleContext.cxx4
-rw-r--r--xmloff/source/draw/animationexport.cxx9
-rw-r--r--xmloff/source/draw/ximpstyl.cxx4
-rw-r--r--xmloff/source/style/xmlimppr.cxx8
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx2
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_import.cxx3
-rw-r--r--xmlscript/source/xmlflat_imexp/xmlbas_export.cxx8
-rw-r--r--xmlscript/source/xmlflat_imexp/xmlbas_import.cxx14
-rw-r--r--xmlscript/test/imexp.cxx6
-rw-r--r--xmlsecurity/tools/standalone/csfit/certmngr.cxx2
-rw-r--r--xmlsecurity/tools/standalone/csfit/decrypter.cxx2
-rw-r--r--xmlsecurity/tools/standalone/csfit/encrypter.cxx2
-rw-r--r--xmlsecurity/tools/standalone/csfit/signer.cxx2
-rw-r--r--xmlsecurity/tools/standalone/csfit/verifier.cxx2
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/certmngr.cxx2
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/decrypter.cxx2
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/encrypter.cxx2
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/signer.cxx2
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/verifier.cxx2
33 files changed, 73 insertions, 82 deletions
diff --git a/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx b/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
index 0b2fe1902ed9..62dc7900939c 100644
--- a/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
+++ b/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
@@ -68,7 +68,7 @@ id AquaA11yFocusListener::getFocusedUIElement()
if( xContext.is() )
m_focusedObject = [ AquaA11yFactory wrapperForAccessibleContext: xContext ];
}
- } catch( RuntimeException ) {
+ } catch(const RuntimeException &) {
// intentionally do nothing ..
}
}
@@ -95,7 +95,7 @@ AquaA11yFocusListener::focusedObjectChanged(const Reference< XAccessible >& xAcc
NSAccessibilityPostNotification(m_focusedObject, NSAccessibilityFocusedUIElementChangedNotification);
}
}
- } catch( RuntimeException ) {
+ } catch(const RuntimeException &) {
// intentionally do nothing ..
}
}
diff --git a/writerfilter/qa/cppunittests/qname/testQName.cxx b/writerfilter/qa/cppunittests/qname/testQName.cxx
index 2a2b26e8bcf4..1c0e24d08739 100644
--- a/writerfilter/qa/cppunittests/qname/testQName.cxx
+++ b/writerfilter/qa/cppunittests/qname/testQName.cxx
@@ -103,7 +103,7 @@ public:
sprintf(buf, "name%i", i++);
testAdd("myns", buf);
}
- } catch (std::logic_error &e)
+ } catch (const std::logic_error &)
{
// only way to exit this function
flag=true;
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 6b0442450a27..f9acfaa6165d 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -714,7 +714,7 @@ void DomainMapperTableHandler::endTable()
m_xTableRange = xTable->getAnchor( );
}
}
- catch ( lang::IllegalArgumentException &e )
+ catch ( const lang::IllegalArgumentException &e )
{
#ifdef DEBUG_DMAPPER_TABLE_HANDLER
fprintf( stderr, "Conversion to table error: %s\n",
@@ -722,7 +722,7 @@ void DomainMapperTableHandler::endTable()
dmapper_logger->chars("failed to import table!");
#endif
}
- catch ( uno::Exception &e )
+ catch ( const uno::Exception &e )
{
#ifdef DEBUG_DMAPPER_TABLE_HANDLER
fprintf( stderr, "Exception during table creation: %s\n",
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 8352cddf9db9..3137be1e7dbd 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3014,9 +3014,8 @@ void DomainMapper_Impl::CloseFieldCommand()
//set the text field if there is any
pContext->SetTextField( uno::Reference< text::XTextField >( xFieldInterface, uno::UNO_QUERY ) );
}
- catch( uno::Exception& rEx)
+ catch( const uno::Exception& )
{
- (void)rEx;
OSL_FAIL( "Exception in CloseFieldCommand()" );
}
pContext->SetCommandCompleted();
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 52c22dfa92fb..8aa0cb17da1a 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -910,7 +910,7 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
uno::makeAny( aSize.Width ) );
}
}
- catch( const beans::UnknownPropertyException )
+ catch( const beans::UnknownPropertyException & )
{
// It isn't a graphic image
}
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 6b824b26cd86..a187379a32d6 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -911,9 +911,8 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
}
}
}
- catch( uno::Exception& rEx)
+ catch( const uno::Exception& )
{
- (void)rEx;
OSL_FAIL( "Styles could not be imported completely");
}
}
diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx
index 407ea2dfcf4d..b5e15edb90b6 100644
--- a/writerfilter/source/doctok/WW8DocumentImpl.cxx
+++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx
@@ -191,7 +191,7 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false)
mpDataStream = getSubStream(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM
("Data")));
}
- catch (ExceptionNotFound)
+ catch (const ExceptionNotFound &)
{
}
@@ -200,7 +200,7 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false)
mpCompObjStream = getSubStream(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM
("\1CompObj")));
}
- catch (ExceptionNotFound)
+ catch (const ExceptionNotFound &)
{
}
@@ -635,13 +635,13 @@ void WW8DocumentImpl::parseBinTableCpAndFcs(WW8BinTable & rTable,
mCpAndFcs.insert(aCpAndFc);
}
- catch (ExceptionNotFound &e)
+ catch (const ExceptionNotFound &e)
{
clog << e.getText() << endl;
}
}
}
- catch (ExceptionNotFound &e)
+ catch (const ExceptionNotFound &e)
{
clog << e.getText() << endl;
}
@@ -838,7 +838,7 @@ writerfilter::Reference<Properties>::Pointer_t WW8DocumentImpl::getProperties
pResult = pFKP->getProperties(rCpAndFc.getFc());
}
- catch (ExceptionOutOfBounds)
+ catch (const ExceptionOutOfBounds &)
{
}
}
@@ -978,7 +978,7 @@ writerfilter::Reference<Table>::Pointer_t WW8DocumentImpl::getListTable() const
pResult = writerfilter::Reference<Table>::Pointer_t(pList);
}
- catch (ExceptionOutOfBounds) {
+ catch (const ExceptionOutOfBounds &) {
}
}
@@ -1002,7 +1002,7 @@ writerfilter::Reference<Table>::Pointer_t WW8DocumentImpl::getLFOTable() const
pResult = writerfilter::Reference<Table>::Pointer_t(pLFOs);
}
- catch (Exception &e)
+ catch (const Exception &e)
{
clog << e.getText() << endl;
}
@@ -1619,7 +1619,7 @@ void WW8DocumentImpl::resolve(Stream & rStream)
if (pStyleSheet.get() != NULL)
rStream.table(NS_rtf::LN_STYLESHEET, pStyleSheet);
}
- catch (Exception &e)
+ catch (const Exception &e)
{
clog << e.getText() << endl;
}
@@ -2067,7 +2067,7 @@ BookmarkHelper::getBookmark(const CpAndFc & rCpAndFc)
pResult = writerfilter::Reference<Properties>::Pointer_t
(new Bookmark(getBKF(rCpAndFc), aName));
}
- catch (ExceptionNotFound &e)
+ catch (const ExceptionNotFound &e)
{
clog << e.getText() << endl;
}
diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx
index 7ee16fe22367..f71971ecfcc4 100644
--- a/writerfilter/source/resourcemodel/TagLogger.cxx
+++ b/writerfilter/source/resourcemodel/TagLogger.cxx
@@ -139,7 +139,7 @@ namespace writerfilter
{
attribute( "value", rPropSet->getPropertyValue( sName ) );
}
- catch (uno::Exception)
+ catch (const uno::Exception &)
{
startElement( "exception" );
diff --git a/writerfilter/source/resourcemodel/resourcemodel.cxx b/writerfilter/source/resourcemodel/resourcemodel.cxx
index bd230ad09f06..727296b21ead 100644
--- a/writerfilter/source/resourcemodel/resourcemodel.cxx
+++ b/writerfilter/source/resourcemodel/resourcemodel.cxx
@@ -383,7 +383,7 @@ void WW8StreamHandler::table(Id name, writerfilter::Reference<Table>::Pointer_t
{
ref->resolve(aHandler);
}
- catch (Exception &e)
+ catch (const Exception &e)
{
output.addItem("<exception>" + e.getText() + "</exception>");
}
@@ -442,7 +442,7 @@ void WW8PropertiesHandler::attribute(Id name, Value & val)
{
pProps->resolve(*this);
}
- catch (ExceptionOutOfBounds)
+ catch (const ExceptionOutOfBounds &)
{
}
@@ -459,7 +459,7 @@ void WW8PropertiesHandler::attribute(Id name, Value & val)
pStream->resolve(aHandler);
}
- catch (ExceptionOutOfBounds)
+ catch (const ExceptionOutOfBounds &)
{
}
}
@@ -474,7 +474,7 @@ void WW8PropertiesHandler::attribute(Id name, Value & val)
pBinObj->resolve(aHandler);
}
- catch (ExceptionOutOfBounds)
+ catch (const ExceptionOutOfBounds &)
{
}
}
@@ -539,7 +539,7 @@ void WW8TableHandler::entry(int /*pos*/,
{
ref->resolve(aHandler);
}
- catch (Exception &e)
+ catch (const Exception &e)
{
output.addItem("<exception>" + e.getText() + "</exception>");
output.addItem("</tableentry>");
diff --git a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx
index 55f66b551a75..c1b67e84dae0 100644
--- a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx
+++ b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx
@@ -231,7 +231,7 @@ sal_Int32 SAL_CALL AnalyzeService::run
xInputStream->closeInput();
}
- catch (Exception &e)
+ catch (const Exception &e)
{
fprintf(stdout, "<exception>%s</exception>\n",
e.getText().c_str());
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index 9e95e9a4379d..8de0a45f9029 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -461,7 +461,7 @@ void SchXMLImportHelper::DeleteDataSeries(
}
}
}
- catch( uno::Exception & ex )
+ catch( const uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
OSL_FAIL( OUStringToOString(
@@ -544,7 +544,7 @@ Reference< chart2::XDataSeries > SchXMLImportHelper::GetNewDataSeries(
}
}
}
- catch( uno::Exception & ex )
+ catch( const uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
OSL_FAIL( OUStringToOString(
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 871ad046520a..cdacb258204c 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -459,7 +459,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
Reference< chart2::data::XDataSink > xSink( m_xSeries, uno::UNO_QUERY_THROW );
xSink->setData( aSeq );
}
- catch( uno::Exception & ex )
+ catch( const uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
OSL_FAIL( ::rtl::OUStringToOString(
@@ -488,9 +488,8 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
}
}
}
- catch( uno::Exception & ex )
+ catch( const uno::Exception & )
{
- (void)ex; // avoid warning for pro build
}
}
@@ -855,7 +854,7 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe
}
}
}
- catch( uno::Exception & rEx )
+ catch( const uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
OSL_TRACE( "Exception caught during setting styles to series: %s",
@@ -939,7 +938,7 @@ void SchXMLSeries2Context::setStylesToStatisticsObjects( SeriesDefaultsAndStyles
xRegCurve->setEquationProperties( iStyle->m_xEquationProperties );
}
}
- catch( uno::Exception & rEx )
+ catch( const uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
OSL_TRACE( "Exception caught during setting styles to series: %s",
@@ -1015,9 +1014,8 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri
if( bSwitchOffLinesForScatter )
xPointProp->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Lines")),uno::makeAny(sal_False));
}
- catch( uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- (void)rEx; // avoid warning for pro build
}
if( !rCurrStyleName.equals( iStyle->msStyleName ) )
@@ -1038,7 +1036,7 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri
lcl_resetSymbolSizeForPointsIfNecessary( xPointProp, rImport, pPropStyleContext, pStylesCtxt );
}
}
- catch( uno::Exception & rEx )
+ catch( const uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
OSL_TRACE( "Exception caught during setting styles to data points: %s",
diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx
index 4ad0ef72576b..0b7b042c1d2b 100644
--- a/xmloff/source/chart/SchXMLSeriesHelper.cxx
+++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx
@@ -77,7 +77,7 @@ using ::rtl::OUString;
}
}
}
- catch( uno::Exception & ex )
+ catch( const uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
@@ -213,7 +213,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPISeriesProp
}
}
}
- catch( uno::Exception & rEx )
+ catch( const uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
OSL_TRACE( "Exception caught SchXMLSeriesHelper::createOldAPISeriesPropertySet: %s",
@@ -251,7 +251,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointP
}
}
}
- catch( uno::Exception & rEx )
+ catch( const uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index 1cf487e43209..bce21c7e63ea 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -1127,9 +1127,8 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
}
}
}
- catch( uno::Exception & ex )
+ catch( const uno::Exception & )
{
- (void)ex; // avoid warning for pro build
}
}
}
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx
index 75fa866e431f..6a8c84783a4b 100644
--- a/xmloff/source/draw/XMLShapeStyleContext.cxx
+++ b/xmloff/source/draw/XMLShapeStyleContext.cxx
@@ -263,7 +263,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet
rPropSet->setPropertyValue( rPropertyName, Any( sStyleName ) );
}
}
- catch ( ::com::sun::star::lang::IllegalArgumentException& e )
+ catch ( const ::com::sun::star::lang::IllegalArgumentException& e )
{
Sequence<OUString> aSeq(1);
aSeq[0] = sStyleName;
@@ -289,7 +289,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet
rPropSet->setPropertyValue( rPropertyName, rState.maValue );
}
}
- catch ( ::com::sun::star::lang::IllegalArgumentException& e )
+ catch ( const ::com::sun::star::lang::IllegalArgumentException& e )
{
Sequence<OUString> aSeq;
GetImport().SetError(
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 740903d61ca6..36bb889c141b 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -1364,9 +1364,8 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat
SvXMLElementExport aElement( mrExport, XML_NAMESPACE_ANIMATION, eElementToken, sal_True, sal_True );
}
- catch( Exception& e )
+ catch( const Exception& )
{
- (void)e;
OSL_FAIL( "xmloff::AnimationsExporterImpl::exportAnimate(), Exception cought!" );
}
}
@@ -1397,9 +1396,8 @@ void AnimationsExporterImpl::exportAudio( const Reference< XAudio >& xAudio )
SvXMLElementExport aElement( mrExport, XML_NAMESPACE_ANIMATION, XML_AUDIO, sal_True, sal_True );
}
- catch( Exception& e )
+ catch( const Exception& )
{
- (void)e;
OSL_FAIL( "xmloff::AnimationsExporterImpl::exportAudio(), exception caught!" );
}
}
@@ -1425,9 +1423,8 @@ void AnimationsExporterImpl::exportCommand( const Reference< XCommand >& xComman
SvXMLElementExport aElement( mrExport, XML_NAMESPACE_ANIMATION, XML_COMMAND, sal_True, sal_True );
}
- catch( Exception& e )
+ catch( const Exception& )
{
- (void)e;
OSL_FAIL( "xmloff::AnimationsExporterImpl::exportCommand(), exception caught!" );
}
}
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 7d8d88907814..74a96359ff64 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -1441,7 +1441,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAc
}
}
}
- catch( Exception& e)
+ catch(const Exception& e)
{
uno::Sequence<OUString> aSeq(0);
const_cast<SdXMLImport*>(&GetSdImport())->SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, NULL );
@@ -1481,7 +1481,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAc
xStyle->setParentStyle( sParentStyleDisplayName );
}
}
- catch( Exception& e )
+ catch( const Exception& e )
{
uno::Sequence<OUString> aSeq(0);
const_cast<SdXMLImport*>(&GetSdImport())->SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, NULL );
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index 7953c5aba347..9793a97ed06f 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -508,7 +508,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillPropertySet(
rPropSet->setPropertyValue( rPropName, rProp.maValue );
bSet = sal_True;
}
- catch ( IllegalArgumentException& e )
+ catch ( const IllegalArgumentException& e )
{
// illegal value: check whether this property is
// allowed to throw this exception
@@ -521,7 +521,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillPropertySet(
aSeq, e.Message, NULL );
}
}
- catch ( UnknownPropertyException& e )
+ catch ( const UnknownPropertyException& e )
{
// unknown property: This is always an error!
Sequence<OUString> aSeq(1);
@@ -530,7 +530,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillPropertySet(
XMLERROR_STYLE_PROP_UNKNOWN | XMLERROR_FLAG_ERROR,
aSeq, e.Message, NULL );
}
- catch ( PropertyVetoException& e )
+ catch ( const PropertyVetoException& e )
{
// property veto: this shouldn't happen
Sequence<OUString> aSeq(1);
@@ -539,7 +539,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillPropertySet(
XMLERROR_STYLE_PROP_OTHER | XMLERROR_FLAG_ERROR,
aSeq, e.Message, NULL );
}
- catch ( WrappedTargetException& e )
+ catch ( const WrappedTargetException& e )
{
// wrapped target: this shouldn't happen either
Sequence<OUString> aSeq(1);
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index fe348284909e..c59d630e46bc 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -718,7 +718,7 @@ void FormattedFieldElement::endElement()
ctx.getControlModel()->setPropertyValue(
OUString( RTL_CONSTASCII_USTRINGPARAM("FormatKey") ), makeAny( nKey ) );
}
- catch (util::MalformedNumberFormatException & exc)
+ catch (const util::MalformedNumberFormatException & exc)
{
OSL_FAIL( "### util::MalformedNumberFormatException occurred!" );
// rethrow
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index b0717ef288b8..e0134088e7f1 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -1020,9 +1020,8 @@ bool ImportContext::importImageURLProperty(
if ( aTmp.getLength() )
sURL = aTmp;
}
- catch( uno::Exception& e )
+ catch( const uno::Exception& )
{
- (void)e;
return false;
}
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
index 5be275f663f6..2a1741afb2fc 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
@@ -420,25 +420,25 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
m_xHandler->endDocument();
}
}
- catch ( container::NoSuchElementException& e )
+ catch ( const container::NoSuchElementException& e )
{
OSL_TRACE( "XMLBasicExporterBase::filter: caught NoSuchElementException reason %s",
::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
bReturn = sal_False;
}
- catch ( lang::IllegalArgumentException& e )
+ catch ( const lang::IllegalArgumentException& e )
{
OSL_TRACE( "XMLBasicExporterBase::filter: caught IllegalArgumentException reason %s",
::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
bReturn = sal_False;
}
- catch ( lang::WrappedTargetException& e )
+ catch ( const lang::WrappedTargetException& e )
{
OSL_TRACE( "XMLBasicExporterBase::filter: caught WrappedTargetException reason %s",
::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
bReturn = sal_False;
}
- catch ( xml::sax::SAXException& e )
+ catch ( const xml::sax::SAXException& e )
{
OSL_TRACE( "XMLBasicExporterBase::filter: caught SAXException reason %s",
::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
index fdf0443e30b7..0f0af3b6295a 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
@@ -240,12 +240,12 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
if ( xLib.is() )
xElement.set( new BasicElementBase( rLocalName, xAttributes, this, m_pImport ) );
}
- catch ( container::ElementExistException& e )
+ catch ( const container::ElementExistException& e )
{
OSL_TRACE( "BasicLibrariesElement::startChildElement: caught ElementExceptionExist reason %s",
::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
- catch ( lang::IllegalArgumentException& e )
+ catch ( const lang::IllegalArgumentException& e )
{
OSL_TRACE( "BasicLibrariesElement::startChildElement: caught IllegalArgumentException reason %s",
::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
@@ -286,7 +286,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
if ( xLib.is() )
xElement.set( new BasicEmbeddedLibraryElement( rLocalName, xAttributes, this, m_pImport, m_xLibContainer, aName, bReadOnly ) );
}
- catch ( lang::IllegalArgumentException& e )
+ catch ( const lang::IllegalArgumentException& e )
{
OSL_TRACE( "BasicLibrariesElement::startChildElement: caught IllegalArgumentException reason %s",
::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
@@ -331,7 +331,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
if ( m_xLibContainer.is() && m_xLibContainer->hasByName( m_aLibName ) )
m_xLibContainer->getByName( m_aLibName ) >>= m_xLib;
}
- catch ( lang::WrappedTargetException& e )
+ catch ( const lang::WrappedTargetException& e )
{
OSL_TRACE( "BasicEmbeddedLibraryElement CTOR: caught WrappedTargetException reason %s",
::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
@@ -486,17 +486,17 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
m_xLib->insertByName( m_aName, aElement );
}
}
- catch ( container::ElementExistException& e )
+ catch ( const container::ElementExistException& e )
{
OSL_TRACE( "BasicSourceCodeElement::endElement: caught ElementExceptionExist reason %s",
::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
- catch ( lang::IllegalArgumentException& e )
+ catch ( const lang::IllegalArgumentException& e )
{
OSL_TRACE( "BasicSourceCodeElement::endElement: caught IllegalArgumentException reason %s",
::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
- catch ( lang::WrappedTargetException& e )
+ catch ( const lang::WrappedTargetException& e )
{
OSL_TRACE( "BasicSourceCodeElement::endElement: caught WrappedTargetException reason %s",
::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx
index af53c972364e..eadedce6b0ff 100644
--- a/xmlscript/test/imexp.cxx
+++ b/xmlscript/test/imexp.cxx
@@ -88,7 +88,7 @@ Reference< XComponentContext > createInitialComponentContext(
return defaultBootstrap_InitialComponentContext( unorc );
}
- catch( Exception& rExc )
+ catch( const Exception& rExc )
{
OString aStr( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
OSL_FAIL( aStr.getStr() );
@@ -213,7 +213,7 @@ void MyApp::Main()
exportToFile( aParam2.getStr(), xModel, xContext );
}
}
- catch (xml::sax::SAXException & rExc)
+ catch (const xml::sax::SAXException & rExc)
{
OString aStr( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
uno::Exception exc;
@@ -224,7 +224,7 @@ void MyApp::Main()
}
OSL_FAIL( aStr.getStr() );
}
- catch (uno::Exception & rExc)
+ catch (const uno::Exception & rExc)
{
OString aStr( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
OSL_FAIL( aStr.getStr() );
diff --git a/xmlsecurity/tools/standalone/csfit/certmngr.cxx b/xmlsecurity/tools/standalone/csfit/certmngr.cxx
index b5257911623c..82d8d5b9e4e2 100644
--- a/xmlsecurity/tools/standalone/csfit/certmngr.cxx
+++ b/xmlsecurity/tools/standalone/csfit/certmngr.cxx
@@ -169,7 +169,7 @@ int SAL_CALL main( int argc, char **argv )
sal_Int32 validity = pSecEnv->verifyCertificate( xPersonalCerts[i] ) ;
fprintf( stdout, "The certificate validities are %d\n", validity ) ;
}
- } catch( Exception& e ) {
+ } catch( const Exception& e ) {
fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
goto done ;
}
diff --git a/xmlsecurity/tools/standalone/csfit/decrypter.cxx b/xmlsecurity/tools/standalone/csfit/decrypter.cxx
index c3d27a887b8f..a39352c629ce 100644
--- a/xmlsecurity/tools/standalone/csfit/decrypter.cxx
+++ b/xmlsecurity/tools/standalone/csfit/decrypter.cxx
@@ -236,7 +236,7 @@ int SAL_CALL main( int argc, char **argv )
OSL_ENSURE( xDecrRes.is() ,
"Decryptor - "
"Cannot decrypt the xml document" ) ;
- } catch( Exception& e ) {
+ } catch( const Exception& e ) {
fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
goto done ;
}
diff --git a/xmlsecurity/tools/standalone/csfit/encrypter.cxx b/xmlsecurity/tools/standalone/csfit/encrypter.cxx
index 2000b037991c..bcf9c275eaaf 100644
--- a/xmlsecurity/tools/standalone/csfit/encrypter.cxx
+++ b/xmlsecurity/tools/standalone/csfit/encrypter.cxx
@@ -269,7 +269,7 @@ int SAL_CALL main( int argc, char **argv )
OSL_ENSURE( xTemplate.is() ,
"Encryptor - "
"Cannot encrypt the xml document" ) ;
- } catch( Exception& e ) {
+ } catch( const Exception& e ) {
fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
goto done ;
}
diff --git a/xmlsecurity/tools/standalone/csfit/signer.cxx b/xmlsecurity/tools/standalone/csfit/signer.cxx
index ee21c0d5fec6..96cf72d2ae71 100644
--- a/xmlsecurity/tools/standalone/csfit/signer.cxx
+++ b/xmlsecurity/tools/standalone/csfit/signer.cxx
@@ -326,7 +326,7 @@ int SAL_CALL main( int argc, char **argv )
OSL_ENSURE( xTemplate.is() ,
"Signer - "
"Cannot generate the xml signature" ) ;
- } catch( Exception& e ) {
+ } catch( const Exception& e ) {
fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
goto done ;
}
diff --git a/xmlsecurity/tools/standalone/csfit/verifier.cxx b/xmlsecurity/tools/standalone/csfit/verifier.cxx
index ecca4020c719..a624f793eefd 100644
--- a/xmlsecurity/tools/standalone/csfit/verifier.cxx
+++ b/xmlsecurity/tools/standalone/csfit/verifier.cxx
@@ -313,7 +313,7 @@ int SAL_CALL main( int argc, char **argv )
} else {
printf( "Signature is VALID!\n" ) ;
}
- } catch( Exception& e ) {
+ } catch( const Exception& e ) {
fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
goto done ;
}
diff --git a/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx b/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx
index 9ff7ae36e20a..04ddd9860f7f 100644
--- a/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx
@@ -135,7 +135,7 @@ int SAL_CALL main( int argc, char **argv )
fprintf( stdout, "The certificate validities are %d\n", validity ) ;
}
- } catch( Exception& e ) {
+ } catch( const Exception& e ) {
fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
goto done ;
}
diff --git a/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx b/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx
index b2a08629880b..259d9cef89fa 100644
--- a/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx
@@ -210,7 +210,7 @@ int SAL_CALL main( int argc, char **argv )
OSL_ENSURE( xDecrRes.is() ,
"Decryptor - "
"Cannot decrypt the xml document" ) ;
- } catch( Exception& e ) {
+ } catch( const Exception& e ) {
fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
goto done ;
}
diff --git a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx b/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx
index 0312f271e0ea..1645163a1894 100644
--- a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx
@@ -267,7 +267,7 @@ int SAL_CALL main( int argc, char **argv )
{
fprintf( stdout, "Operation fails.\n") ;
}
- } catch( Exception& e ) {
+ } catch( const Exception& e ) {
fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
goto done ;
}
diff --git a/xmlsecurity/tools/standalone/mscsfit/signer.cxx b/xmlsecurity/tools/standalone/mscsfit/signer.cxx
index 0c7fbecba9fa..9e96e4fc40ec 100644
--- a/xmlsecurity/tools/standalone/mscsfit/signer.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/signer.cxx
@@ -299,7 +299,7 @@ int SAL_CALL main( int argc, char **argv )
{
fprintf( stdout, "Operation fails.\n") ;
}
- } catch( Exception& e ) {
+ } catch( const Exception& e ) {
fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
goto done ;
}
diff --git a/xmlsecurity/tools/standalone/mscsfit/verifier.cxx b/xmlsecurity/tools/standalone/mscsfit/verifier.cxx
index 74d827dd08e6..2278d10db4ef 100644
--- a/xmlsecurity/tools/standalone/mscsfit/verifier.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/verifier.cxx
@@ -296,7 +296,7 @@ int SAL_CALL main( int argc, char **argv )
{
fprintf( stdout, "Operation fails.\n") ;
}
- } catch( Exception& e ) {
+ } catch( const Exception& e ) {
fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
goto done ;
}