summaryrefslogtreecommitdiff
path: root/sc/inc/queryiter.hxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-05-10 12:49:55 +0200
committerLuboš Luňák <l.lunak@collabora.com>2022-05-11 11:51:38 +0200
commit248e49d3f409d414331945ba91b3083406d59f78 (patch)
tree52bbbe49f0561d005a394aea2d0df1838bea5d1a /sc/inc/queryiter.hxx
parent4c8f4390c846e0184955916b0555359a6ad98981 (diff)
no PerformQuery() with ScSortedRangeCache if not needed (tdf#144777)
It should not be necessary in that case, since the rows are restricted only to those that match, selected by BinarySearch(). Still at least assert that, just in case I'm missing something (or BinarySearch() doesn't quite match what validQuery() does). Change-Id: Ie91d3ba997692e5b3650b1549e8a38b6c5f44c01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134130 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.hxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/inc/queryiter.hxx b/sc/inc/queryiter.hxx
index 7c454f784a2e..fa8f08083981 100644
--- a/sc/inc/queryiter.hxx
+++ b/sc/inc/queryiter.hxx
@@ -94,12 +94,15 @@ class ScQueryCellIteratorAccessSpecific< ScQueryCellIteratorAccess::SortedCache
{
public:
void SetSortedRangeCache( const ScSortedRangeCache& cache );
+ template<bool fast>
+ bool IncPosImpl();
protected:
ScQueryCellIteratorAccessSpecific( ScDocument& rDocument, ScInterpreterContext& rContext,
const ScQueryParam& rParam );
void InitPosStart();
void InitPosFinish( SCROW beforeRow, SCROW lastRow );
- void IncPos();
+ void IncPos() { IncPosImpl<false>(); }
+ bool IncPosFast() { return IncPosImpl<true>(); }
void IncBlock() { IncPos(); } // Cannot skip entire block, not linear.
// These members needs to be available already in the base class.
@@ -111,6 +114,7 @@ protected:
SCTAB nTab;
SCCOL nCol;
SCROW nRow;
+ const ScColumn* pColumn; // matching nCol, set by InitPos()
const ScSortedRangeCache* sortedCache;
size_t sortedCachePos;