diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-20 13:30:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-20 17:59:20 +0200 |
commit | f44bd7bb0ce23535f5e0ced7966677f4fff943fc (patch) | |
tree | 4e1801a7713e31b2b0f8f9d4fd586d5873511d2e /svx/source/xml/xmlxtexp.cxx | |
parent | b1ef3c043d66e7cd529fc4fb13a3d2e8fdb4f2ee (diff) |
loplugin:referencecasting in svx
Change-Id: I2f6bc2467fa7689d186bc2bc45d2071ea0a38e63
Reviewed-on: https://gerrit.libreoffice.org/75998
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/xml/xmlxtexp.cxx')
-rw-r--r-- | svx/source/xml/xmlxtexp.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx index 70c1805bd58f..8175f3f7589e 100644 --- a/svx/source/xml/xmlxtexp.cxx +++ b/svx/source/xml/xmlxtexp.cxx @@ -220,8 +220,6 @@ bool SvxXMLXTableExportComponent::save( uno::Reference<embed::XStorage > xSubStorage; uno::Reference<XGraphicStorageHandler> xGraphicStorageHandler; - uno::Reference<xml::sax::XDocumentHandler> xHandler( xWriter, uno::UNO_QUERY ); - if( !bToStorage || !xStorage.is() ) { // local URL -> SfxMedium route if( bSaveAsStorage ) @@ -276,14 +274,13 @@ bool SvxXMLXTableExportComponent::save( if( !xOut.is() ) return false; - uno::Reference<io::XActiveDataSource> xMetaSrc( xWriter, uno::UNO_QUERY ); - xMetaSrc->setOutputStream( xOut ); + xWriter->setOutputStream( xOut ); if( xGraphicHelper.is() ) xGraphicStorageHandler = xGraphicHelper.get(); // Finally do the export const OUString aName; - rtl::Reference< SvxXMLXTableExportComponent > xExporter( new SvxXMLXTableExportComponent( xContext, aName, xHandler, xTable, xGraphicStorageHandler ) ); + rtl::Reference< SvxXMLXTableExportComponent > xExporter( new SvxXMLXTableExportComponent( xContext, aName, xWriter, xTable, xGraphicStorageHandler ) ); bRet = xExporter->exportTable(); if( xGraphicHelper ) @@ -296,9 +293,7 @@ bool SvxXMLXTableExportComponent::save( if( xTrans.is() ) xTrans->commit(); - uno::Reference< XComponent > xComp( xSubStorage, UNO_QUERY ); - if( xComp.is() ) - xSubStorage->dispose(); + xSubStorage->dispose(); } } catch( uno::Exception& ) |