From 9f1701d01d9f664828356976d8592492f85b30f5 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 4 Apr 2022 11:14:11 +0200 Subject: 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 --- cui/source/customize/CustomNotebookbarGenerator.cxx | 3 ++- cui/source/customize/SvxNotebookbarConfigPage.cxx | 2 +- cui/source/dialogs/scriptdlg.cxx | 3 ++- cui/source/options/optaboutconfig.cxx | 1 + cui/source/options/optpath.cxx | 2 +- cui/source/tabpages/numpages.cxx | 5 +++-- 6 files changed, 10 insertions(+), 6 deletions(-) (limited to 'cui') diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx b/cui/source/customize/CustomNotebookbarGenerator.cxx index c601d051ea11..9fb71562160a 100644 --- a/cui/source/customize/CustomNotebookbarGenerator.cxx +++ b/cui/source/customize/CustomNotebookbarGenerator.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #define aUIPropertiesCount 3 @@ -187,7 +188,7 @@ void CustomNotebookbarGenerator::modifyCustomizedUIFile(const Sequence for (sal_Int32 aIndex = 0; aIndex < aUIPropertiesCount; aIndex++) { sal_Int32 nPos = aIndex; - OUString sToken = aValue.getToken(nPos, ',', nPos); + std::u16string_view sToken = o3tl::getToken(aValue, nPos, ',', nPos); aProperties[aIndex] = OUStringToOString(sToken, RTL_TEXTENCODING_UTF8); } xmlDocPtr doc = notebookbarXMLParser(sCustomizedUIPath, aProperties[0], aProperties[1], diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index 9c80960c669e..99c15b8f3ca9 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -482,7 +482,7 @@ static void EditRegistryFile(std::u16string_view sUIItemId, const OUString& sSet for (int nIdx = 0; nIdx < aOldEntries.getLength(); nIdx++) { sal_Int32 rPos = 0; - OUString sFirstValue = aOldEntries[nIdx].getToken(rPos, ',', rPos); + std::u16string_view sFirstValue = o3tl::getToken(aOldEntries[nIdx], rPos, ',', rPos); if (sFirstValue == sUIItemId) { aOldEntries.getArray()[nIdx] = sSetEntry; diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index f7c2ac340c64..eacae26399aa 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -1048,7 +1049,7 @@ void SvxScriptOrgDialog::RestorePreviousSelection() sal_Int32 nIndex = 0; while (nIndex != -1) { - OUString aTmp( aStoredEntry.getToken( 0, ';', nIndex ) ); + std::u16string_view aTmp( o3tl::getToken(aStoredEntry, 0, ';', nIndex ) ); bool bTmpEntry; if (!xEntry) diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 6cd26a097a6c..314a039afb3e 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -8,6 +8,7 @@ */ #include +#include #include "optaboutconfig.hxx" #include diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 4d9359534f06..18c3e32a1deb 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -363,7 +363,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, StandardHdl_Impl, weld::Button&, void) do { bool bFound = false; - const OUString sOnePath = aOldPath.getToken( 0, MULTIPATH_DELIMITER, nOldPos ); + const std::u16string_view sOnePath = o3tl::getToken(aOldPath, 0, MULTIPATH_DELIMITER, nOldPos ); if ( !sInternal.isEmpty() ) { sal_Int32 nInternalPos = 0; diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index ebdb55ad06da..215e59b38a58 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -899,7 +900,7 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl, weld::Button&, voi return; OUString aPath = SvtPathOptions().GetGalleryPath(); - OUString aPathToken = aPath.getToken( 1 , SEARCHPATH_DELIMITER ); + std::u16string_view aPathToken = o3tl::getToken(aPath, 1 , SEARCHPATH_DELIMITER ); OUString aUserImageURL = aFileDialog.GetPath(); @@ -910,7 +911,7 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl, weld::Button&, voi else if (nPos