summaryrefslogtreecommitdiff
path: root/xmloff
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 /xmloff
parentbc2a59e09d1a554b2d55412d1f10a3fa1fe86086 (diff)
catch exception by constant reference
Diffstat (limited to 'xmloff')
-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
8 files changed, 23 insertions, 29 deletions
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);