From fd40ba1e2eb709c34672b0e20052fe4f9130739f Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 13 Jul 2017 11:44:34 +0200 Subject: loplugin:oncevar: empty strings: ucb Change-Id: If97b0dbeaced579bf23f9f77d431d1085ab89594 --- ucb/source/ucp/cmis/cmis_repo_content.cxx | 4 +--- ucb/source/ucp/ftp/ftpcontent.cxx | 4 ++-- ucb/source/ucp/gio/gio_content.cxx | 3 +-- ucb/source/ucp/gio/gio_mount.cxx | 4 ++-- ucb/source/ucp/webdav-neon/webdavcontent.cxx | 6 ++---- 5 files changed, 8 insertions(+), 13 deletions(-) (limited to 'ucb/source') diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx index e1754666879d..d12cbdae8a27 100644 --- a/ucb/source/ucp/cmis/cmis_repo_content.cxx +++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx @@ -309,13 +309,11 @@ namespace cmis OUString RepoContent::getParentURL( ) { - OUString sRet; - SAL_INFO( "ucb.ucp.cmis", "RepoContent::getParentURL()" ); // TODO Implement me - return sRet; + return OUString(); } XTYPEPROVIDER_COMMON_IMPL( RepoContent ); diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index 287d7eb88bc4..5546a56f8005 100644 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.cxx @@ -247,7 +247,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand, if(action == THROWAUTHENTICATIONREQUEST) { // try to get a continuation first - OUString aRealm,aPassword,aAccount; + OUString aPassword,aAccount; m_pFCP->forHost(m_aFTPURL.host(), m_aFTPURL.port(), m_aFTPURL.username(), @@ -258,7 +258,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand, m_aFTPURL.ident(false, false), m_aFTPURL.host(), // ServerName ucbhelper::SimpleAuthenticationRequest::ENTITY_NA, - aRealm, + OUString(), ucbhelper::SimpleAuthenticationRequest ::ENTITY_FIXED, m_aFTPURL.username(), diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index c1bb36ff71c4..6cd665ccbd21 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -151,7 +151,6 @@ uno::Any convertToException(GError *pError, const uno::Reference< uno::XInterfac g_error_free(pError); OUString sName; - OUString sHost; uno::Sequence< uno::Any > aArgs( 1 ); aArgs[ 0 ] <<= sName; @@ -259,7 +258,7 @@ uno::Any convertToException(GError *pError, const uno::Reference< uno::XInterfac break; case G_IO_ERROR_HOST_NOT_FOUND: { ucb::InteractiveNetworkResolveNameException aExcept(sMessage, rContext, - task::InteractionClassification_ERROR, sHost); + task::InteractionClassification_ERROR, OUString()); EXCEPT(aExcept);} break; default: diff --git a/ucb/source/ucp/gio/gio_mount.cxx b/ucb/source/ucp/gio/gio_mount.cxx index 75aa07e7061f..aa955ac77d60 100644 --- a/ucb/source/ucp/gio/gio_mount.cxx +++ b/ucb/source/ucp/gio/gio_mount.cxx @@ -81,7 +81,7 @@ static void ooo_mount_operation_ask_password (GMountOperation *op, return; } - OUString aHostName, aDomain, aUserName, aPassword; + OUString aDomain, aUserName, aPassword; ucbhelper::SimpleAuthenticationRequest::EntityType eUserName = (flags & G_ASK_PASSWORD_NEED_USERNAME) @@ -118,7 +118,7 @@ static void ooo_mount_operation_ask_password (GMountOperation *op, aDomain = OUString(default_domain, strlen(default_domain), RTL_TEXTENCODING_UTF8); rtl::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest - = new ucbhelper::SimpleAuthenticationRequest (OUString() /* FIXME: provide URL here */, aHostName, eDomain, aDomain, eUserName, aUserName, ePassword, aPassword); + = new ucbhelper::SimpleAuthenticationRequest (OUString() /* FIXME: provide URL here */, OUString(), eDomain, aDomain, eUserName, aUserName, ePassword, aPassword); xIH->handle( xRequest.get() ); diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx index ecf173d78cf8..16d0d910c5f5 100644 --- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx @@ -4257,8 +4257,7 @@ bool Content::isResourceAvailable( const css::uno::Reference< css::ucb::XCommand // if HEAD is successful, set element found, rResAccess->HEAD( aHeaderNames, aResource, xEnv ); rDAVOptions.setHttpResponseStatusCode( 0 ); - OUString aNoText; - rDAVOptions.setHttpResponseStatusText( aNoText ); + rDAVOptions.setHttpResponseStatusText( OUString() ); return true; } catch ( DAVException const & e ) @@ -4311,8 +4310,7 @@ bool Content::isResourceAvailable( const css::uno::Reference< css::ucb::XCommand } // set SC_NOT_IMPLEMENTED since at a minimum GET must be implemented in a basic Web server rDAVOptions.setHttpResponseStatusCode( SC_NOT_IMPLEMENTED ); - OUString HttpResponseStatusText; - rDAVOptions.setHttpResponseStatusText( HttpResponseStatusText ); + rDAVOptions.setHttpResponseStatusText( OUString() ); return false; } -- cgit