From c6665a1afef58e99d56b07a776964445689c22ca Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Wed, 7 Nov 2018 22:26:47 +0100 Subject: Avoid getTokenCount() Change-Id: I1f6468e1050924b0c6f6971ad6276932a3c91f75 --- dbaccess/source/core/misc/dsntypes.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dbaccess') diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index a3ba367f4f9a..28de7a44640d 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -208,7 +208,7 @@ void ODsnTypeCollection::extractHostNamePort(const OUString& _rDsn,OUString& _sD _rsHostname = sUrl.getToken(0,':'); } if ( !_rsHostname.isEmpty() ) - _rsHostname = _rsHostname.getToken(comphelper::string::getTokenCount(_rsHostname, '@') - 1, '@'); + _rsHostname = _rsHostname.copy(_rsHostname.lastIndexOf('@')+1); _sDatabaseName = sUrl.getToken(nUrlTokens - 1, ':'); } else if ( _rDsn.startsWithIgnoreAsciiCase("sdbc:address:ldap:") ) -- cgit