From e4ff847fe0796420ba8023b70cad8589f5f19e9f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 9 Apr 2022 09:55:12 +0200 Subject: loplugin:stringview check for getToken and trim since we now have o3tl versions of those that work on string_view. Also improve those o3tl functions to support both string_view and u16string_view Change-Id: Iacab2996becec62aa78a5597c52d983bb784749a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132755 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/ui/misc/bookmark.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw/source/ui/misc/bookmark.cxx') diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 3ddd08d14b6d..257e9c4a052f 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -501,7 +502,7 @@ OUString BookmarkTable::GetNameProposal() const sw::mark::IMark* pBookmark = weld::fromId(m_xControl->get_id(i)); const OUString& sName = pBookmark->GetName(); sal_Int32 nIndex = 0; - if (sName.getToken(0, ' ', nIndex) == sDefaultBookmarkName) + if (o3tl::getToken(sName, 0, ' ', nIndex) == sDefaultBookmarkName) { sal_Int32 nCurrBookmarkId = sName.getToken(0, ' ', nIndex).toInt32(); nHighestBookmarkId = std::max(nHighestBookmarkId, nCurrBookmarkId); -- cgit