sc/source/core/tool/compiler.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit a7d534639ce3dd6e18f349c33b2bcaa6b43a42a2 Author: Eike Rathke <er...@redhat.com> AuthorDate: Thu Jul 1 15:46:01 2021 +0200 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Jul 3 15:33:56 2021 +0200 Resolves: tdf#138432 Use locale's CharClass to parse numeric i18n context Change-Id: I1828f1b6f93228cd517a6a7bd9ae36584bd801a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118226 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins (cherry picked from commit d703131d063c41b8baca01830c4c9806f99ab7d2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118190 Reviewed-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit c7d6a4dcfa82387d4ea2445b7af109101f0c365b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118261 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 7dd0ca5374a7..274205f5734b 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -2751,6 +2751,10 @@ Label_MaskStateMachine: cGroupSep != cArrayColSep && cGroupSep != cArrayRowSep && cGroupSep != cDecSep && cGroupSep != cDecSepAlt && cGroupSep != cSheetPrefix && cGroupSep != cSheetSep); + // If a numeric context triggered bi18n then use the default locale's + // CharClass, this may accept group separator as well. + const CharClass* pMyCharClass = (ScGlobal::getCharClassPtr()->isDigit( OUString(pStart[nSrcPos]), 0) ? + ScGlobal::getCharClassPtr() : pCharClass); OUStringBuffer aSymbol; mnRangeOpPosInSymbol = -1; FormulaError nErr = FormulaError::NONE; @@ -2761,7 +2765,7 @@ Label_MaskStateMachine: if ( pStart[nSrcPos] == cSheetPrefix && pStart[nSrcPos+1] == '\'' ) aSymbol.append(pStart[nSrcPos++]); - ParseResult aRes = pConv->parseAnyToken( aFormula, nSrcPos, pCharClass, bGroupSeparator); + ParseResult aRes = pConv->parseAnyToken( aFormula, nSrcPos, pMyCharClass, bGroupSeparator); if ( !aRes.TokenType ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits