[Libreoffice-commits] core.git: i18npool/source
Caolán McNamara
caolanm at redhat.com
Thu Sep 12 06:29:30 PDT 2013
i18npool/source/characterclassification/cclass_unicode_parser.cxx | 13 ++++++++++
1 file changed, 13 insertions(+)
New commits:
commit b6807fd38373c98adc276697c24dcfcdf9471ac0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Sep 12 14:21:32 2013 +0100
Resolves: fdo#61754 allow midletters in field name tokens
Change-Id: I77cea3c1d2210435109ca0b6f762b6aea478e91b
diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
index 3f3de5b..488b62e 100644
--- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
@@ -666,6 +666,19 @@ UPT_FLAG_TYPE cclass_Unicode::getFlagsExtended( const sal_Unicode* aStr, sal_Int
case U_SPACE_SEPARATOR :
return ((nTypes & KParseTokens::IGNORE_LEADING_WS) ?
TOKEN_CHAR_DONTCARE : (bStart ? TOKEN_CHAR_WORD : (TOKEN_CHAR_DONTCARE | TOKEN_WORD_SEP | TOKEN_VALUE_SEP) ));
+ case U_OTHER_PUNCTUATION:
+ // fdo#61754 Lets see (if we not at the start) if this is midletter
+ // punctuation and allow it in a word if it is similarly to
+ // U_NON_SPACING_MARK
+ if (bStart || U_WB_MIDLETTER != u_getIntPropertyValue(c, UCHAR_WORD_BREAK))
+ return TOKEN_ILLEGAL;
+ else
+ {
+ //allowing it to continue the word
+ return (nTypes & KParseTokens::UNI_OTHER_LETTER) ?
+ TOKEN_WORD : TOKEN_ILLEGAL;
+ }
+ break;
}
return TOKEN_ILLEGAL;
More information about the Libreoffice-commits
mailing list