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 <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Balazs Varga <balazs.varga@collabora.com>
(cherry picked from commit 2181bf05e087ecf8589f7d855ecbe00e90fb0832)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201540
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Karthik Godha
2026-03-12 19:06:52 +01:00
committed by Michael Stahl
parent 251d494c6e
commit 16a9d96773
5 changed files with 0 additions and 6 deletions
-1
View File
@@ -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 )
-2
View File
@@ -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);
}
-1
View File
@@ -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)));
}
-1
View File
@@ -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++)
{
-1
View File
@@ -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