diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-20 18:27:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-21 08:51:00 +0200 |
commit | 3284309f19bc76f1778988c5314a795a95620e71 (patch) | |
tree | f8c4cee5861bccdfc4b86bc080bf988d3fe78c9f /xmloff/source/meta | |
parent | f9b5657c4cff29f4a0cd65d2789e091f1297a152 (diff) |
loplugin:referencecasting in xmloff
Change-Id: Iac3d56511aacec73bc38f57890c44145a4c13b85
Reviewed-on: https://gerrit.libreoffice.org/76034
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/meta')
-rw-r--r-- | xmloff/source/meta/xmlversion.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx index 08e92e00dd0a..27fca376f195 100644 --- a/xmloff/source/meta/xmlversion.cxx +++ b/xmloff/source/meta/xmlversion.cxx @@ -347,12 +347,9 @@ void SAL_CALL XMLVersionListPersistence::store( const uno::Reference< embed::XSt if ( !xOut.is() ) throw uno::RuntimeException(); // the stream was successfully opened for writing already - Reference< io::XActiveDataSource > xSrc( xWriter, uno::UNO_QUERY ); - xSrc->setOutputStream(xOut); + xWriter->setOutputStream(xOut); - Reference< XDocumentHandler > xHandler( xWriter, uno::UNO_QUERY ); - - rtl::Reference< XMLVersionListExport > xExp( new XMLVersionListExport( xContext, rVersions, sVerName, xHandler ) ); + rtl::Reference< XMLVersionListExport > xExp( new XMLVersionListExport( xContext, rVersions, sVerName, xWriter ) ); xExp->exportDoc( ::xmloff::token::XML_VERSION ); @@ -370,10 +367,9 @@ uno::Sequence< util::RevisionTag > SAL_CALL XMLVersionListPersistence::load( con css::uno::Sequence < css::util::RevisionTag > aVersions; const OUString sDocName( XMLN_VERSIONSLIST ); - uno::Reference< container::XNameAccess > xRootNames( xRoot, uno::UNO_QUERY ); try { - if ( xRootNames.is() && xRootNames->hasByName( sDocName ) && xRoot->isStreamElement( sDocName ) ) + if ( xRoot.is() && xRoot->hasByName( sDocName ) && xRoot->isStreamElement( sDocName ) ) { Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); |