[Libreoffice-commits] core.git: sw/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Sat Aug 8 06:46:26 UTC 2020
sw/source/core/fields/reffld.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 47b19a51c47332981b89c250c69ec240c811a325
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Aug 7 14:45:06 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Aug 8 08:45:51 2020 +0200
Make use of std string_view
Change-Id: I81d8a0ccff0a9d0ff1aa7fbb6006e80e1fce76fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100315
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index b96f35b999f4..7b8adb96bbd0 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -61,6 +61,7 @@
#include <memory>
#include <vector>
#include <set>
+#include <string_view>
#include <map>
#include <algorithm>
@@ -274,8 +275,8 @@ static void lcl_formatReferenceLanguage( OUString& rRefText,
// ASCII 1-letter numbering
// az a), e), f) ... x)
// az i., v. (but, a x.)
- static const OUString sLettersStartingWithVowels = "aefilmnorsuxyAEFILMNORSUXY";
- if (sLettersStartingWithVowels.indexOf(sNumbering[0]) != -1)
+ static const std::u16string_view sLettersStartingWithVowels = u"aefilmnorsuxyAEFILMNORSUXY";
+ if (sLettersStartingWithVowels.find(sNumbering[0]) != std::u16string_view::npos)
{
// x), X) are letters, but x. and X. etc. are Roman numbers
if (bClosingParenthesis ||
More information about the Libreoffice-commits
mailing list