sc/source/core/data/table3.cxx    |    1 -
 sc/source/core/tool/consoli.cxx   |    2 --
 sc/source/core/tool/dbdata.cxx    |    1 -
 sc/source/ui/docshell/tablink.cxx |    1 -
 sc/source/ui/unoobj/funcuno.cxx   |    1 -
 5 files changed, 6 deletions(-)

New commits:
commit 16a9d9677394fc7a76ef31437228e77e028f4669
Author:     Karthik Godha <[email protected]>
AuthorDate: Tue Mar 10 14:26:55 2026 +0530
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Mar 12 19:06:52 2026 +0100

    XLSX: Extra ocStop token was added to table formulas
    
    When importing tables from XLSX, an extra ocStop token was added to the
    token array.
    
    bug-document: fdo84819-1.xlsx
    Change-Id: I5f13468127f13e0b7964ff536e269246f3afb8b0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201354
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Balazs Varga <[email protected]>
    (cherry picked from commit 2181bf05e087ecf8589f7d855ecbe00e90fb0832)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201540
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins

diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 8edc854d0431..a98822369308 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2365,7 +2365,6 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
             aArr.AddOpCode( ocSep );
             aArr.AddDoubleReference( aRef );
             aArr.AddOpCode( ocClose );
-            aArr.AddOpCode( ocStop );
             ScFormulaCell* pCell = new ScFormulaCell(
                 rDocument, ScAddress(group.col(nResult), rRowEntry.nDestRow, 
nTab), aArr);
             if ( rParam.bIncludePattern )
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index aa8dbcc3eedb..1e8b4af980f7 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -477,7 +477,6 @@ void ScConsData::OutputToDocument( ScDocument& rDestDoc, 
SCCOL nCol, SCROW nRow,
 
                                 ScTokenArray aRefArr(rDestDoc);
                                 aRefArr.AddSingleReference(aSRef);
-                                aRefArr.AddOpCode(ocStop);
                                 ScAddress aDest( 
sal::static_int_cast<SCCOL>(nCol+nArrX),
                                                  
sal::static_int_cast<SCROW>(nRow+nArrY+nPos), nTab );
                                 ScFormulaCell* pCell = new 
ScFormulaCell(rDestDoc, aDest, aRefArr);
@@ -499,7 +498,6 @@ void ScConsData::OutputToDocument( ScDocument& rDestDoc, 
SCCOL nCol, SCROW nRow,
                         aArr.AddOpCode(ocOpen);
                         aArr.AddDoubleReference(aCRef);
                         aArr.AddOpCode(ocClose);
-                        aArr.AddOpCode(ocStop);
                         ScFormulaCell* pCell = new ScFormulaCell(rDestDoc, 
aDest, aArr);
                         rDestDoc.SetFormulaCell(aDest, pCell);
                     }
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 759c57f6e502..a922ad24b943 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -882,7 +882,6 @@ void ScDBData::ImportTotalRowParam(ScSubTotalParam& 
rSubTotalParam,
                         pArr->AddOpCode(ocTableRefClose);
                         // Table refs structure end
                         pArr->AddOpCode(ocClose);
-                        pArr->AddOpCode(ocStop);
                         // Store
                         vColFuncs.push_back(std::make_pair(nCol, 
std::move(pArr)));
                     }
diff --git a/sc/source/ui/docshell/tablink.cxx 
b/sc/source/ui/docshell/tablink.cxx
index 9dcfb270452a..9d11e6b3576d 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -294,7 +294,6 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const 
OUString& rNewFilter,
                         aTokenArr.AddOpCode( ocNotAvail );
                         aTokenArr.AddOpCode( ocOpen );
                         aTokenArr.AddOpCode( ocClose );
-                        aTokenArr.AddOpCode( ocStop );
 
                         for (size_t nPos=0; nPos < nRanges; nPos++)
                         {
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index 96bf71fdd890..0a87648434d0 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -626,7 +626,6 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const 
OUString& aName,
             bArgErr = true;                 // invalid type
     }
     aTokenArr.AddOpCode(ocClose);
-    aTokenArr.AddOpCode(ocStop);
 
     //  execute formula
 

Reply via email to