diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-05-10 10:54:26 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-05-11 11:51:16 +0200 |
commit | 4c8f4390c846e0184955916b0555359a6ad98981 (patch) | |
tree | 5e5d3cd1e5fac8fd583830c61075d760c2a03a78 /sc/inc/queryiter.hxx | |
parent | 905475435c85ebae9ec48e37de4768e1b92914d2 (diff) |
do not use ScSortedRangeCache inefficiently
If the amount of data or size of the formula group is small, the caching
is probably not worth it. And if rows are not absolute, then each
formula cell would use a different range instead of reusing the cache.
Change-Id: I42a82aaa5f4ffccc63e527793f46fc52fd539af6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134129
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/inc/queryiter.hxx')
-rw-r--r-- | sc/inc/queryiter.hxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/inc/queryiter.hxx b/sc/inc/queryiter.hxx index 545955d77963..7c454f784a2e 100644 --- a/sc/inc/queryiter.hxx +++ b/sc/inc/queryiter.hxx @@ -26,6 +26,7 @@ #include "mtvelements.hxx" #include "types.hxx" +struct ScComplexRefData; class ScSortedRangeCache; /* @@ -318,7 +319,8 @@ public: SCTAB nTable, const ScQueryParam& aParam, bool bMod) : Base( rDocument, rContext, nTable, aParam, bMod ) {} // Returns true if this iterator can be used for the given query. - static bool CanBeUsed(const ScDocument& rDoc, const ScQueryParam& aParam); + static bool CanBeUsed(const ScDocument& rDoc, const ScQueryParam& aParam, + const ScFormulaCell* cell, const ScComplexRefData* refData); }; @@ -366,7 +368,8 @@ public: SCTAB nTable, const ScQueryParam& aParam, bool bMod) : Base( rDocument, rContext, nTable, aParam, bMod ) {} // Returns true if this iterator can be used for the given query. - static bool CanBeUsed(const ScDocument& rDoc, const ScQueryParam& aParam); + static bool CanBeUsed(const ScDocument& rDoc, const ScQueryParam& aParam, + const ScFormulaCell* cell, const ScComplexRefData* refData); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |