summaryrefslogtreecommitdiff
path: root/sc/source/core/data/document.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/document.cxx')
-rw-r--r--sc/source/core/data/document.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index e00a5ccc6886..153b77f6f86f 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3780,6 +3780,14 @@ void ScDocument::CalcAll()
if (*it)
(*it)->CalcAll();
ClearFormulaTree();
+
+ // In hard recalc state caches were not added as listeners, invalidate them
+ // so the next non-CalcAll() normal lookup will not be presented with
+ // outdated data.
+ /* TODO: come up with more detailed hard recalc states so we can
+ * differentiate between hard recalc after load and others. */
+ if (GetHardRecalcState())
+ ClearLookupCaches();
}
void ScDocument::CompileAll()