summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core')
-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);
}