sc/source/core/tool/compiler.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit e9380d8a69478570207826c77f92d27ad7e8370a
Author:     Karthik Godha <[email protected]>
AuthorDate: Mon Feb 16 12:04:54 2026 +0530
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Feb 27 12:06:14 2026 +0100

    XLSX: Single cell R1C1 address in defined name
    
    R1C1 style single cell reference is not handled in SanitizeDefinedName
    
    bug-document: forum-mso-en4-31668.xls
    Change-Id: I53ca52065e45029b7293248eb6996736044fccde
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199445
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit a04fecfdd2de8db0244bbcef1bf7daca5b7a3e83)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200407

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 07c6c9b5b6a9..24b73e23769e 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -5484,6 +5484,8 @@ OUString ScCompiler::SanitizeDefinedName(const OUString& 
rStr, const ScDocument&
     // Name can't be a valid cell reference
     if ((ScAddress().Parse(sName, rDoc, ::formula::FormulaGrammar::CONV_XL_A1) 
!= ScRefFlags::ZERO)
         || (ScRange().Parse(sName, rDoc, 
::formula::FormulaGrammar::CONV_XL_R1C1)
+            != ScRefFlags::ZERO)
+        || (ScAddress().Parse(sName, rDoc, 
::formula::FormulaGrammar::CONV_XL_R1C1)
             != ScRefFlags::ZERO))
         bValidName = false;
 

Reply via email to