summaryrefslogtreecommitdiff
path: root/ucbhelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-27 20:42:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-28 20:56:18 +0200
commitd9c3f05dcb6c03633bbcc8d88e55237a0855d9a5 (patch)
tree1884ad11b1453289155ea0b816d0f52ea1b0b01f /ucbhelper
parentac1c31a577e6fb0efa05ff0ab098ee62f50cb88a (diff)
use more string_view in ucbhelper
Change-Id: Ief60eda8be8e184b9d637ab84fec2f8740c04396 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133554 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucbhelper')
-rw-r--r--ucbhelper/source/client/proxydecider.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx
index 10228b72aedc..cf10fda8baa3 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -157,7 +157,7 @@ public:
virtual void SAL_CALL disposing( const lang::EventObject& Source ) override;
private:
- void setNoProxyList( const OUString & rNoProxyList );
+ void setNoProxyList( std::u16string_view rNoProxyList );
};
@@ -809,29 +809,28 @@ void SAL_CALL InternetProxyDecider_Impl::disposing(const lang::EventObject&)
}
-void InternetProxyDecider_Impl::setNoProxyList(
- const OUString & rNoProxyList )
+void InternetProxyDecider_Impl::setNoProxyList( std::u16string_view rNoProxyList )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
m_aNoProxyList.clear();
- if ( rNoProxyList.isEmpty() )
+ if ( rNoProxyList.empty() )
return;
// List of connection endpoints hostname[:port],
// separated by semicolon. Wildcards allowed.
- sal_Int32 nPos = 0;
- sal_Int32 nEnd = rNoProxyList.indexOf( ';' );
- sal_Int32 nLen = rNoProxyList.getLength();
+ size_t nPos = 0;
+ size_t nEnd = rNoProxyList.find( ';' );
+ size_t nLen = rNoProxyList.size();
do
{
- if ( nEnd == -1 )
+ if ( nEnd == std::u16string_view::npos )
nEnd = nLen;
- OUString aToken = rNoProxyList.copy( nPos, nEnd - nPos );
+ OUString aToken( rNoProxyList.substr( nPos, nEnd - nPos ) );
if ( !aToken.isEmpty() )
{
@@ -910,7 +909,7 @@ void InternetProxyDecider_Impl::setNoProxyList(
if ( nEnd != nLen )
{
nPos = nEnd + 1;
- nEnd = rNoProxyList.indexOf( ';', nPos );
+ nEnd = rNoProxyList.find( ';', nPos );
}
}
while ( nEnd != nLen );