use more o3tl::getToken

found by inspecting call sites of OUString::getToken

Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2022-05-05 12:57:00 +02:00
parent b8bb44161a
commit 9f1701d01d
85 changed files with 358 additions and 321 deletions
@@ -30,6 +30,7 @@
#include <rtl/ustring.hxx>
#include <rtl/byteseq.hxx>
#include <jvmfwk/framework.hxx>
#include <o3tl/string_view.hxx>
static bool hasOption(char const * szOption, int argc, char** argv);
@@ -118,7 +119,7 @@ OString getLD_LIBRARY_PATH(const rtl::ByteSequence & vendorData)
OUString sData(chars, len / 2);
//the runtime lib is on the first line
sal_Int32 index = 0;
OUString aToken = sData.getToken( 1, '\n', index);
std::u16string_view aToken = o3tl::getToken(sData, 1, '\n', index);
OString paths =
OUStringToOString(aToken, osl_getThreadTextEncoding());
+1 -1
View File
@@ -1043,7 +1043,7 @@ void addJavaInfosFromPath(
sal_Int32 nIndex = 0;
do
{
OUString usToken = usAllPath.getToken( 0, SAL_PATHSEPARATOR, nIndex );
OUString usToken( usAllPath.getToken( 0, SAL_PATHSEPARATOR, nIndex ) );
OUString usTokenUrl;
if(File::getFileURLFromSystemPath(usToken, usTokenUrl) == File::E_None)
{