summaryrefslogtreecommitdiff
path: root/UnoControls
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-21 14:46:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-21 16:04:20 +0200
commit01782ecd9fb1e712925cdeb29694faad3c6beed7 (patch)
treee5d6050f3b327cd3db2b2a4a7651cbfaca6625e5 /UnoControls
parentbac57f75cd18472167742e804d789ffbc43fa9a9 (diff)
loplugin:referencecasting in various
Change-Id: Id4e3d9d1bbfd47181299568afec45e996eb1eed5 Reviewed-on: https://gerrit.libreoffice.org/76071 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'UnoControls')
-rw-r--r--UnoControls/source/base/basecontrol.cxx2
-rw-r--r--UnoControls/source/controls/OConnectionPointContainerHelper.cxx3
2 files changed, 2 insertions, 3 deletions
diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx
index 6294376f487f..fc9d0b890d0b 100644
--- a/UnoControls/source/base/basecontrol.cxx
+++ b/UnoControls/source/base/basecontrol.cxx
@@ -353,7 +353,7 @@ Reference< XView > SAL_CALL BaseControl::getView()
{
// Ready for multithreading
MutexGuard aGuard( m_aMutex );
- return Reference< XView >( static_cast<OWeakObject*>(this), UNO_QUERY );
+ return this;
}
// XControl
diff --git a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
index 9146d66e87d4..6d24cbb1ff87 100644
--- a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
+++ b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
@@ -111,8 +111,7 @@ Reference< XConnectionPoint > SAL_CALL OConnectionPointContainerHelper::queryCon
// Ready for multithreading
MutexGuard aGuard( m_aSharedMutex );
// If this container contains elements, build a connectionpoint-instance.
- OConnectionPointHelper* pNewConnectionPoint = new OConnectionPointHelper( m_aSharedMutex, this, aType );
- xConnectionPoint.set( static_cast<OWeakObject*>(pNewConnectionPoint), UNO_QUERY );
+ xConnectionPoint = new OConnectionPointHelper( m_aSharedMutex, this, aType );
}
return xConnectionPoint;