summaryrefslogtreecommitdiff
path: root/oox/source/core/xmlfilterbase.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-02-23 21:06:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-02-25 08:37:17 +0100
commitb7a1e92a27bc26f222526eb50ab80c0e6966be7a (patch)
tree4f3825cc2f483e4576d1e3849a759b73fdc969f9 /oox/source/core/xmlfilterbase.cxx
parente6b9bc3f2ecf0fb7fde5b02f9d750ccbe022f4c1 (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/source/core/xmlfilterbase.cxx')
-rw-r--r--oox/source/core/xmlfilterbase.cxx7
1 files changed, 4 insertions, 3 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();