sc/source/core/tool/compiler.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+)
New commits: commit ba485708e9982f2a6b0a9f05837e52b808a601ca Author: Karthik Godha <[email protected]> AuthorDate: Sat Jan 10 15:39:19 2026 +0530 Commit: Michael Stahl <[email protected]> CommitDate: Wed Feb 4 18:47:18 2026 +0100 XLSX - Skip writing invalid workbook references Use "#REF!" for invalid workbook references in definedNames bug document: fdo86372-2.xls Change-Id: Ib5fa2da4dc817899e45856e3f9bafbb817463a21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196959 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit c305f95ced45b7cbcee9e7344d4484b6433a60c5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197244 (cherry picked from commit 822e8c118c860500211c2f97a61cc160d0550c20) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198417 Tested-by: Jenkins diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 1d7464de06d4..c841f7d53aaa 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -1619,6 +1619,12 @@ struct ConventionXL_OOX : public ConventionXL_A1 // Where N is a 1-based positive integer number of a file name in OOXML // xl/externalLinks/externalLinkN.xml + if (rTabName.isEmpty()) + { + rBuffer.append(ScGlobal::GetErrorString(FormulaError::NoRef)); + return; + } + OUString aQuotedTab( rTabName); ScCompiler::CheckTabQuotes( aQuotedTab); if (!aQuotedTab.isEmpty() && aQuotedTab[0] == '\'') @@ -1649,6 +1655,12 @@ struct ConventionXL_OOX : public ConventionXL_A1 // sheet names as well. The [N] having to be within the quoted sheet // name is ugly enough... + if (rTabName.isEmpty()) + { + rBuffer.append(ScGlobal::GetErrorString(FormulaError::NoRef)); + return; + } + ScRange aAbsRef = rRef.toAbs(rLimits, rPos); OUStringBuffer aBuf;
