diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-04 11:14:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-05 12:57:00 +0200 |
commit | 9f1701d01d9f664828356976d8592492f85b30f5 (patch) | |
tree | a91eaef0674591af87b06096fdd186283559a8de /cui | |
parent | b8bb44161aeb6e00526a38343b63e678ce7d4a1a (diff) |
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>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/CustomNotebookbarGenerator.cxx | 3 | ||||
-rw-r--r-- | cui/source/customize/SvxNotebookbarConfigPage.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/scriptdlg.cxx | 3 | ||||
-rw-r--r-- | cui/source/options/optaboutconfig.cxx | 1 | ||||
-rw-r--r-- | cui/source/options/optpath.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 5 |
6 files changed, 10 insertions, 6 deletions
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 <com/sun/star/frame/ModuleManager.hpp> #include <unotools/confignode.hxx> #include <libxml/parser.h> +#include <o3tl/string_view.hxx> #define aUIPropertiesCount 3 @@ -187,7 +188,7 @@ void CustomNotebookbarGenerator::modifyCustomizedUIFile(const Sequence<OUString> 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 <comphelper/SetFlagContextHelper.hxx> #include <comphelper/documentinfo.hxx> #include <comphelper/processfactory.hxx> +#include <o3tl/string_view.hxx> #include <svtools/imagemgr.hxx> #include <tools/urlobj.hxx> @@ -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 <o3tl/safeint.hxx> +#include <o3tl/string_view.hxx> #include "optaboutconfig.hxx" #include <comphelper/processfactory.hxx> 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 <comphelper/processfactory.hxx> #include <comphelper/propertyvalue.hxx> #include <svx/svxids.hrc> +#include <o3tl/string_view.hxx> #include <algorithm> #include <memory> @@ -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<aUserImageURL.getLength()) aFileName = aUserImageURL.copy(nPos); - OUString aUserGalleryURL = aPathToken + "/" + aFileName; + OUString aUserGalleryURL = OUString::Concat(aPathToken) + "/" + aFileName; INetURLObject aURL( aUserImageURL ); DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" ); |