Kaydet (Commit) b6339617 authored tarafından Eike Rathke's avatar Eike Rathke

do not drop entire external reference, fdo#85617 related

If there are no matching tab names for a FileId, preserve at least the known
reference parts. In case of 2D references the sheet name is in the token if
for example read from .xlsx, only for 3D references the second sheet name
would be needed. The underlying makeExternalRefStr() and its subroutines
handle the missing tabname elements gracefully.

Still this situation is worth an assertion.
üst 7eb5e135
...@@ -4160,8 +4160,7 @@ void ScCompiler::CreateStringFromExternal(OUStringBuffer& rBuffer, FormulaToken* ...@@ -4160,8 +4160,7 @@ void ScCompiler::CreateStringFromExternal(OUStringBuffer& rBuffer, FormulaToken*
{ {
vector<OUString> aTabNames; vector<OUString> aTabNames;
pRefMgr->getAllCachedTableNames(nFileId, aTabNames); pRefMgr->getAllCachedTableNames(nFileId, aTabNames);
if (aTabNames.empty()) assert(!aTabNames.empty()); // something is seriously wrong, but continue
return;
pConv->makeExternalRefStr( pConv->makeExternalRefStr(
rBuffer, GetPos(), nFileId, *pFileName, aTabNames, t->GetString().getString(), rBuffer, GetPos(), nFileId, *pFileName, aTabNames, t->GetString().getString(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment