summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-16 00:26:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-16 09:15:37 +0100
commit43afab8818d7bca24897ddee9b74fbeb74bf4c56 (patch)
tree97b161e5cc5dbe12129681365dc2c6f2ed745926 /xmloff
parent9e98f12db714b8a1a8cc64234bb4eea26e936166 (diff)
catch by const reference
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/MultiPropertySetHandler.hxx4
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx2
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx16
-rw-r--r--xmloff/source/chart/SchXMLLegendContext.cxx4
-rw-r--r--xmloff/source/core/xmlexp.cxx79
-rw-r--r--xmloff/source/draw/XMLImageMapContext.cxx2
-rw-r--r--xmloff/source/draw/animexp.cxx7
-rw-r--r--xmloff/source/draw/animimp.cxx2
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx13
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx5
-rw-r--r--xmloff/source/draw/shapeexport.cxx14
-rw-r--r--xmloff/source/draw/ximppage.cxx7
-rw-r--r--xmloff/source/draw/ximpshap.cxx38
-rw-r--r--xmloff/source/meta/xmlmetai.cxx10
-rw-r--r--xmloff/source/style/prstylei.cxx2
-rw-r--r--xmloff/source/style/styleexp.cxx2
-rw-r--r--xmloff/source/table/XMLTableExport.cxx19
-rw-r--r--xmloff/source/text/XMLIndexTOCContext.cxx2
-rw-r--r--xmloff/source/text/XMLRedlineExport.cxx2
-rw-r--r--xmloff/source/text/txtfldi.cxx11
-rw-r--r--xmloff/source/text/txtimp.cxx10
21 files changed, 128 insertions, 123 deletions
diff --git a/xmloff/source/chart/MultiPropertySetHandler.hxx b/xmloff/source/chart/MultiPropertySetHandler.hxx
index 160b9f218807..ab0ce3ae389d 100644
--- a/xmloff/source/chart/MultiPropertySetHandler.hxx
+++ b/xmloff/source/chart/MultiPropertySetHandler.hxx
@@ -246,7 +246,7 @@ sal_Bool MultiPropertySetHandler::MultiGet (const ::com::sun::star::uno::Se
for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); I++)
I->second->SetValue (aValueList[i++]);
}
- catch (::com::sun::star::beans::UnknownPropertyException e)
+ catch (const ::com::sun::star::beans::UnknownPropertyException&)
{
return sal_False;
}
@@ -272,7 +272,7 @@ sal_Bool MultiPropertySetHandler::SingleGet (const ::com::sun::star::uno::Se
for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); I++)
I->second->SetValue (xSingleSet->getPropertyValue (rNameList[i++]));
}
- catch (::com::sun::star::beans::UnknownPropertyException e)
+ catch (const ::com::sun::star::beans::UnknownPropertyException&)
{
return sal_False;
}
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 6cb029d9b1bf..f49e1b571fc6 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -275,7 +275,7 @@ void XMLChartExportPropertyMapper::ContextFilter(
if( bAuto )
property->mnIndex = -1;
}
- catch( beans::UnknownPropertyException )
+ catch(const beans::UnknownPropertyException&)
{
}
}
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index ccce0fc6bb33..fd245ac20590 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -115,7 +115,7 @@ void lcl_MoveDataToCandleStickSeries(
xSink->setData( aData );
}
}
- catch( uno::Exception & )
+ catch(const uno::Exception&)
{
OSL_FAIL( "Exception caught while moving data to candlestick series" );
}
@@ -173,7 +173,7 @@ void lcl_removeEmptyChartTypeGroups( const uno::Reference< chart2::XChartDocumen
}
}
}
- catch( uno::Exception & ex )
+ catch(const uno::Exception& ex)
{
String aStr( ex.Message );
ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
@@ -370,7 +370,7 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut
maChartTypeServiceName = SchXMLTools::GetNewChartTypeName( aOldChartTypeName );
xDocProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RefreshAddInAllowed" )) , uno::makeAny( sal_False) );
}
- catch( uno::Exception & )
+ catch(const uno::Exception&)
{
OSL_FAIL( "Exception during import SchXMLChartContext::StartElement" );
}
@@ -709,7 +709,7 @@ void SchXMLChartContext::EndElement()
aAny <<= maMainTitle;
xTitleProp->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "String" )), aAny );
}
- catch( beans::UnknownPropertyException )
+ catch(const beans::UnknownPropertyException&)
{
OSL_FAIL( "Property String for Title not available" );
}
@@ -726,7 +726,7 @@ void SchXMLChartContext::EndElement()
aAny <<= maSubTitle;
xTitleProp->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "String" )), aAny );
}
- catch( beans::UnknownPropertyException )
+ catch(const beans::UnknownPropertyException&)
{
OSL_FAIL( "Property String for Title not available" );
}
@@ -826,7 +826,7 @@ void SchXMLChartContext::EndElement()
// (analogously mbColHasLabels means we have "row-descriptions")
lcl_ApplyDataFromRectangularRangeToDiagram( xNewDoc, msChartAddress, meDataRowSource, mbRowHasLabels, mbColHasLabels, bHasOwnData, msColTrans, msRowTrans );
}
- catch( uno::Exception & )
+ catch(const uno::Exception&)
{
//try to fallback to internal data
OSL_FAIL( "Exception during import SchXMLChartContext::lcl_ApplyDataFromRectangularRangeToDiagram try to fallback to internal data" );
@@ -842,7 +842,7 @@ void SchXMLChartContext::EndElement()
{
lcl_ApplyDataFromRectangularRangeToDiagram( xNewDoc, msChartAddress, meDataRowSource, mbRowHasLabels, mbColHasLabels, bHasOwnData, msColTrans, msRowTrans );
}
- catch( uno::Exception & )
+ catch(const uno::Exception&)
{
OSL_FAIL( "Exception during import SchXMLChartContext::lcl_ApplyDataFromRectangularRangeToDiagram fallback to internal data failed also" );
}
@@ -994,7 +994,7 @@ void SchXMLChartContext::MergeSeriesForStockChart()
xDSContainer->setDataSeries( aNewSeries );
}
}
- catch( uno::Exception & )
+ catch(const uno::Exception&)
{
OSL_FAIL( "Exception while merging series for stock chart" );
}
diff --git a/xmloff/source/chart/SchXMLLegendContext.cxx b/xmloff/source/chart/SchXMLLegendContext.cxx
index c85353d7ca36..a1ce1484f8c0 100644
--- a/xmloff/source/chart/SchXMLLegendContext.cxx
+++ b/xmloff/source/chart/SchXMLLegendContext.cxx
@@ -116,7 +116,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu
{
xDocProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasLegend" )), uno::makeAny( sal_True ) );
}
- catch( beans::UnknownPropertyException )
+ catch(const beans::UnknownPropertyException&)
{
OSL_TRACE( "Property HasLegend not found" );
}
@@ -162,7 +162,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu
if( SchXMLEnumConverter::getLegendPositionConverter().importXML( aValue, aAny, GetImport().GetMM100UnitConverter() ) )
xLegendProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Alignment" )), aAny );
}
- catch( beans::UnknownPropertyException )
+ catch(const beans::UnknownPropertyException&)
{
OSL_TRACE( "Property Alignment (legend) not found" );
}
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 2d407f41bfc3..3002548674df 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -736,7 +736,7 @@ void SAL_CALL SvXMLExport::setSourceDocument( const uno::Reference< lang::XCompo
}
}
}
- catch( com::sun::star::uno::Exception& )
+ catch(const com::sun::star::uno::Exception&)
{
}
}
@@ -913,7 +913,7 @@ sal_Bool SAL_CALL SvXMLExport::filter( const uno::Sequence< beans::PropertyValue
exportDoc( meClass );
}
- catch( uno::Exception e )
+ catch(const uno::Exception& e)
{
// We must catch exceptions, because according to the
// API definition export must not throw one!
@@ -1308,7 +1308,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
bOwnEmbeddedResolver = mxEmbeddedResolver.is();
}
}
- catch( com::sun::star::uno::Exception& )
+ catch(const com::sun::star::uno::Exception&)
{
}
}
@@ -1360,7 +1360,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
mxExtHandler = uno::Reference<xml::sax::XExtendedDocumentHandler>( mxHandler, UNO_QUERY );
}
}
- catch( com::sun::star::uno::Exception& )
+ catch(const com::sun::star::uno::Exception&)
{
}
}
@@ -1621,14 +1621,16 @@ void SvXMLExport::_ExportStyles( sal_Bool )
aGradientStyle.exportXML( rStrName, aValue );
}
- catch( container::NoSuchElementException& )
- {}
+ catch(const container::NoSuchElementException&)
+ {
+ }
}
}
}
}
- catch( lang::ServiceNotRegisteredException& )
- {}
+ catch(const lang::ServiceNotRegisteredException&)
+ {
+ }
// export (fill-)hatch-styles
try
@@ -1652,14 +1654,15 @@ void SvXMLExport::_ExportStyles( sal_Bool )
aHatchStyle.exportXML( rStrName, aValue );
}
- catch( container::NoSuchElementException& )
+ catch(const container::NoSuchElementException&)
{}
}
}
}
}
- catch( lang::ServiceNotRegisteredException& )
- {}
+ catch(const lang::ServiceNotRegisteredException&)
+ {
+ }
// export (fill-)bitmap-styles
try
@@ -1683,14 +1686,16 @@ void SvXMLExport::_ExportStyles( sal_Bool )
aImageStyle.exportXML( rStrName, aValue, *this );
}
- catch( container::NoSuchElementException& )
- {}
+ catch(const container::NoSuchElementException&)
+ {
+ }
}
}
}
}
- catch( lang::ServiceNotRegisteredException& )
- {}
+ catch(const lang::ServiceNotRegisteredException&)
+ {
+ }
// export transparency-gradient -styles
try
@@ -1714,14 +1719,16 @@ void SvXMLExport::_ExportStyles( sal_Bool )
aTransGradientstyle.exportXML( rStrName, aValue );
}
- catch( container::NoSuchElementException& )
- {}
+ catch(const container::NoSuchElementException&)
+ {
+ }
}
}
}
}
- catch( lang::ServiceNotRegisteredException& )
- {}
+ catch(const lang::ServiceNotRegisteredException&)
+ {
+ }
// export marker-styles
try
@@ -1745,14 +1752,16 @@ void SvXMLExport::_ExportStyles( sal_Bool )
aMarkerStyle.exportXML( rStrName, aValue );
}
- catch( container::NoSuchElementException& )
- {}
+ catch(const container::NoSuchElementException&)
+ {
+ }
}
}
}
}
- catch( lang::ServiceNotRegisteredException& )
- {}
+ catch(const lang::ServiceNotRegisteredException&)
+ {
+ }
// export dash-styles
try
@@ -1776,14 +1785,16 @@ void SvXMLExport::_ExportStyles( sal_Bool )
aDashStyle.exportXML( rStrName, aValue );
}
- catch( container::NoSuchElementException& )
- {}
+ catch(const container::NoSuchElementException&)
+ {
+ }
}
}
}
}
- catch( lang::ServiceNotRegisteredException& )
- {}
+ catch(const lang::ServiceNotRegisteredException&)
+ {
+ }
}
}
@@ -2226,7 +2237,7 @@ OUString SvXMLExport::GetRelativeReference(const OUString& rValue)
sValue = aTemp.smartRel2Abs(sValue, bWasAbsolute ).GetMainURL(INetURLObject::DECODE_TO_IURI);
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
}
}
@@ -2262,13 +2273,13 @@ void SvXMLExport::StartElement(const OUString& rName,
mxHandler->ignorableWhitespace( msWS );
mxHandler->startElement( rName, GetXAttrList() );
}
- catch ( SAXInvalidCharacterException& e )
+ catch (const SAXInvalidCharacterException& e)
{
Sequence<OUString> aPars(1);
aPars[0] = rName;
SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, NULL );
}
- catch ( SAXException& e )
+ catch (const SAXException& e)
{
Sequence<OUString> aPars(1);
aPars[0] = rName;
@@ -2288,13 +2299,13 @@ void SvXMLExport::Characters(const ::rtl::OUString& rChars)
{
mxHandler->characters(rChars);
}
- catch ( SAXInvalidCharacterException& e )
+ catch (const SAXInvalidCharacterException& e)
{
Sequence<OUString> aPars(1);
aPars[0] = rChars;
SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, NULL );
}
- catch ( SAXException& e )
+ catch (const SAXException& e)
{
Sequence<OUString> aPars(1);
aPars[0] = rChars;
@@ -2336,7 +2347,7 @@ void SvXMLExport::EndElement(const OUString& rName,
mxHandler->ignorableWhitespace( msWS );
mxHandler->endElement( rName );
}
- catch ( SAXException& e )
+ catch (const SAXException& e)
{
Sequence<OUString> aPars(1);
aPars[0] = rName;
@@ -2357,7 +2368,7 @@ void SvXMLExport::IgnorableWhitespace()
{
mxHandler->ignorableWhitespace( msWS );
}
- catch ( SAXException& e )
+ catch (const SAXException& e)
{
Sequence<OUString> aPars(0);
SetError( XMLERROR_SAX|XMLERROR_FLAG_ERROR|XMLERROR_FLAG_SEVERE,
diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx
index 92d1b9a8e408..d92bb7cab331 100644
--- a/xmloff/source/draw/XMLImageMapContext.cxx
+++ b/xmloff/source/draw/XMLImageMapContext.cxx
@@ -667,7 +667,7 @@ XMLImageMapContext::XMLImageMapContext(
if( xInfo.is() && xInfo->hasPropertyByName( sImageMap ) )
xPropertySet->getPropertyValue(sImageMap) >>= xImageMap;
}
- catch( com::sun::star::uno::Exception e )
+ catch(const com::sun::star::uno::Exception& e)
{
uno::Sequence<OUString> aSeq(0);
rImport.SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, NULL );
diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx
index 312b7d7ab5fc..d6b0eaf49215 100644
--- a/xmloff/source/draw/animexp.cxx
+++ b/xmloff/source/draw/animexp.cxx
@@ -300,13 +300,10 @@ void XMLAnimationsExporter::prepare( Reference< XShape > xShape, SvXMLExport& )
{
Reference< XShape > xPath;
xProps->getPropertyValue( mpImpl->msAnimPath ) >>= xPath;
-// strip if( xPath.is() )
-// strip mrExport.getInterfaceToIdentifierMapper()->registerReference( xShape );
-// strip mpImpl->mxShapeExp->createShapeId( xPath );
}
}
}
- catch( Exception e )
+ catch(const Exception&)
{
OSL_FAIL("exception catched while collection animation information!");
}
@@ -437,7 +434,7 @@ void XMLAnimationsExporter::collect( Reference< XShape > xShape, SvXMLExport& rE
}
}
}
- catch( Exception e )
+ catch(const Exception&)
{
OSL_FAIL("exception catched while collection animation information!");
}
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index d785725203fa..a9882591f69f 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -666,7 +666,7 @@ void XMLAnimationsEffectContext::EndElement()
}
}
}
- catch( Exception e )
+ catch(const Exception&)
{
OSL_FAIL( "exception catched while importing animation information!" );
}
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 29db93ca8226..6c4343eff192 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -1630,9 +1630,8 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons
}
}
}
- catch( Exception& e )
+ catch(const Exception&)
{
- (void)e;
OSL_FAIL( "SdXMLExport::ImpPrepDrawPageHeaderFooterDecls(), unexpected exception cought!" );
}
@@ -1945,7 +1944,7 @@ void SdXMLExport::_ExportContent()
AddAttribute ( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONREQUEST );
}
}
- catch( Exception& )
+ catch(const Exception&)
{
OSL_FAIL(" no \"BookmarkURL\" property at page?" );
}
@@ -2236,7 +2235,7 @@ void SdXMLExport::exportPresentationSettings()
}
}
}
- catch( uno::Exception )
+ catch(const uno::Exception&)
{
OSL_FAIL( "uno::Exception while exporting <presentation:settings>" );
}
@@ -2747,7 +2746,7 @@ OUString SdXMLExport::getNavigationOrder( const Reference< XDrawPage >& xDrawPag
}
}
}
- catch( Exception& )
+ catch(const Exception&)
{
}
return sNavOrder.makeStringAndClear();
@@ -2772,7 +2771,7 @@ void SdXMLExport::collectAnnotationAutoStyles( const Reference<XDrawPage>& xDraw
}
}
}
- catch( Exception& )
+ catch(const Exception&)
{
OSL_FAIL("SdXMLExport::collectAnnotationAutoStyles(), exception caught during export of annotation auto styles");
}
@@ -2839,7 +2838,7 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage )
while( xAnnotationEnumeration->hasMoreElements() );
}
}
- catch( Exception& )
+ catch(const Exception&)
{
OSL_FAIL("SdXMLExport::exportAnnotations(), exception caught during export of annotations");
}
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 2d6f09187b6a..53f16c9a2efa 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -916,7 +916,7 @@ void SdXMLImport::SetViewSettings(const com::sun::star::uno::Sequence<com::sun::
{
xPropSet->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "VisibleArea" ) ), uno::makeAny( aVisArea ) );
}
- catch( com::sun::star::uno::Exception /*e*/ )
+ catch(const com::sun::star::uno::Exception&)
{
/* #i79978# since old documents may contain invalid view settings, this is nothing to worry the user about.
uno::Sequence<OUString> aSeq(0);
@@ -950,9 +950,8 @@ void SdXMLImport::SetConfigurationSettings(const com::sun::star::uno::Sequence<c
if( xInfo->hasPropertyByName( rProperty ) )
xProps->setPropertyValue( rProperty, pValues->Value );
}
- catch( uno::Exception& e )
+ catch(const uno::Exception&)
{
- (void)e;
OSL_TRACE( "#SdXMLImport::SetConfigurationSettings: Exception!" );
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index c3f66197a403..1a76bb860a49 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -300,7 +300,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
aShapeInfo.mnFamily = XML_STYLE_FAMILY_SD_PRESENTATION_ID;
}
}
- catch(beans::UnknownPropertyException aException)
+ catch(const beans::UnknownPropertyException&)
{
// Ignored.
DBG_ASSERT(false,
@@ -471,7 +471,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
uno::Reference< table::XColumnRowRange > xRange( xSet->getPropertyValue( msModel ), uno::UNO_QUERY_THROW );
GetShapeTableExport()->collectTableAutoStyles( xRange );
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
OSL_FAIL( "XMLShapeExport::collectShapeAutoStyles(): exception caught while collection auto styles for a table!" );
}
@@ -560,7 +560,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
}
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
OSL_FAIL("XMLShapeExport::exportShape(): exception during hyperlink export");
}
@@ -683,7 +683,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_LAYER, aLayerName );
}
- catch( uno::Exception e )
+ catch(const uno::Exception& e)
{
OSL_FAIL( "could not export layer name for shape!" );
}
@@ -717,7 +717,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
if( eDisplayToken != XML_TOKEN_INVALID )
mrExport.AddAttribute(XML_NAMESPACE_DRAW_EXT, XML_DISPLAY, eDisplayToken );
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
OSL_FAIL( "XMLShapeExport::exportShape(), exception caught!" );
}
@@ -1156,7 +1156,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x
}
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
OSL_FAIL( "XMLShapeExport::ImpCalcShapeType(), expected ole shape to have the CLSID property?" );
}
@@ -1260,7 +1260,7 @@ void XMLShapeExport::ExportGraphicDefaults()
aStEx.exportStyleFamily("graphics", OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), xPropertySetMapper, sal_False, XML_STYLE_FAMILY_SD_GRAPHICS_ID);
}
}
- catch( lang::ServiceNotRegisteredException& )
+ catch(const lang::ServiceNotRegisteredException&)
{
}
}
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 04d750776971..c6f66daed090 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -358,9 +358,8 @@ void SdXMLGenericPageContext::EndElement()
}
}
}
- catch( uno::Exception& e )
+ catch(const uno::Exception&)
{
- (void)e;
OSL_FAIL("xmloff::SdXMLGenericPageContext::EndElement(), unexpected exception cought!");
}
}
@@ -426,7 +425,7 @@ void SdXMLGenericPageContext::SetStyle( rtl::OUString& rStyleName )
}
}
}
- catch( uno::Exception )
+ catch(const uno::Exception&)
{
OSL_FAIL( "SdXMLGenericPageContext::SetStyle(): uno::Exception catched!" );
}
@@ -641,7 +640,7 @@ void SdXMLGenericPageContext::SetNavigationOrder()
Reference< XPropertySet > xSet( mxShapes, UNO_QUERY_THROW );
xSet->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "NavigationOrder" ) ), Any( Reference< XIndexAccess >( new NavigationOrderAccess( aShapes ) ) ) );
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
OSL_FAIL("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), unexpected exception cought while importing shape navigation order!");
}
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 2179fdc2922e..753aaaf612e1 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -335,7 +335,7 @@ void SdXMLShapeContext::addGluePoint( const uno::Reference< xml::sax::XAttribute
sal_Int32 nInternalId = mxGluePoints->insert( uno::makeAny( aGluePoint ) );
GetImport().GetShapeImport()->addGluePointMapping( mxShape, nId, nInternalId );
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
OSL_FAIL( "exception during setting of glue points!");
}
@@ -414,7 +414,7 @@ void SdXMLShapeContext::EndElement()
xSet->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) ), Any( ::com::sun::star::presentation::ClickAction_DOCUMENT ) );
}
}
- catch( Exception& )
+ catch(const Exception&)
{
OSL_FAIL("xmloff::SdXMLShapeContext::EndElement(), exception caught while setting hyperlink!");
}
@@ -458,7 +458,7 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape)
if( !mbPrintable )
xSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) ), uno::Any( sal_False ) );
}
- catch( Exception& )
+ catch(const Exception&)
{
OSL_FAIL( "SdXMLShapeContext::AddShape(), exception caught!" );
}
@@ -519,7 +519,7 @@ void SdXMLShapeContext::AddShape(const char* pServiceName )
if( xShape.is() )
AddShape( xShape );
}
- catch( const uno::Exception& e )
+ catch(const uno::Exception& e)
{
uno::Sequence<rtl::OUString> aSeq( 1 );
aSeq[0] = OUString::createFromAscii(pServiceName);
@@ -686,7 +686,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
}
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
OSL_FAIL( "could not find style for shape!" );
}
@@ -701,7 +701,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
aAny <<= xStyle;
xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Style")), aAny);
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
OSL_FAIL( "could not find style for shape!" );
}
@@ -736,7 +736,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
} while(0);
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
}
}
@@ -757,7 +757,7 @@ void SdXMLShapeContext::SetLayer()
return;
}
}
- catch( uno::Exception e )
+ catch(const uno::Exception&)
{
}
}
@@ -786,7 +786,7 @@ void SdXMLShapeContext::SetThumbnail()
xPropSet->setPropertyValue( sProperty, uno::makeAny( aInternalURL ) );
}
}
- catch( uno::Exception e )
+ catch(const uno::Exception&)
{
}
}
@@ -989,7 +989,7 @@ void SdXMLRectShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
{
xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("CornerRadius")), uno::makeAny( mnRadius ) );
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
OSL_FAIL( "exception during setting of corner radius!");
}
@@ -1642,7 +1642,7 @@ void SdXMLTextBoxShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
{
xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("CornerRadius")), uno::makeAny( mnRadius ) );
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
OSL_FAIL( "exception during setting of corner radius!");
}
@@ -2242,7 +2242,7 @@ void SdXMLCaptionShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
{
xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("CornerRadius")), uno::makeAny( mnRadius ) );
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
OSL_FAIL( "exception during setting of corner radius!");
}
@@ -2345,7 +2345,7 @@ void SdXMLGraphicObjectShapeContext::StartElement( const ::com::sun::star::uno::
xPropset->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FillStyle")), Any( FillStyle_NONE ) );
xPropset->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LineStyle")), Any( LineStyle_NONE ) );
}
- catch( Exception& )
+ catch(const Exception&)
{
}
@@ -2364,7 +2364,7 @@ void SdXMLGraphicObjectShapeContext::StartElement( const ::com::sun::star::uno::
xPropset->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicURL") ), aAny );
xPropset->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicStreamURL") ), aAny );
}
- catch (lang::IllegalArgumentException const &)
+ catch (const lang::IllegalArgumentException&)
{
}
}
@@ -2409,7 +2409,7 @@ void SdXMLGraphicObjectShapeContext::EndElement()
xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicStreamURL") ), aAny );
}
}
- catch (lang::IllegalArgumentException const &)
+ catch (const lang::IllegalArgumentException&)
{
}
}
@@ -3542,7 +3542,7 @@ void SdXMLCustomShapeContext::StartElement( const uno::Reference< xml::sax::XAtt
}
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
OSL_FAIL( "could not set enhanced customshape geometry" );
}
@@ -3574,7 +3574,7 @@ void SdXMLCustomShapeContext::EndElement()
xPropSet->setPropertyValue( sCustomShapeGeometry, aAny );
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
OSL_FAIL( "could not set enhanced customshape geometry" );
}
@@ -3685,7 +3685,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc
Reference< XStyle > xTableStyle( xTableFamily->getByName( msTemplateStyleName ), UNO_QUERY_THROW );
xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "TableTemplate" ) ), Any( xTableStyle ) );
}
- catch( Exception& )
+ catch(const Exception&)
{
OSL_FAIL("SdXMLTableShapeContext::StartElement(), exception caught!");
}
@@ -3698,7 +3698,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc
const OUString sAPIPropertyName( OUString(pEntry->msApiName, pEntry->nApiNameLength, RTL_TEXTENCODING_ASCII_US ) );
xProps->setPropertyValue( sAPIPropertyName, Any( maTemplateStylesUsed[i] ) );
}
- catch( Exception& )
+ catch(const Exception&)
{
OSL_FAIL("SdXMLTableShapeContext::StartElement(), exception caught!");
}
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 4e2024c3cf5e..a88952289658 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -147,9 +147,9 @@ lcl_initDocumentProperties(SvXMLImport & rImport,
xDocProps->getAutoloadURL()));
SvXMLMetaDocumentContext::setBuildId(
xDocProps->getGenerator(), rImport.getImportInfo());
- } catch (uno::RuntimeException) {
+ } catch (const uno::RuntimeException&) {
throw;
- } catch (uno::Exception & e) {
+ } catch (const uno::Exception& e) {
throw lang::WrappedTargetRuntimeException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"SvXMLMetaDocumentContext::initDocumentProperties: "
@@ -181,9 +181,9 @@ lcl_initGenerator(SvXMLImport & rImport,
xPath->eval(xDoc.get(), expr), uno::UNO_SET_THROW);
OUString const value(xObj->getString());
SvXMLMetaDocumentContext::setBuildId(value, rImport.getImportInfo());
- } catch (uno::RuntimeException) {
+ } catch (const uno::RuntimeException&) {
throw;
- } catch (uno::Exception & e) {
+ } catch (const uno::Exception& e) {
throw lang::WrappedTargetRuntimeException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"SvXMLMetaDocumentContext::initGenerator: exception")),
@@ -312,7 +312,7 @@ void SvXMLMetaDocumentContext::setBuildId(::rtl::OUString const& i_rBuildId, con
xImportInfo->setPropertyValue( aPropName, uno::makeAny( sBuildId ) );
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception&)
{
}
}
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index c0261eb0852c..8fe674fef735 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -370,7 +370,7 @@ void XMLPropStyleContext::Finish( sal_Bool bOverwrite )
{
mxStyle->setParentStyle( sParent );
}
- catch( uno::Exception e )
+ catch(const uno::Exception& e)
{
// according to the API definition, I would expect a
// container::NoSuchElementException. But it throws an
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index 81b8dd3409e4..4c6375004063 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -422,7 +422,7 @@ void XMLStyleExport::exportStyleFamily(
{
xStyles->getByName( *pIter ) >>= xStyle;
}
- catch( lang::IndexOutOfBoundsException )
+ catch(const lang::IndexOutOfBoundsException&)
{
// due to bugs in prior versions it is possible that
// a binary file is missing some critical styles.
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index e53e321257af..a637fd263fb8 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -167,9 +167,8 @@ XMLTableExport::XMLTableExport(SvXMLExport& rExp, const rtl::Reference< SvXMLExp
}
}
}
- catch( Exception& e )
+ catch(const Exception&)
{
- (void)e;
}
mxCellExportPropertySetMapper = xExportPropertyMapper;
@@ -242,7 +241,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
pTableInfo->maColumnStyleMap[xKey] = sStyleName;
}
}
- catch( Exception& )
+ catch(const Exception&)
{
OSL_FAIL("xmloff::XMLTableExport::collectTableAutoStyles(), exception during column style collection!");
}
@@ -310,12 +309,12 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
aStringStatistic.clear();
}
- catch( Exception& )
+ catch(const Exception&)
{
OSL_FAIL("xmloff::XMLTableExport::collectTableAutoStyles(), exception during column style collection!");
}
}
- catch( Exception& )
+ catch(const Exception&)
{
OSL_FAIL("xmloff::XMLTableExport::collectTableAutoStyles(), exception caught!");
}
@@ -381,7 +380,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
}
}
}
- catch( Exception )
+ catch(const Exception&)
{
OSL_FAIL( "XMLTableExport::exportTable(), exception cought!" );
}
@@ -446,7 +445,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
}
DBG_ASSERT( (nRowSpan >= 1) && (nColSpan >= 1), "xmloff::XMLTableExport::ExportCell(), illegal row or col span < 1?" );
}
- catch ( Exception )
+ catch (const Exception&)
{
OSL_FAIL( "exception while exporting a table cell" );
}
@@ -569,7 +568,7 @@ void XMLTableExport::exportTableTemplates()
SvXMLElementExport element( mrExport, XML_NAMESPACE_TABLE, pElements->meElement, sal_True, sal_True );
}
}
- catch( Exception& )
+ catch(const Exception&)
{
OSL_FAIL("xmloff::XMLTableExport::exportTableTemplates(), exception caught!");
}
@@ -577,12 +576,12 @@ void XMLTableExport::exportTableTemplates()
pElements++;
}
}
- catch( Exception& )
+ catch(const Exception&)
{
OSL_FAIL("xmloff::XMLTableExport::exportTableDesigns(), exception caught while exporting a table design!");
}
}
- catch( Exception& )
+ catch(const Exception&)
{
OSL_FAIL("xmloff::XMLTableExport::exportTableDesigns(), exception caught!");
}
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index c1285af4e751..4bc15ecebd86 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -224,7 +224,7 @@ void XMLIndexTOCContext::StartElement(
GetImport().GetTextImport()->InsertTextContent(
xTextContent);
}
- catch( IllegalArgumentException e )
+ catch(const IllegalArgumentException& e)
{
// illegal argument? Then we can't accept indices here!
Sequence<OUString> aSeq(1);
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index a0f2947434e8..209a51ffa015 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -571,7 +571,7 @@ void XMLRedlineExport::ExportStartOrEndRedline(
{
aAny = rPropSet->getPropertyValue(bStart ? sStartRedline : sEndRedline);
}
- catch( UnknownPropertyException e )
+ catch(const UnknownPropertyException&)
{
// If we don't have the property, there's nothing to do.
return;
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index af7677a2cdc6..19f0b8aa2fdc 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -280,7 +280,7 @@ void XMLTextFieldImportContext::EndElement()
{
rTextImportHelper.InsertTextContent(xTextContent);
}
- catch (lang::IllegalArgumentException e)
+ catch (const lang::IllegalArgumentException&)
{
// ignore
}
@@ -3174,7 +3174,7 @@ void XMLDdeFieldDeclImportContext::StartElement(
}
// else: ignore
}
- catch ( const Exception& )
+ catch (const Exception&)
{
//ignore
}
@@ -3697,8 +3697,9 @@ SvXMLImportContext* XMLAnnotationImportContext::CreateChildContext(
}
}
}
- catch ( Exception& )
- {}
+ catch (const Exception&)
+ {
+ }
if( !pContext )
pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, aTextBuffer);
@@ -3743,7 +3744,7 @@ void XMLAnnotationImportContext::EndElement()
{
GetImportHelper().InsertTextContent( xTextContent );
}
- catch (lang::IllegalArgumentException)
+ catch (const lang::IllegalArgumentException&)
{
// ignore
}
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index e81610773293..a925649ba5f8 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -924,8 +924,9 @@ namespace
{
m_xOutParams->insertByName(pCurrent->first, pCurrent->second);
}
- catch(ElementExistException)
- { }
+ catch(const ElementExistException&)
+ {
+ }
}
}
}
@@ -1632,7 +1633,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
xPropSet->setPropertyValue(
s_NumberingRules, makeAny(xNewNumRules) );
}
- catch( Exception e )
+ catch(const Exception&)
{
; // I would really like to use a warning here,
// but I can't access the XMLErrorHandler from
@@ -1799,9 +1800,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
xCrsr->gotoRange( xRange->getEnd(), true );
xCrsr->setString( ::rtl::OUString() );
}
- catch( const uno::Exception& rEx )
+ catch(const uno::Exception&)
{
- (void)rEx;
}
}
}