summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/characterclassification/cclass_unicode_parser.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
index aed29ea1ce5b..9ed95e2f907a 100644
--- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
@@ -827,8 +827,16 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32
{
if (current == cGroupSep)
{
- if (getFlags(nextChar, eState) & ParserFlags::VALUE_DIGIT)
+ // accept only if it is followed by 3 digits
+ sal_Int32 tempIndex(index);
+ sal_uInt32 const nextChar2((tempIndex < rText.getLength()) ? rText.iterateCodePoints(&tempIndex) : 0);
+ sal_uInt32 const nextChar3((tempIndex < rText.getLength()) ? rText.iterateCodePoints(&tempIndex) : 0);
+ if (getFlags(nextChar, eState) & ParserFlags::VALUE_DIGIT
+ && getFlags(nextChar2, eState) & ParserFlags::VALUE_DIGIT
+ && getFlags(nextChar3, eState) & ParserFlags::VALUE_DIGIT)
+ {
nParseTokensType |= KParseTokens::GROUP_SEPARATOR_IN_NUMBER;
+ }
else
{
// Trailing group separator character is not a