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 /dbaccess | |
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 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/TokenWriter.cxx | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 5a1f2f9767ea..f9871eaee981 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -1096,7 +1096,7 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos) try { OUString sCellText; - Reference< XGridFieldDataSupplier > xFieldData(static_cast< XGridPeer* >(GetPeer()), UNO_QUERY); + Reference< XGridFieldDataSupplier > xFieldData(GetPeer()); Sequence<sal_Bool> aSupportingText = xFieldData->queryFieldDataType(cppu::UnoType<decltype(sCellText)>::get()); if (aSupportingText.getConstArray()[nColumnPos]) { @@ -1197,7 +1197,7 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) try { // assume that text can be dropped into a field if the column has a css::awt::XTextComponent interface - Reference< XIndexAccess > xColumnControls(static_cast<css::form::XGridPeer*>(GetPeer()), UNO_QUERY); + Reference< XIndexAccess > xColumnControls(GetPeer()); if (xColumnControls.is()) { Reference< css::awt::XTextComponent > xColControl( diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 619b10095e4a..005ee1d03a70 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -120,7 +120,7 @@ void ODatabaseImportExport::dispose() Reference< XComponent > xComponent(m_xConnection, UNO_QUERY); if (xComponent.is()) { - Reference< XEventListener> xEvt(static_cast<cppu::OWeakObject*>(this),UNO_QUERY); + Reference< XEventListener> xEvt(this); xComponent->removeEventListener(xEvt); } m_xConnection.clear(); @@ -163,7 +163,7 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor { Reference< XConnection > xPureConn( _aDataDescriptor[DataAccessDescriptorProperty::Connection], UNO_QUERY ); m_xConnection.reset( xPureConn, SharedConnection::NoTakeOwnership ); - Reference< XEventListener> xEvt(static_cast<cppu::OWeakObject*>(this),UNO_QUERY); + Reference< XEventListener> xEvt(this); Reference< XComponent > xComponent(m_xConnection, UNO_QUERY); if (xComponent.is() && xEvt.is()) xComponent->addEventListener(xEvt); @@ -212,7 +212,7 @@ void ODatabaseImportExport::initialize() { // we need a connection OSL_ENSURE(!m_sDataSourceName.isEmpty(),"There must be a datsource name!"); Reference<XNameAccess> xDatabaseContext( DatabaseContext::create(m_xContext), UNO_QUERY_THROW); - Reference< XEventListener> xEvt(static_cast<cppu::OWeakObject*>(this),UNO_QUERY); + Reference< XEventListener> xEvt(this); Reference< XConnection > xConnection; SQLExceptionInfo aInfo = ::dbaui::createConnection( m_sDataSourceName, xDatabaseContext, m_xContext, xEvt, xConnection ); |