summaryrefslogtreecommitdiff
path: root/configmgr/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-09-13 13:35:49 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-09-13 13:35:49 +0200
commit3f0fba004badec01e536ca0fe2889e7e0bb93d7a (patch)
treecdf682e89f56c29fd6a8cd650bdb8bba42eca555 /configmgr/source
parent2d22b39fb7ddbb02f246e2943b228931e5d583e1 (diff)
New rtl::isUnicodeScalarValue, rtl::isSurrogate
There are apparently various places that want to check for a Unicode scalar value rather than for a Unicode code point. Changed those uses of rtl::isUnicodeCodePoint where that was obvious. (For changing svtools/source/svrtf/svparser.cxx see 8e0fb74dc01927b60d8b868548ef8fe1d7a80ce3 "Revert 'svtools: HTML import: don't put lone surrogates in OUString'".) Other uses of rtl::isUnicodeCodePoint might also want to use rtl::isUnicodeScalarValue instead. As a side effect, this change also introduces rtl::isSurrogate, which is useful in a few places as well. Change-Id: I9245f4f98b83877145a4d392f0ddb7c5d824a535
Diffstat (limited to 'configmgr/source')
-rw-r--r--configmgr/source/access.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 6eb692cc5430..0d19af353b49 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -113,8 +113,8 @@ bool isValidName(OUString const & name, bool setMember) {
for (sal_Int32 i = 0; i != name.getLength();) {
sal_uInt32 c = name.iterateCodePoints(&i);
if ((c < 0x20 && !(c == 0x09 || c == 0x0A || c == 0x0D))
- || rtl::isHighSurrogate(c) || rtl::isLowSurrogate(c) || c == 0xFFFE
- || c == 0xFFFF || (!setMember && c == '/'))
+ || rtl::isSurrogate(c) || c == 0xFFFE || c == 0xFFFF
+ || (!setMember && c == '/'))
{
return false;
}