From b7a1e92a27bc26f222526eb50ab80c0e6966be7a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 23 Feb 2020 21:06:10 +0200 Subject: loplugin:referencecasting getting --enable-pch=normal working with clang means that the plugins now have a better view on some stuff, so trigger more warnings Change-Id: I83ca010c0ef07c8106068362bb50a354e3cf7dae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89312 Tested-by: Jenkins Reviewed-by: Noel Grandin --- oox/source/core/xmlfilterbase.cxx | 7 ++++--- oox/source/ppt/pptimport.cxx | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'oox') diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index c6e9173ce53f..281f994d18a8 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -280,7 +281,7 @@ void XmlFilterBase::importDocumentProperties() Reference< XComponentContext > xContext = getComponentContext(); rtl::Reference< ::oox::core::FilterDetect > xDetector( new ::oox::core::FilterDetect( xContext ) ); xInputStream = xDetector->extractUnencryptedPackage( aMediaDesc ); - Reference< XComponent > xModel( getModel(), UNO_QUERY ); + Reference< XComponent > xModel = getModel(); Reference< XStorage > xDocumentStorage ( ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream( OFOPXML_STORAGE_FORMAT_STRING, xInputStream ) ); Reference< XInterface > xTemp = xContext->getServiceManager()->createInstanceWithContext( @@ -1036,14 +1037,14 @@ void XmlFilterBase::importCustomFragments(css::uno::Reference xModel(getModel(), UNO_QUERY); + Reference xModel = getModel(); oox::core::XmlFilterBase::putPropertiesToDocumentGrabBag(xModel, aGrabBagProperties); } } void XmlFilterBase::exportCustomFragments() { - Reference xModel(getModel(), UNO_QUERY); + Reference xModel = getModel(); uno::Reference xPropSet(xModel, uno::UNO_QUERY_THROW); uno::Reference xPropSetInfo = xPropSet->getPropertySetInfo(); diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index 1a2ef397febc..868165182c33 100644 --- a/oox/source/ppt/pptimport.cxx +++ b/oox/source/ppt/pptimport.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -250,7 +251,7 @@ sal_Bool SAL_CALL PowerPointImport::filter( const Sequence< PropertyValue >& rDe xUndoManager->unlock(); }); - Reference< XComponent > xDocument(getModel(), UNO_QUERY); + Reference< XComponent > xDocument = getModel(); xExporter->setSourceDocument(xDocument); if (xFilter->filter(rDescriptor)) return true; -- cgit