summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-08-18 11:33:44 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-08-20 14:58:59 +0000
commit3dee14a0386c67868748b21226ad871a95cef4a0 (patch)
treef2e753e70fc7e3136730fc423a516656cdd69209
parent5c1b030d82dd9db2728724341db901d0bf680ba1 (diff)
Resolves: tdf#92749 invalidate lookup caches after initial hard recalc
... because the caches are not setup as listeners during when the document's hard recalc state is active. Change-Id: Ie7ec84ee64d046e3e55ce26b92824e94a2f660e9 (cherry picked from commit f7e493229bd949066b4d8984dce7678b8687d1ae) Reviewed-on: https://gerrit.libreoffice.org/17830 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-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()