summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-11-22 14:08:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-23 14:00:08 +0100
commitec1c4c49301758c54394f9943252e192ad54638b (patch)
treeb53af3cb9154a388495b1af35c3f8ff41d6ebe1f /i18npool
parentdb0f2c29bf3a6ad5a08f8524ea0e65aa90792bb2 (diff)
O[U]String::replaceAt overloads that take string_view
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/inputchecker/inputsequencechecker.cxx2
-rw-r--r--i18npool/source/inputchecker/inputsequencechecker_hi.cxx2
-rw-r--r--i18npool/source/inputchecker/inputsequencechecker_th.cxx10
3 files changed, 7 insertions, 7 deletions
diff --git a/i18npool/source/inputchecker/inputsequencechecker.cxx b/i18npool/source/inputchecker/inputsequencechecker.cxx
index 4820c10ca153..ff1ea652f980 100644
--- a/i18npool/source/inputchecker/inputsequencechecker.cxx
+++ b/i18npool/source/inputchecker/inputsequencechecker.cxx
@@ -68,7 +68,7 @@ InputSequenceCheckerImpl::correctInputSequence(OUString& Text, sal_Int32 nStartP
if (language)
return getInputSequenceChecker(language)->correctInputSequence(Text, nStartPos, inputChar, inputCheckMode);
}
- Text = Text.replaceAt(++nStartPos, 0, OUString(inputChar));
+ Text = Text.replaceAt(++nStartPos, 0, rtl::OUStringChar(inputChar));
return nStartPos;
}
diff --git a/i18npool/source/inputchecker/inputsequencechecker_hi.cxx b/i18npool/source/inputchecker/inputsequencechecker_hi.cxx
index c857f286650a..b1f9e99f6987 100644
--- a/i18npool/source/inputchecker/inputsequencechecker_hi.cxx
+++ b/i18npool/source/inputchecker/inputsequencechecker_hi.cxx
@@ -126,7 +126,7 @@ InputSequenceChecker_hi::correctInputSequence(OUString& Text,
sal_Int16 inputCheckMode)
{
if (checkInputSequence(Text, nStartPos, inputChar, inputCheckMode))
- Text = Text.replaceAt(++nStartPos, 0, OUString(inputChar));
+ Text = Text.replaceAt(++nStartPos, 0, rtl::OUStringChar(inputChar));
else
nStartPos=Text.getLength();
return nStartPos;
diff --git a/i18npool/source/inputchecker/inputsequencechecker_th.cxx b/i18npool/source/inputchecker/inputsequencechecker_th.cxx
index cf686be78633..c6d6f349d26d 100644
--- a/i18npool/source/inputchecker/inputsequencechecker_th.cxx
+++ b/i18npool/source/inputchecker/inputsequencechecker_th.cxx
@@ -111,26 +111,26 @@ https://bz.apache.org/ooo/show_bug.cgi?id=42661
#define CT_ABV1(t) (t==CT_AV1 || t==CT_BV1)
if (check(Text[nStartPos], inputChar, inputCheckMode))
- Text = Text.replaceAt(++nStartPos, 0, OUString(inputChar));
+ Text = Text.replaceAt(++nStartPos, 0, rtl::OUStringChar(inputChar));
else if (nStartPos > 0 && getCharType(Text[nStartPos-1]) == CT_CONS) {
sal_uInt16 t1=getCharType(Text[nStartPos]), t2=getCharType(inputChar);
if ( (CT_ABV(t1) && CT_ABV(t2)) || // 1.
(t1==CT_TONE && t2==CT_TONE) )// 2.
- Text = Text.replaceAt(nStartPos, 1, OUString(inputChar));
+ Text = Text.replaceAt(nStartPos, 1, rtl::OUStringChar(inputChar));
else if ( (t1==CT_TONE && CT_ABV(t2)) || // 5.
(t1==CT_FV1 && t2==CT_TONE) || // 6.
(Text[nStartPos]==0x0E4C && CT_ABV1(t2)) ) // 8.
- Text = Text.replaceAt(nStartPos++, 0, OUString(inputChar));
+ Text = Text.replaceAt(nStartPos++, 0, rtl::OUStringChar(inputChar));
else
nStartPos=Text.getLength();
} else if (nStartPos > 1 && getCharType(Text[nStartPos-2]) == CT_CONS) {
sal_uInt16 t1=getCharType(Text[nStartPos-1]), t2=getCharType(Text[nStartPos]), t3=getCharType(inputChar);
if (CT_ABV(t1) && t2==CT_TONE && t3==CT_TONE) // 3.
- Text = Text.replaceAt(nStartPos, 1, OUString(inputChar));
+ Text = Text.replaceAt(nStartPos, 1, rtl::OUStringChar(inputChar));
else if ( (CT_ABV(t1) && t2==CT_TONE && CT_ABV(t3)) || // 4.
(t1==CT_TONE && t2==CT_FV1 && t3==CT_TONE) || // 7.
(CT_ABV1(t1) && Text[nStartPos]==0x0E4C && CT_ABV1(t3)) ) // 9.
- Text = Text.replaceAt(nStartPos-1, 1, OUString(inputChar));
+ Text = Text.replaceAt(nStartPos-1, 1, rtl::OUStringChar(inputChar));
else
nStartPos=Text.getLength();
} else