diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-14 08:16:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-14 08:17:32 +0200 |
commit | d366c9b20ec86f3fe521812a0c22def3bfd1f05e (patch) | |
tree | 4bd09438c8cd8f0dbcd0881fc923d56a0a721fc5 /ucbhelper | |
parent | d2fa59e4025050c9b668ecff379d668f0db52639 (diff) |
remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
Diffstat (limited to 'ucbhelper')
-rw-r--r-- | ucbhelper/source/client/proxydecider.cxx | 6 | ||||
-rw-r--r-- | ucbhelper/source/provider/providerhelper.cxx | 18 |
2 files changed, 9 insertions, 15 deletions
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx index 55a8e7bbfed9..be3f570a3304 100644 --- a/ucbhelper/source/client/proxydecider.cxx +++ b/ucbhelper/source/client/proxydecider.cxx @@ -427,7 +427,7 @@ bool InternetProxyDecider_Impl::shouldUseProxy( const OUString & rHost, OUStringBuffer aBuffer; if ( ( rHost.indexOf( ':' ) != -1 ) && - ( rHost[ 0 ] != sal_Unicode( '[' ) ) ) + ( rHost[ 0 ] != '[' ) ) { // host is given as numeric IPv6 address aBuffer.appendAscii( "[" ); @@ -440,7 +440,7 @@ bool InternetProxyDecider_Impl::shouldUseProxy( const OUString & rHost, aBuffer.append( rHost ); } - aBuffer.append( sal_Unicode( ':' ) ); + aBuffer.append( ':' ); aBuffer.append( OUString::number( nPort ) ); const OUString aHostAndPort( aBuffer.makeStringAndClear() ); @@ -496,7 +496,7 @@ const InternetProxyServer & InternetProxyDecider_Impl::getProxy( OUString aHost; - if ( ( rHost[ 0 ] == sal_Unicode( '[' ) ) && + if ( ( rHost[ 0 ] == '[' ) && ( rHost.getLength() > 1 ) ) { // host is given as numeric IPv6 address. name resolution diff --git a/ucbhelper/source/provider/providerhelper.cxx b/ucbhelper/source/provider/providerhelper.cxx index 28337b95219a..2949f6473eeb 100644 --- a/ucbhelper/source/provider/providerhelper.cxx +++ b/ucbhelper/source/provider/providerhelper.cxx @@ -377,11 +377,9 @@ sal_Bool ContentProviderImplHelper::renameAdditionalPropertySet( { OUString aOldKeyWithSlash = rOldKey; OUString aOldKeyWithoutSlash; - if ( aOldKeyWithSlash.lastIndexOf( - sal_Unicode('/') - != aOldKeyWithSlash.getLength() - 1 ) ) + if ( !aOldKeyWithSlash.endsWith("/") ) { - aOldKeyWithSlash += OUString( sal_Unicode('/') ); + aOldKeyWithSlash += OUString( '/' ); aOldKeyWithoutSlash = rOldKey; } else if ( !rOldKey.isEmpty() ) @@ -464,11 +462,9 @@ sal_Bool ContentProviderImplHelper::copyAdditionalPropertySet( { OUString aSrcKeyWithSlash = rSourceKey; OUString aSrcKeyWithoutSlash; - if ( aSrcKeyWithSlash.lastIndexOf( - sal_Unicode('/') - != aSrcKeyWithSlash.getLength() - 1 ) ) + if ( !aSrcKeyWithSlash.endsWith("/") ) { - aSrcKeyWithSlash += OUString( sal_Unicode('/') ); + aSrcKeyWithSlash += OUString( '/' ); aSrcKeyWithoutSlash = rSourceKey; } else if ( !rSourceKey.isEmpty() ) @@ -603,11 +599,9 @@ sal_Bool ContentProviderImplHelper::removeAdditionalPropertySet( { OUString aKeyWithSlash = rKey; OUString aKeyWithoutSlash; - if ( aKeyWithSlash.lastIndexOf( - sal_Unicode('/') - != aKeyWithSlash.getLength() - 1 ) ) + if ( !aKeyWithSlash.endsWith("/") ) { - aKeyWithSlash += OUString( (sal_Unicode)'/' ); + aKeyWithSlash += OUString( '/' ); aKeyWithoutSlash = rKey; } else if ( !rKey.isEmpty() ) |