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

New commits:
commit 6cdc3e24b5089e94de04d753c5a9b00856ef04cb
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Thu Jul 25 13:05:30 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Aug 27 12:11:23 2024 +0200

    Resolves: tdf#162093 TableRef item specifier may occur standalone
    
     This is a combination of 2 commits.
    
    Resolves: tdf#162093 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]"
    
    xChange-Id: I52b200aad41d53a49e662d6238576f6f4f0deb37
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170986
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit f1f5e9c8d7be16a969e58ebf7cfae99eef5bcb6e)
    
    Related: tdf#162093 TableRef item specifier may occur standalone
    
    also in lexical canner.
    
    xChange-Id: Ic265bbd8a0d9baa81039b8d1748c63ad6686bfc2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170989
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit 4aa2d5ede17ddf7345804deb200983367990a7e2)
    
    Change-Id: I52b200aad41d53a49e662d6238576f6f4f0deb37
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170953
    Tested-by: Jenkins
    Reviewed-by: Eike Rathke <er...@redhat.com>
    (cherry picked from commit 25a42da1f94cfd0555fc83126888eb605a9014f2)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171026
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index c9934c26fff6..3f45f8c7041c 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2318,7 +2318,8 @@ Label_MaskStateMachine:
                 else if( nMask & ScCharFlags::CharErrConst )
                 {
                     *pSym++ = c;
-                    if (!maTableRefs.empty() && maTableRefs.back().mnLevel == 
2)
+                    sal_uInt16 nLevel;
+                    if (!maTableRefs.empty() && ((nLevel = 
maTableRefs.back().mnLevel) == 2 || nLevel == 1))
                         eState = ssGetTableRefItem;
                     else
                         eState = ssGetErrorConstant;
@@ -4518,7 +4519,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