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/core | |
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/core')
-rw-r--r-- | xmloff/source/core/DocumentSettingsContext.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/core/RDFaImportHelper.cxx | 5 | ||||
-rw-r--r-- | xmloff/source/core/SettingsExportHelper.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 3 |
4 files changed, 7 insertions, 11 deletions
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 305d1d94853b..27d242abe19e 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -692,7 +692,7 @@ void XMLConfigItemMapIndexedContext::EndElement() if( xForbChars.is() ) { - uno::Reference< container::XIndexAccess > xIndex( maProps.GetIndexContainer(), uno::UNO_QUERY ); + uno::Reference< container::XIndexAccess > xIndex = maProps.GetIndexContainer(); const sal_Int32 nCount = xIndex->getCount(); uno::Sequence < beans::PropertyValue > aProps; @@ -764,7 +764,7 @@ void XMLConfigItemMapIndexedContext::EndElement() } else if ( maConfigItemName == "Symbols" ) { - uno::Reference< container::XIndexAccess > xIndex( maProps.GetIndexContainer(), uno::UNO_QUERY ); + uno::Reference< container::XIndexAccess > xIndex = maProps.GetIndexContainer(); const sal_Int32 nCount = xIndex->getCount(); uno::Sequence < beans::PropertyValue > aProps; diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx index d2255d17640b..4ee20b4e478b 100644 --- a/xmloff/source/core/RDFaImportHelper.cxx +++ b/xmloff/source/core/RDFaImportHelper.cxx @@ -295,12 +295,11 @@ RDFaInserter::MakeResource( OUString const & i_rResource) OUString name( i_rResource.copy(2) ); const uno::Reference< rdf::XBlankNode > xBNode( LookupBlankNode(name) ); SAL_WARN_IF(!xBNode.is(), "xmloff.core", "no blank node?"); - return uno::Reference<rdf::XResource>( xBNode, uno::UNO_QUERY); + return xBNode; } else { - return uno::Reference<rdf::XResource>( MakeURI( i_rResource ), - uno::UNO_QUERY); + return MakeURI( i_rResource ); } } diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index 9a5c58ab6712..4defc9d35049 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -331,8 +331,7 @@ void XMLSettingsExportHelper::exportSymbolDescriptors( xBox->insertByIndex(nIndex, uno::makeAny( aSequence )); } - uno::Reference< container::XIndexAccess > xIA( xBox, uno::UNO_QUERY ); - exportIndexAccess( xIA, rName ); + exportIndexAccess( xBox, rName ); } void XMLSettingsExportHelper::exportbase64Binary( const uno::Sequence<sal_Int8>& aProps, @@ -460,8 +459,7 @@ void XMLSettingsExportHelper::exportForbiddenCharacters( } } - uno::Reference< container::XIndexAccess > xIA( xBox, uno::UNO_QUERY ); - exportIndexAccess( xIA, rName ); + exportIndexAccess( xBox, rName ); } void XMLSettingsExportHelper::exportAllSettings( diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 702d75231015..2ca4a01fd0a3 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1499,8 +1499,7 @@ void SvXMLExport::ExportScripts_() Reference < XDocumentHandler > xHdl( new XMLBasicExportFilter( mxHandler ) ); Reference< document::XXMLBasicExporter > xExporter = document::XMLOasisBasicExporter::createWithHandler( m_xContext, xHdl ); - Reference< XComponent > xComp( mxModel, UNO_QUERY ); - xExporter->setSourceDocument( xComp ); + xExporter->setSourceDocument( mxModel ); Sequence< PropertyValue > aMediaDesc( 0 ); xExporter->filter( aMediaDesc ); } |