diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-23 10:15:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-23 15:25:26 +0200 |
commit | 8a54339fc83fe9abaaace6f9f374697e6923d684 (patch) | |
tree | 516e82bb9eca2d586aa7acebbe369f67ff707a7f /package | |
parent | d34f1df73806e9ca05fa0d07da619e2c0f01b6f7 (diff) |
loplugin:referencecasting look through more clang Types
Note that because of where the fix resides, loplugin:redundantcast
also notices a few more things.
Change-Id: I0b66047fadfff2c5ceafcbd3eab085de00d861a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120865
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'package')
-rw-r--r-- | package/source/xstor/ocompinstream.cxx | 2 | ||||
-rw-r--r-- | package/source/xstor/xstorage.cxx | 3 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageFolder.cxx | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/package/source/xstor/ocompinstream.cxx b/package/source/xstor/ocompinstream.cxx index 17092d9a54cd..783b426a9af7 100644 --- a/package/source/xstor/ocompinstream.cxx +++ b/package/source/xstor/ocompinstream.cxx @@ -165,7 +165,7 @@ uno::Reference< io::XInputStream > SAL_CALL OInputCompStream::getInputStream() throw lang::DisposedException(); } - return uno::Reference< io::XInputStream >( static_cast< io::XInputStream* >( this ), uno::UNO_QUERY ); + return this; } uno::Reference< io::XOutputStream > SAL_CALL OInputCompStream::getOutputStream() diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 470ec4468130..58524e525e85 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -2031,8 +2031,7 @@ void OStorage::MakeLinkToSubComponent_Impl( const uno::Reference< lang::XCompone m_pData->m_pSubElDispListener = new OChildDispListener_Impl( *this ); } - xComponent->addEventListener( uno::Reference< lang::XEventListener >( - static_cast< ::cppu::OWeakObject* >(m_pData->m_pSubElDispListener.get()), uno::UNO_QUERY)); + xComponent->addEventListener( m_pData->m_pSubElDispListener ); m_pData->m_aOpenSubComponentsVector.emplace_back(xComponent ); } diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index f3099c5b31f3..838bed728069 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -170,12 +170,12 @@ void SAL_CALL ZipPackageFolder::insertByName( const OUString& aName, const uno:: if ( ( nTest = xRef->getSomething ( ZipPackageFolder::getUnoTunnelId() ) ) != 0 ) { ZipPackageFolder *pFolder = reinterpret_cast < ZipPackageFolder * > ( nTest ); - pEntry = static_cast < ZipPackageEntry * > ( pFolder ); + pEntry = pFolder; } else if ( ( nTest = xRef->getSomething ( ZipPackageStream::getUnoTunnelId() ) ) != 0 ) { ZipPackageStream *pStream = reinterpret_cast < ZipPackageStream * > ( nTest ); - pEntry = static_cast < ZipPackageEntry * > ( pStream ); + pEntry = pStream; } else throw IllegalArgumentException(THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); |