XLSX: Handle "#" in formulas with special characters

This is a follow-up of (https://gerrit.libreoffice.org/c/core/+/201533),
formulas like `'[1]foo bar'!#REF!` are not imported properly. "#" is
not handled in formulas.

bug-document: fdo54757-1.xlsx
Change-Id: I41ed217ec26b62785cea67b6e141b3071df9a12e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201601
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Balazs Varga <balazs.varga@collabora.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204181
Tested-by: Jenkins
This commit is contained in:
Karthik Godha
2026-04-24 10:21:07 +02:00
committed by Xisco Fauli
parent bc38894980
commit e9f276ebd8
+1 -1
View File
@@ -1469,7 +1469,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
KParseTokens::ASC_UNDERSCORE | KParseTokens::ASC_DOLLAR;
constexpr sal_Int32 nContFlags = nStartFlags | KParseTokens::ASC_DOT;
// '?' allowed in range names
static constexpr OUString aAddAllowed(u"?!"_ustr);
static constexpr OUString aAddAllowed(u"?!#"_ustr);
return pCharClass->parseAnyToken( rFormula,
nSrcPos, nStartFlags, aAddAllowed,
(bGroupSeparator ? nContFlags | KParseTokens::GROUP_SEPARATOR_IN_NUMBER_3 : nContFlags),