From 7272951c121735a7350fa70840b255b7ef831f1a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 20 Jul 2019 18:26:07 +0200 Subject: loplugin:referencecasting in unotools..uui Change-Id: Ia2c991591e65deb00710ab7a5b73bc42ae6b1b46 Reviewed-on: https://gerrit.libreoffice.org/76031 Tested-by: Jenkins Reviewed-by: Noel Grandin --- uui/source/iahndl-filter.cxx | 4 +--- uui/source/passwordcontainer.cxx | 16 ++++++---------- 2 files changed, 7 insertions(+), 13 deletions(-) (limited to 'uui/source') diff --git a/uui/source/iahndl-filter.cxx b/uui/source/iahndl-filter.cxx index a2cdb255a6d9..25a13a84e275 100644 --- a/uui/source/iahndl-filter.cxx +++ b/uui/source/iahndl-filter.cxx @@ -244,9 +244,7 @@ handleFilterOptionsRequest_( document::XImporter > xImporter( xFilterDialog, uno::UNO_QUERY ); if( xImporter.is() ) - xImporter->setTargetDocument( - uno::Reference< lang::XComponent >( - rRequest.rModel, uno::UNO_QUERY ) ); + xImporter->setTargetDocument( rRequest.rModel ); xFilterProperties->setPropertyValues( rRequest.rProperties ); diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx index 5335930c1199..7b94a87fd14d 100644 --- a/uui/source/passwordcontainer.cxx +++ b/uui/source/passwordcontainer.cxx @@ -123,8 +123,6 @@ bool PasswordContainerHelper::handleAuthenticationRequest( OUString const & rURL, uno::Reference< task::XInteractionHandler2 > const & xIH ) { - uno::Reference< task::XInteractionHandler > xIH1(xIH, uno::UNO_QUERY); - // Is continuation even a XInteractionSupplyAuthentication2, which // is derived from XInteractionSupplyAuthentication? uno::Reference< ucb::XInteractionSupplyAuthentication2 > @@ -174,12 +172,12 @@ bool PasswordContainerHelper::handleAuthenticationRequest( { task::UrlRecord aRec; if ( !rURL.isEmpty() ) - aRec = m_xPasswordContainer->find(rURL, xIH1); + aRec = m_xPasswordContainer->find(rURL, xIH); if ( !aRec.UserList.hasElements() ) { // compat: try server name. - aRec = m_xPasswordContainer->find(rRequest.ServerName, xIH1); + aRec = m_xPasswordContainer->find(rRequest.ServerName, xIH); } if ( fillContinuation( false, @@ -198,13 +196,13 @@ bool PasswordContainerHelper::handleAuthenticationRequest( task::UrlRecord aRec; if ( !rURL.isEmpty() ) aRec = m_xPasswordContainer->findForName( - rURL, rRequest.UserName, xIH1); + rURL, rRequest.UserName, xIH); if ( !aRec.UserList.hasElements() ) { // compat: try server name. aRec = m_xPasswordContainer->findForName( - rRequest.ServerName, rRequest.UserName, xIH1); + rRequest.ServerName, rRequest.UserName, xIH); } if ( fillContinuation( false, @@ -233,8 +231,6 @@ bool PasswordContainerHelper::addRecord( uno::Reference< task::XInteractionHandler2 > const & xIH, bool bPersist ) { - uno::Reference< task::XInteractionHandler > xIH1(xIH, uno::UNO_QUERY); - try { if ( !rUsername.isEmpty() ) @@ -254,13 +250,13 @@ bool PasswordContainerHelper::addRecord( m_xPasswordContainer->addPersistent( rURL, rUsername, rPasswords, - xIH1 ); + xIH ); } else m_xPasswordContainer->add( rURL, rUsername, rPasswords, - xIH1 ); + xIH ); } else { -- cgit