summaryrefslogtreecommitdiff
path: root/i18npool/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-04-12 08:29:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-12 12:57:22 +0200
commitc45bc08dc6e64352e11cf632b8ad868c312a62fe (patch)
tree4b665726f2a4ffb556e51915dcc5e2515c21d1b7 /i18npool/source
parent08495e24e899c2fd52b9724d993598189e12fc7e (diff)
loplugin:stringview whitelist getLength and isEmpty
Change-Id: I38f3410c0b25ff579879b9de1f266af4d8fd51e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150256 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool/source')
-rw-r--r--i18npool/source/textconversion/textconversion_zh.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/i18npool/source/textconversion/textconversion_zh.cxx b/i18npool/source/textconversion/textconversion_zh.cxx
index 13059dba5d91..b5da23e7e00d 100644
--- a/i18npool/source/textconversion/textconversion_zh.cxx
+++ b/i18npool/source/textconversion/textconversion_zh.cxx
@@ -232,9 +232,9 @@ TextConversion_zh::getWordConversion(const OUString& aText, sal_Int32 nStartPos,
current = entry[current] + word.getLength() + 1;
sal_Int32 start=current;
if (offset.hasElements()) {
- if (word.getLength() != OUString(&wordData[current]).getLength())
+ if (word.getLength() != static_cast<sal_Int32>(std::u16string_view(&wordData[current]).size()))
one2one=false;
- sal_Int32 convertedLength=OUString(&wordData[current]).getLength();
+ sal_Int32 convertedLength=std::u16string_view(&wordData[current]).size();
while (wordData[current]) {
offsetRange[count]=nStartPos + currPos + ((current-start) *
word.getLength() / convertedLength);