summaryrefslogtreecommitdiff
path: root/ucbhelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-30 10:39:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-30 11:37:59 +0000
commitdb9912d824c1d621fdc409b9cdd6c79caefe1327 (patch)
tree5a3c905b93df25b5baf3c773927778c6f7fc4389 /ucbhelper
parent6b19f32252f8ba5540ce3b1e38f8ac6112421906 (diff)
loplugin:stringadd in ucbhelper..uui
when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: I49549347c1c041cc9ce103aed1fe1cc3bc1a780f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149751 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucbhelper')
-rw-r--r--ucbhelper/source/client/proxydecider.cxx23
1 files changed, 6 insertions, 17 deletions
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx
index 10228b72aedc..862347465066 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -410,9 +410,7 @@ bool InternetProxyDecider_Impl::shouldUseProxy( std::u16string_view rHost,
( rHost[ 0 ] != '[' ) )
{
// host is given as numeric IPv6 address
- aBuffer.append( "[" );
- aBuffer.append( rHost );
- aBuffer.append( "]" );
+ aBuffer.append( OUString::Concat("[") + rHost + "]" );
}
else
{
@@ -420,20 +418,18 @@ bool InternetProxyDecider_Impl::shouldUseProxy( std::u16string_view rHost,
aBuffer.append( rHost );
}
- aBuffer.append( ':' );
- aBuffer.append( nPort );
- const OUString aHostAndPort( aBuffer.makeStringAndClear() );
+ aBuffer.append( ":" + OUString::number( nPort ) );
for (auto const& noProxy : m_aNoProxyList)
{
if ( bUseFullyQualified )
{
- if ( noProxy.second.Matches( aHostAndPort ) )
+ if ( noProxy.second.Matches( aBuffer ) )
return false;
}
else
{
- if ( noProxy.first.Matches( aHostAndPort ) )
+ if ( noProxy.first.Matches( aBuffer ) )
return false;
}
}
@@ -889,17 +885,10 @@ void InternetProxyDecider_Impl::setNoProxyList(
if ( aTmp != aServer.toAsciiLowerCase() )
{
if ( bIPv6Address )
- {
- aFullyQualifiedHost.append( "[" );
- aFullyQualifiedHost.append( aTmp );
- aFullyQualifiedHost.append( "]" );
- }
+ aFullyQualifiedHost.append( "[" + aTmp + "]" );
else
- {
aFullyQualifiedHost.append( aTmp );
- }
- aFullyQualifiedHost.append( ":" );
- aFullyQualifiedHost.append( aPort );
+ aFullyQualifiedHost.append( ":" + aPort );
}
}