sc/source/core/data/documen3.cxx | 19 ++++++++----------- sc/source/filter/excel/xeescher.cxx | 4 +++- 2 files changed, 11 insertions(+), 12 deletions(-)
New commits: commit 3e94a81fd28d83951049db65824ea5c40870568d Author: Karthik Godha <[email protected]> AuthorDate: Fri Feb 20 15:56:39 2026 +0530 Commit: Michael Stahl <[email protected]> CommitDate: Fri Feb 27 12:06:54 2026 +0100 XLS: Import unknown external references For older XLS files, only the external references which contain their source file in the systerm are getting imported. Import all external references even if the source file is not present in the system. bug-document: forum-mso-en4-366513.xls Change-Id: I33c919f1a8f5bd4cbf621fc3fd8ccb7105429f16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199817 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit 5c916f08714bde7f10c88869b8e9e8da89caaa9c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200411 diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index f7bdc96ea8ec..799b255cb6b4 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -612,25 +612,22 @@ bool ScDocument::LinkExternalTab( SCTAB& rTab, const OUString& aDocTab, OUString aOptions; // Filter options sal_uInt32 nLinkCnt = pExtDocOptions ? pExtDocOptions->GetDocSettings().mnLinkCnt : 0; ScDocumentLoader aLoader( aFileName, aFilterName, aOptions, nLinkCnt + 1 ); - if ( aLoader.IsError() ) + ScDocument* pSrcDoc = aLoader.IsError() ? nullptr : aLoader.GetDocument(); + + if (!InsertTab(SC_TAB_APPEND, aDocTab, true)) + { + OSL_FAIL("can't insert external document table"); return false; - ScDocument* pSrcDoc = aLoader.GetDocument(); + } + rTab = GetTableCount() - 1; // Copy table SCTAB nSrcTab; - if ( pSrcDoc->GetTable( aTabName, nSrcTab ) ) + if (pSrcDoc && pSrcDoc->GetTable(aTabName, nSrcTab)) { - if ( !InsertTab( SC_TAB_APPEND, aDocTab, true ) ) - { - OSL_FAIL("can't insert external document table"); - return false; - } - rTab = GetTableCount() - 1; // Don't insert anew, just the results TransferTab( *pSrcDoc, nSrcTab, rTab, false, true ); } - else - return false; sal_Int32 nRefreshDelay = 0; commit 2cd56c66b4ce460124de4a0eddd1f40661e3fca3 Author: Karthik Godha <[email protected]> AuthorDate: Thu Feb 19 17:49:37 2026 +0530 Commit: Michael Stahl <[email protected]> CommitDate: Fri Feb 27 12:06:44 2026 +0100 XLSX: Invalid cell link in Form Controls Cell links of Form Controls contains tab names, they should be checked for quotes. Also escape characters are not escaped. bug-document: forum-mso-en4-356971.xls Change-Id: I6ca8abed209171c7e78a99a27edaee05d0f221b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199719 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit 30a127e54390aeaad12f51eaa6323863fa04b3b3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200409 diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index b2ce7ac4f7e7..954e9983553a 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -1449,7 +1449,9 @@ OUString XclExpTbxControlObj::SaveControlPropertiesXml(XclExpXmlStream& rStrm) c pFormControl->write(" fmlaLink=\""); if (aCellLink.indexOf('!') < 0) { - pFormControl->write(GetTabInfo().GetScTabName(mxCellLinkAddress.Tab())); + OUString sTabName = GetTabInfo().GetScTabName(mxCellLinkAddress.Tab()); + ScCompiler::CheckTabQuotes(sTabName); + pFormControl->writeEscaped(sTabName); pFormControl->write("!"); } pFormControl->write(aCellLink);
