From 7958f8244cc3e554b1339b14c7e589dfcbb0526c Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Wed, 21 Dec 2011 21:57:16 +0900 Subject: catch exception by constant reference --- oox/source/export/SchXMLSeriesHelper.cxx | 6 +++--- oox/source/export/chartexport.cxx | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'oox/source') diff --git a/oox/source/export/SchXMLSeriesHelper.cxx b/oox/source/export/SchXMLSeriesHelper.cxx index e233b8a2a89a..572312237086 100644 --- a/oox/source/export/SchXMLSeriesHelper.cxx +++ b/oox/source/export/SchXMLSeriesHelper.cxx @@ -76,7 +76,7 @@ using ::rtl::OUString; } } } - catch( uno::Exception & ex ) + catch( const uno::Exception & ex ) { (void)ex; // avoid warning for pro build @@ -212,7 +212,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", @@ -250,7 +250,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/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index fb4d01356b59..e757b1ee9561 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -216,7 +216,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen } } } - catch( uno::Exception & ex ) + catch( const uno::Exception & ex ) { (void)ex; // avoid warning for pro build OSL_FAIL( rtl::OUStringToOString( @@ -334,7 +334,7 @@ bool lcl_isSeriesAttachedToFirstAxis( xProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("AttachedAxisIndex") ) ) >>= nAxisIndex; bResult = (0==nAxisIndex); } - catch( uno::Exception & ex ) + catch( const uno::Exception & ex ) { (void)ex; // avoid warning for pro build OSL_FAIL( rtl::OUStringToOString( @@ -495,9 +495,8 @@ bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSeque if( !aHiddenValues.getLength() ) return true; } - catch( uno::Exception& e ) + catch( uno::Exception& ) { - (void)e; // avoid warning return true; } } @@ -787,7 +786,7 @@ void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XCha } } } - catch( uno::Exception & ex ) + catch( const uno::Exception & ex ) { (void)ex; // avoid warning for pro build OSL_FAIL( rtl::OUStringToOString( @@ -2573,7 +2572,7 @@ void ChartExport::exportDataPoints( xPropSet = SchXMLSeriesHelper::createOldAPIDataPointPropertySet( xSeries, nElement, getModel() ); } - catch( uno::Exception & rEx ) + catch( const uno::Exception & rEx ) { (void)rEx; // avoid warning for pro build OSL_TRACE( "Exception caught during Export of data point: %s", -- cgit