diff options
author | Eike Rathke <erack@redhat.com> | 2015-01-09 13:44:32 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-01-09 16:10:03 +0100 |
commit | b6339617b1cc3136f9e527acd0746d712cd21643 (patch) | |
tree | 840158de8c8e29ecaa16f7efa774c0127bea335c | |
parent | 7eb5e135422f1a5830a44d129300bc3fafb4627d (diff) |
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.
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index f6c868d8c888..9ae147412470 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4160,8 +4160,7 @@ void ScCompiler::CreateStringFromExternal(OUStringBuffer& rBuffer, FormulaToken* { vector<OUString> aTabNames; pRefMgr->getAllCachedTableNames(nFileId, aTabNames); - if (aTabNames.empty()) - return; + assert(!aTabNames.empty()); // something is seriously wrong, but continue pConv->makeExternalRefStr( rBuffer, GetPos(), nFileId, *pFileName, aTabNames, t->GetString().getString(), |