summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-05-27 12:31:30 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-06-03 09:11:49 +0000
commit8a4737360ea28296f7ac1d3cddf2e27b3ac25915 (patch)
treee1cd132271c74ac0cf86c449cc175e4eaa783172
parent029b24297ade84b6bf72ce1dec37d9ca9ac4b740 (diff)
resolved rhbz#1101224 do not attempt to obtain names for NULL tabs
This happened when the HTML export via clipboard tried to resolve conditional formats, where we have a temporary instance of a document containing only the sheet to be exported. Change-Id: Ic7498a1cab3eabede74773868287a2cc3edef052 (cherry picked from commit 17979abf4fde202cae231be19a218be3fe27d04c) Reviewed-on: https://gerrit.libreoffice.org/9510 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/core/data/document.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 47164be8c49f..2ec7d6838b35 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -259,9 +259,14 @@ std::vector<OUString> ScDocument::GetAllTableNames() const
TableContainer::const_iterator it = maTabs.begin(), itEnd = maTabs.end();
for (; it != itEnd; ++it)
{
+ // Positions need to be preserved for ScCompiler and address convention
+ // context, so still push an empty string for NULL tabs.
OUString aName;
- const ScTable& rTab = **it;
- rTab.GetName(aName);
+ if (*it)
+ {
+ const ScTable& rTab = **it;
+ rTab.GetName(aName);
+ }
aNames.push_back(aName);
}