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

New commits:
commit f1f5e9c8d7be16a969e58ebf7cfae99eef5bcb6e
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Thu Jul 25 00:13:45 2024 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Thu Jul 25 01:34:32 2024 +0200

    Resolves: tdf#162087 TableRef item specifier may occur standalone
    
    This is what
    
https://learn.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/3d025add-118d-4413-9856-ab65712ec1b0
    specifies as  keyword  in
    
     intra-table-reference = spaced-lbracket inner-reference spaced-rbracket / 
keyword / ("[" [simple-column-name] "]")
    
    with
    
     keyword = "[#All]" / "[#Data]" / "[#Headers]" / "[#Totals]" / "[#This Row]"
    
    Change-Id: I52b200aad41d53a49e662d6238576f6f4f0deb37
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170986
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 93e990e7689c..6b3fc6555959 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4564,7 +4564,8 @@ Label_Rewind:
             if (cSymbol[0] == '#')
             {
                 // Check for TableRef item specifiers first.
-                if (!maTableRefs.empty() && maTableRefs.back().mnLevel == 2)
+                sal_uInt16 nLevel;
+                if (!maTableRefs.empty() && ((nLevel = 
maTableRefs.back().mnLevel) == 2 || nLevel == 1))
                 {
                     if (ParseTableRefItem( aUpper ))
                         return true;

Reply via email to