From e9f276ebd85c43281e863249d3d890673d430bc7 Mon Sep 17 00:00:00 2001 From: Karthik Godha Date: Fri, 13 Mar 2026 15:12:26 +0530 Subject: [PATCH] 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 Reviewed-by: Balazs Varga Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204181 Tested-by: Jenkins --- sc/source/core/tool/compiler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index d099267dd62d..2cbdde23e332 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -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),