summaryrefslogtreecommitdiff
path: root/i18nutil/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-02-15 12:36:11 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-02-15 12:36:11 +0100
commit3210bc85ae1276350f18f4795efefe491c2206c2 (patch)
tree75c8d5831620cdc1d0c9145ca4579197e5cf0d94 /i18nutil/source
parenta0acad42105bc3f0304121a86f755958e38aeaac (diff)
Rename rtl::isValidCodePoint -> rtl::isUnicodeCodePoint
...and fix its documentation, and use it throughout the code base. Change-Id: I349bc2009b1b0aa7115ea90bc6ecd0a812f63698
Diffstat (limited to 'i18nutil/source')
-rw-r--r--i18nutil/source/utility/unicode.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx
index a7d3d4690f1c..6507479807fe 100644
--- a/i18nutil/source/utility/unicode.cxx
+++ b/i18nutil/source/utility/unicode.cxx
@@ -1190,14 +1190,14 @@ OUString ToggleUnicodeCodepoint::StringToReplace()
{
nUnicode = sIn.copy(0, nUPlus).toString().toUInt32(16);
//prevent creating control characters or invalid Unicode values
- if( nUnicode < 0x20 || nUnicode > 0x10ffff )
+ if( !rtl::isUnicodeCodePoint(nUnicode) || nUnicode < 0x20 )
maInput = sIn.copy(nUPlus);
sIn = sIn.copy(nUPlus+2);
nUPlus = sIn.indexOf("U+");
}
nUnicode = sIn.toString().toUInt32(16);
- if( nUnicode < 0x20 || nUnicode > 0x10ffff )
+ if( !rtl::isUnicodeCodePoint(nUnicode) || nUnicode < 0x20 )
maInput.truncate().append( sIn[sIn.getLength()-1] );
return maInput.toString();
}