[Libreoffice-commits] core.git: winaccessibility/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Wed Nov 25 13:09:53 UTC 2020
winaccessibility/source/UAccCOM/AccTextBase.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 0a94c20e2c3ae327105d8435959e53947d4b82d8
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Nov 25 09:56:07 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Nov 25 14:09:03 2020 +0100
Strength-reduce ReplaceOneChar parameter from string to single character
Change-Id: I890d101ba671e91870ab18e82553c8ed8aa75f86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106572
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/winaccessibility/source/UAccCOM/AccTextBase.cxx b/winaccessibility/source/UAccCOM/AccTextBase.cxx
index 12401e56dc0a..796526b06225 100644
--- a/winaccessibility/source/UAccCOM/AccTextBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccTextBase.cxx
@@ -973,7 +973,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::put_XInterface(hyper pXInterface
LEAVE_PROTECTED_BLOCK
}
-static OUString ReplaceOneChar(OUString const & oldOUString, OUString const & replacedChar, OUString const & replaceStr)
+static OUString ReplaceOneChar(OUString const & oldOUString, sal_Unicode replacedChar, OUString const & replaceStr)
{
auto s = oldOUString;
int iReplace = s.lastIndexOf(replacedChar);
@@ -991,11 +991,11 @@ static OUString ReplaceOneChar(OUString const & oldOUString, OUString const & re
static OUString ReplaceFourChar(OUString const & oldOUString)
{
auto s = oldOUString;
- s = ReplaceOneChar(s, "\\", "\\\\");
- s = ReplaceOneChar(s, ";", "\\;");
- s = ReplaceOneChar(s, "=", "\\=");
- s = ReplaceOneChar(s, ",", "\\,");
- s = ReplaceOneChar(s, ":", "\\:");
+ s = ReplaceOneChar(s, '\\', "\\\\");
+ s = ReplaceOneChar(s, ';', "\\;");
+ s = ReplaceOneChar(s, '=', "\\=");
+ s = ReplaceOneChar(s, ',', "\\,");
+ s = ReplaceOneChar(s, ':', "\\:");
return s;
}
More information about the Libreoffice-commits
mailing list