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 --- sc/source/core/data/drwlayer.cxx | 3 ++- sc/source/core/tool/chartlock.cxx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'sc/source/core') diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index e9deb74010bc..48a0dacbac4a 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -1731,7 +1732,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const if ( pNewObject->GetObjIdentifier() == OBJ_OLE2 ) { uno::Reference< embed::XEmbeddedObject > xIPObj = static_cast(pNewObject)->GetObjRef(); - uno::Reference< embed::XClassifiedObject > xClassified( xIPObj, uno::UNO_QUERY ); + uno::Reference< embed::XClassifiedObject > xClassified = xIPObj; SvGlobalName aObjectClassName; if ( xClassified.is() ) { diff --git a/sc/source/core/tool/chartlock.cxx b/sc/source/core/tool/chartlock.cxx index 7496103e5117..f1ecef38df5e 100644 --- a/sc/source/core/tool/chartlock.cxx +++ b/sc/source/core/tool/chartlock.cxx @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -61,7 +62,7 @@ std::vector< WeakReference< frame::XModel > > lcl_getAllLivingCharts( ScDocument if( ScDocument::IsChart( pObject ) ) { uno::Reference< embed::XEmbeddedObject > xIPObj = static_cast(pObject)->GetObjRef(); - uno::Reference< embed::XComponentSupplier > xCompSupp( xIPObj, uno::UNO_QUERY ); + uno::Reference< embed::XComponentSupplier > xCompSupp = xIPObj; if( xCompSupp.is()) { Reference< frame::XModel > xModel( xCompSupp->getComponent(), uno::UNO_QUERY ); -- cgit v1.2.3