From f9f88e2c4fbd33bbe60a8df34bfd1cffaf5ee6df Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 4 Aug 2020 14:28:50 +0200 Subject: loplugin:referencecasting (clang-cl) ("the source reference is already a subtype of the destination reference") Change-Id: I1183eaa2015bd9d6567001bb14f7809dffcae7ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100088 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- filter/source/svg/svgexport.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 76ad8c3b2ca2..f28d9811cf64 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -1593,16 +1593,11 @@ bool SVGFilter::implExportMasterPages( const std::vector< Reference< css::drawin { if( rxPages[i].is() ) { - Reference< css::drawing::XShapes > xShapes( rxPages[i], UNO_QUERY ); + // add id attribute + const OUString & sPageId = implGetValidIDFromInterface( rxPages[i] ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sPageId ); - if( xShapes.is() ) - { - // add id attribute - const OUString & sPageId = implGetValidIDFromInterface( rxPages[i] ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sPageId ); - - bRet = implExportPage( sPageId, rxPages[i], xShapes, true /* is a master page */ ) || bRet; - } + bRet = implExportPage( sPageId, rxPages[i], rxPages[i], true /* is a master page */ ) || bRet; } } return bRet; @@ -1654,7 +1649,7 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing: } else { - xShapes.set( rxPages[i], UNO_QUERY ); + xShapes = rxPages[i]; } if( xShapes.is() ) -- cgit