diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2018-04-21 07:50:54 +0200 |
---|---|---|
committer | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2018-04-21 11:02:29 +0200 |
commit | de07f40030bbd604bc42d58f0e954cca284a2646 (patch) | |
tree | d16090c7008b533b8af295b68701681012ba7608 /svx/source/xml | |
parent | 3322661414a558d29146c40c0cd5e9db0a7b21dd (diff) |
cppcheck: identicalInnerCondition
renamed temporary list in EnhancedCustomShape2d.cxx to avoid shadow
of a local variable
Change-Id: I17a2261dafd2067480fcc5314af4f48765d6b690
Reviewed-on: https://gerrit.libreoffice.org/53244
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'svx/source/xml')
-rw-r--r-- | svx/source/xml/xmlexport.cxx | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/svx/source/xml/xmlexport.cxx b/svx/source/xml/xmlexport.cxx index f34dcb5de520..5e542ac665f5 100644 --- a/svx/source/xml/xmlexport.cxx +++ b/svx/source/xml/xmlexport.cxx @@ -84,37 +84,34 @@ bool SvxDrawingLayerExport( SdrModel* pModel, const uno::Reference<io::XOutputSt xGraphicHelper = SvXMLGraphicHelper::Create( SvXMLGraphicHelperMode::Write ); xGraphicResolver = xGraphicHelper.get(); - if( bDocRet ) - { - uno::Reference<xml::sax::XDocumentHandler> xHandler( xWriter, uno::UNO_QUERY ); + uno::Reference<xml::sax::XDocumentHandler> xHandler( xWriter, uno::UNO_QUERY ); - // doc export - uno::Reference< io::XActiveDataSource > xDocSrc( xWriter, uno::UNO_QUERY ); - xDocSrc->setOutputStream( xOut ); + // doc export + uno::Reference< io::XActiveDataSource > xDocSrc( xWriter, uno::UNO_QUERY ); + xDocSrc->setOutputStream( xOut ); - uno::Sequence< uno::Any > aArgs( xObjectResolver.is() ? 3 : 2 ); - aArgs[0] <<= xHandler; - aArgs[1] <<= xGraphicResolver; - if( xObjectResolver.is() ) - aArgs[2] <<= xObjectResolver; + uno::Sequence< uno::Any > aArgs( xObjectResolver.is() ? 3 : 2 ); + aArgs[0] <<= xHandler; + aArgs[1] <<= xGraphicResolver; + if( xObjectResolver.is() ) + aArgs[2] <<= xObjectResolver; - uno::Reference< document::XFilter > xFilter( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( OUString::createFromAscii( pExportService ), aArgs, xContext ), uno::UNO_QUERY ); - if( !xFilter.is() ) - { - OSL_FAIL( "com.sun.star.comp.Draw.XMLExporter service missing" ); - bDocRet = false; - } + uno::Reference< document::XFilter > xFilter( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( OUString::createFromAscii( pExportService ), aArgs, xContext ), uno::UNO_QUERY ); + if( !xFilter.is() ) + { + OSL_FAIL( "com.sun.star.comp.Draw.XMLExporter service missing" ); + bDocRet = false; + } - if( bDocRet ) + if( bDocRet ) + { + uno::Reference< document::XExporter > xExporter( xFilter, uno::UNO_QUERY ); + if( xExporter.is() ) { - uno::Reference< document::XExporter > xExporter( xFilter, uno::UNO_QUERY ); - if( xExporter.is() ) - { - xExporter->setSourceDocument( xSourceDoc ); - - uno::Sequence< beans::PropertyValue > aDescriptor( 0 ); - bDocRet = xFilter->filter( aDescriptor ); - } + xExporter->setSourceDocument( xSourceDoc ); + + uno::Sequence< beans::PropertyValue > aDescriptor( 0 ); + bDocRet = xFilter->filter( aDescriptor ); } } } |