summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-11 09:12:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-11 11:55:04 +0000
commite3457b637a9796740e29a31bb0cdabc062b04bbf (patch)
treee4a70afbb8bf42d25c1271cbe0b5bf03b60be85f /svx
parent328e09955a612b8bcd6962f8af1b5dfb7272871a (diff)
catch by const ref
Diffstat (limited to 'svx')
-rw-r--r--svx/source/xml/xmlxtimp.cxx30
1 files changed, 18 insertions, 12 deletions
diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx
index ca3df709b7cd..b61096b89e9d 100644
--- a/svx/source/xml/xmlxtimp.cxx
+++ b/svx/source/xml/xmlxtimp.cxx
@@ -218,7 +218,7 @@ SvXMLImportContext *SvxXMLTableImportContext::CreateChildContext( sal_uInt16 nPr
}
}
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
@@ -266,7 +266,7 @@ void SvxXMLTableImportContext::importMarker( sal_uInt16 nPrfx, const OUString& r
XMLMarkerStyleImport aMarkerStyle( GetImport() );
aMarkerStyle.importXML( xAttrList, rAny, rName );
}
- catch( Exception& )
+ catch (const Exception&)
{
OSL_FAIL("SvxXMLTableImportContext::importMarker(), exception caught!");
}
@@ -282,7 +282,7 @@ void SvxXMLTableImportContext::importDash( sal_uInt16 nPrfx, const OUString& rLo
XMLDashStyleImport aDashStyle( GetImport() );
aDashStyle.importXML( xAttrList, rAny, rName );
}
- catch( Exception& )
+ catch (const Exception&)
{
OSL_FAIL("SvxXMLTableImportContext::importDash(), exception caught!");
}
@@ -298,7 +298,7 @@ void SvxXMLTableImportContext::importHatch( sal_uInt16 nPrfx, const OUString& rL
XMLHatchStyleImport aHatchStyle( GetImport() );
aHatchStyle.importXML( xAttrList, rAny, rName );
}
- catch( Exception& )
+ catch (const Exception&)
{
OSL_FAIL("SvxXMLTableImportContext::importHatch(), exception caught!");
}
@@ -314,7 +314,7 @@ void SvxXMLTableImportContext::importGradient( sal_uInt16 nPrfx, const OUString&
XMLGradientStyleImport aGradientStyle( GetImport() );
aGradientStyle.importXML( xAttrList, rAny, rName );
}
- catch( Exception& )
+ catch (const Exception&)
{
OSL_FAIL("SvxXMLTableImportContext::importGradient(), exception caught!");
}
@@ -330,7 +330,7 @@ void SvxXMLTableImportContext::importBitmap( sal_uInt16 nPrfx, const OUString& r
XMLImageStyle aImageStyle;
aImageStyle.importXML( xAttrList, rAny, rName, GetImport() );
}
- catch( Exception& )
+ catch (const Exception&)
{
OSL_FAIL("SvxXMLTableImportContext::importBitmap(), exception caught!");
}
@@ -423,10 +423,13 @@ bool SvxXMLXTableImport::load( const rtl::OUString &rPath,
else // relative URL into a storage
{
uno::Reference< embed::XStorage > xSubStorage;
- try {
+ try
+ {
xSubStorage = comphelper::OStorageHelper::GetStorageAtPath(
xStorage, rPath, embed::ElementModes::READ, aNasty );
- } catch (uno::Exception &) {
+ }
+ catch (const uno::Exception&)
+ {
}
if( xSubStorage.is() )
openStorageStream( &aParserInput, &pGraphicHelper, xSubStorage );
@@ -447,10 +450,14 @@ bool SvxXMLXTableImport::load( const rtl::OUString &rPath,
if (pGraphicHelper)
xGrfResolver = pGraphicHelper;
- try {
+ try
+ {
uno::Reference< io::XSeekable > xSeek( aParserInput.aInputStream, uno::UNO_QUERY_THROW );
xSeek->seek( 0 );
- } catch( uno::Exception &) {}
+ }
+ catch (const uno::Exception&)
+ {
+ }
uno::Reference< XDocumentHandler > xHandler( new SvxXMLXTableImport( xServiceFactory, xTable, xGrfResolver ) );
xParser->setDocumentHandler( xHandler );
@@ -459,9 +466,8 @@ bool SvxXMLXTableImport::load( const rtl::OUString &rPath,
if( pGraphicHelper )
SvXMLGraphicHelper::Destroy( pGraphicHelper );
}
- catch( uno::Exception& e )
+ catch (const uno::Exception&)
{
- (void)e;
// thrown each time you load a document with property tables that are not
// on the current machine. FIXME: would be better to check a file exists
// before importing ...