sc/source/core/tool/address.cxx | 9 +++++++++ 1 file changed, 9 insertions(+)
New commits: commit 5f0f3c09230daa40cbe3d0c7f5a1f193c2ccad8c Author: Eike Rathke <er...@redhat.com> AuthorDate: Wed Oct 28 23:31:03 2020 +0100 Commit: Eike Rathke <er...@redhat.com> CommitDate: Sat Oct 31 11:46:23 2020 +0100 Pass ExternalInfo up to caller from lcl_ScAddress_Parse_OOo() ... if external and sheet name was detected but a reference not completely parsed, which may indicate an external sheet-local name. This then in ScCompiler::IsSingleReference() is used to reset mnCurrentSheetEndPos and mnCurrentSheetTab, which without before was not done and may have lead to the external sheet-local name being taken as a sheet-local name in the current document if there was an identical one. External sheet-local names so far are not supported at all. The ExternalInfo is filled only if pSheetEndPos was passed but then could be used by the caller to obtain a name later. ExternalInfo::maTabName is filled only if a sheet name separator was encountered. Change-Id: I2414655a90a961af0e8ac2367cde7bdc4dcbb4c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105089 Tested-by: Jenkins Reviewed-by: Eike Rathke <er...@redhat.com> diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index a1cae3fa93b4..e595e7003155 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -1430,6 +1430,15 @@ static ScRefFlags lcl_ScAddress_Parse_OOo( const sal_Unicode* p, const ScDocumen } } } + else if (bExtDoc && pExtInfo && !bExtDocInherited && !pExtInfo->mbExternal && pSheetEndPos) + { + // Pass partial info up to caller, there may be an external name + // following, and if after *pSheetEndPos it's external sheet-local. + // For global names aTab is empty and *pSheetEndPos==0. + pExtInfo->mbExternal = true; + pExtInfo->maTabName = aTab; + pExtInfo->mnFileId = rDoc.GetExternalRefManager()->getExternalFileId(aDocName); + } rRawRes |= nRes; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits