summaryrefslogtreecommitdiff
path: root/i18npool/source/characterclassification/cclass_unicode.cxx
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-08-17 13:59:00 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-08-17 13:59:00 +0000
commit04212c3015cd4ab118a0aec2bb04bc153a64af41 (patch)
treecc900b9a083c0d521709af00fcd1b40d50d148df /i18npool/source/characterclassification/cclass_unicode.cxx
parent8a36b196925a5561eabde0a0ef293c73fcb5add3 (diff)
INTEGRATION: CWS i18n34 (1.11.4); FILE MERGED
2007/08/13 22:33:38 khong 1.11.4.1: i86439 fix surrogate characters handling issues
Diffstat (limited to 'i18npool/source/characterclassification/cclass_unicode.cxx')
-rw-r--r--i18npool/source/characterclassification/cclass_unicode.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/i18npool/source/characterclassification/cclass_unicode.cxx b/i18npool/source/characterclassification/cclass_unicode.cxx
index 0856c6bd6203..afb1b9b0725d 100644
--- a/i18npool/source/characterclassification/cclass_unicode.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: cclass_unicode.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: rt $ $Date: 2007-07-26 09:09:03 $
+ * last change: $Author: ihi $ $Date: 2007-08-17 14:59:00 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -149,7 +149,9 @@ sal_Int32 SAL_CALL
cclass_Unicode::getCharType( const OUString& Text, sal_Int32* nPos, sal_Int32 increment) {
using namespace ::com::sun::star::i18n::KCharacterType;
- switch ( u_charType( Text.iterateCodePoints(nPos, increment) ) ) {
+ sal_uInt32 ch = Text.iterateCodePoints(nPos, increment);
+ if (increment > 0) ch = Text.iterateCodePoints(nPos, 0);
+ switch ( u_charType(ch) ) {
// Upper
case U_UPPERCASE_LETTER :
return UPPER|LETTER|PRINTABLE|BASE_FORM;