diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-23 21:06:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-25 08:37:17 +0100 |
commit | b7a1e92a27bc26f222526eb50ab80c0e6966be7a (patch) | |
tree | 4f3825cc2f483e4576d1e3849a759b73fdc969f9 /oox | |
parent | e6b9bc3f2ecf0fb7fde5b02f9d750ccbe022f4c1 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/core/xmlfilterbase.cxx | 7 | ||||
-rw-r--r-- | oox/source/ppt/pptimport.cxx | 3 |
2 files changed, 6 insertions, 4 deletions
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 <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/embed/XRelationshipAccess.hpp> +#include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/xml/sax/InputSource.hpp> #include <com/sun/star/xml/sax/XFastParser.hpp> @@ -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<css::embed::XStora aGrabBagProperties["OOXContentTypes"] <<= aContentTypeInfo; - Reference<XComponent> xModel(getModel(), UNO_QUERY); + Reference<XComponent> xModel = getModel(); oox::core::XmlFilterBase::putPropertiesToDocumentGrabBag(xModel, aGrabBagProperties); } } void XmlFilterBase::exportCustomFragments() { - Reference<XComponent> xModel(getModel(), UNO_QUERY); + Reference<XComponent> xModel = getModel(); uno::Reference<beans::XPropertySet> xPropSet(xModel, uno::UNO_QUERY_THROW); uno::Reference<beans::XPropertySetInfo> 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 <sal/config.h> #include <sal/log.hxx> +#include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/document/XUndoManager.hpp> @@ -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; |