summaryrefslogtreecommitdiff
path: root/sw/source/uibase/misc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-12 12:43:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-13 08:38:53 +0200
commitfdfd517a6f75e394ddcb1e195decbfed33ba56b9 (patch)
treee3bff14e5531affcd908415b4e85d7ceac4aa1fd /sw/source/uibase/misc
parente568c9dca8b93b96a8a130a8fb6f1bba1a33d6ea (diff)
loplugin:stringviewparam whitelist some more functions
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/misc')
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index 291ef3cf4050..53c4d2df5338 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -245,12 +245,12 @@ bool SwGlossaries::RenameGroupDoc(
}
// Deletes a text block group
-bool SwGlossaries::DelGroupDoc(const OUString &rName)
+bool SwGlossaries::DelGroupDoc(std::u16string_view rName)
{
sal_uInt16 nPath = o3tl::narrowing<sal_uInt16>(o3tl::toInt32(o3tl::getToken(rName, 1, GLOS_DELIM)));
if (static_cast<size_t>(nPath) >= m_PathArr.size())
return false;
- const OUString sBaseName(rName.getToken(0, GLOS_DELIM));
+ const std::u16string_view sBaseName(o3tl::getToken(rName, 0, GLOS_DELIM));
const OUString sFileURL = lcl_FullPathName(m_PathArr[nPath], sBaseName);
const OUString aName = sBaseName + OUStringChar(GLOS_DELIM) + OUString::number(nPath);
// Even if the file doesn't exist it has to be deleted from
@@ -474,13 +474,13 @@ void SwGlossaries::RemoveFileFromList( const OUString& rGroup )
m_GlosArr.erase(it);
}
-OUString SwGlossaries::GetCompleteGroupName( const OUString& rGroupName )
+OUString SwGlossaries::GetCompleteGroupName( std::u16string_view rGroupName )
{
const size_t nCount = GetGroupCnt();
// when the group name was created internally the path is here as well
sal_Int32 nIndex = 0;
- const OUString sGroupName(rGroupName.getToken(0, GLOS_DELIM, nIndex));
- const bool bPathLen = !rGroupName.getToken(0, GLOS_DELIM, nIndex).isEmpty();
+ const std::u16string_view sGroupName(o3tl::getToken(rGroupName, 0, GLOS_DELIM, nIndex));
+ const bool bPathLen = !o3tl::getToken(rGroupName, 0, GLOS_DELIM, nIndex).empty();
for ( size_t i = 0; i < nCount; i++ )
{
const OUString sGrpName = GetGroupName(i);
@@ -519,7 +519,7 @@ void SwGlossaries::InvalidateUNOOjects()
UnoAutoTextEntries().swap(m_aGlossaryEntries);
}
-Reference< text::XAutoTextGroup > SwGlossaries::GetAutoTextGroup( const OUString& _rGroupName )
+Reference< text::XAutoTextGroup > SwGlossaries::GetAutoTextGroup( std::u16string_view _rGroupName )
{
bool _bCreate = true;
// first, find the name with path-extension