summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-06-29 22:20:04 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-06-30 11:20:59 +0000
commit8b26f758d5011b8b769fa171011210262683dd16 (patch)
tree2d1d32896344127612005c343981b7d82b4505dc
parent10edfb9f97740f3eb6abf0da57ccb5c985296aef (diff)
Resolves: tdf#31577 volatile lookup ranges must not be cached
Change-Id: Iac8574329c8c8e0bc0ac956993ccdd085372a6cc (cherry picked from commit 5e83f49e5d62587f427ad416f5188ce81506c05b) Reviewed-on: https://gerrit.libreoffice.org/16598 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/core/tool/interpr1.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 1713089c23b7..f2f1d43f9c50 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8374,7 +8374,13 @@ bool ScInterpreter::LookupQueryWithCache( ScAddress & o_rResultPos,
const ScQueryEntry& rEntry = rParam.GetEntry(0);
bool bColumnsMatch = (rParam.nCol1 == rEntry.nField);
OSL_ENSURE( bColumnsMatch, "ScInterpreter::LookupQueryWithCache: columns don't match");
- if (!bColumnsMatch)
+ // At least all volatile functions that generate indirect references have
+ // to force non-cached lookup.
+ /* TODO: We could further classify volatile functions into reference
+ * generating and not reference generating functions to have to force less
+ * direct lookups here. We could even further attribute volatility per
+ * parameter so it would affect only the lookup range parameter. */
+ if (!bColumnsMatch || GetVolatileType() != NOT_VOLATILE)
bFound = lcl_LookupQuery( o_rResultPos, pDok, rParam, rEntry);
else
{