From 11bdb6b9d9df991bb4ee48d4682458facaa2bdd5 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 8 May 2020 14:33:47 +0200 Subject: improve loplugin:referencecasting to catch a few more cases Change-Id: I0323fba51bb2b4ba255e1db5aa0d890c5c6a2e1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93726 Tested-by: Jenkins Reviewed-by: Noel Grandin --- dbaccess/source/core/api/CRowSetDataColumn.cxx | 2 +- dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 2 +- dbaccess/source/ui/app/AppControllerGen.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx index 3c03ad32c2ec..f1d845e11517 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.cxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx @@ -213,7 +213,7 @@ sdbcx::ObjectType ORowSetDataColumns::createObject(const OUString& _rName) ::comphelper::UStringMixEqual aCase(isCaseSensitive()); ::connectivity::OSQLColumns::Vector::const_iterator first = ::connectivity::find(m_aColumns->begin(),m_aColumns->end(),_rName,aCase); if(first != m_aColumns->end()) - xNamed.set(*first,UNO_QUERY); + xNamed = *first; return xNamed; } diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 62709c8e7902..9f96f84295c7 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -885,7 +885,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) // we can now only look if we found it under the realname property // here we have to make the assumption that the position is correct OSQLColumns::Vector::const_iterator aFind2 = aSelectColumns->begin() + i-1; - Reference xProp(*aFind2,UNO_QUERY); + Reference xProp = *aFind2; if ( !xProp.is() || !xProp->getPropertySetInfo()->hasPropertyByName( PROPERTY_REALNAME ) ) continue; diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 8eb52b89db76..2466f22df062 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -701,7 +701,7 @@ void OApplicationController::doAction(sal_uInt16 _nId, const ElementOpenMode _eO { try { - Reference< XModel > xModel(component.second,UNO_QUERY); + Reference< XModel > xModel = component.second; // Send document as e-Mail using stored/default type eResult = aSendMail.AttachDocument(xModel,component.first); -- cgit v1.2.3