summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-12 14:21:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-12 14:29:09 +0100
commitb6807fd38373c98adc276697c24dcfcdf9471ac0 (patch)
treecc662e7f9dedabe7c7b1a13f29e9d137c29209f7
parent54dd4ae0ddc92b3fbc02e104e9844b587e694a99 (diff)
Resolves: fdo#61754 allow midletters in field name tokens
Change-Id: I77cea3c1d2210435109ca0b6f762b6aea478e91b
-rw-r--r--i18npool/source/characterclassification/cclass_unicode_parser.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
index 3f3de5b8f002..488b62ed9566 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;