diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-04-25 13:23:08 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-05-10 16:22:26 +0200 |
commit | 4d2bd386837524fd9f74f827f59ac3dfc64b3a6a (patch) | |
tree | bfef48f808c5562a07f1d854f2e6fa42eef84ca0 /sc/inc/queryiter.hxx | |
parent | 920558267bbd1e91e1639dd854beb8d56fc7b5c3 (diff) |
BinarySearch() can be in ScQueryCellIteratorBase
Change-Id: I89d7e58a9706526aa2871dba1e4f922ff94562a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134094
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 | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sc/inc/queryiter.hxx b/sc/inc/queryiter.hxx index ae7b8066c57b..c2378bca6aa2 100644 --- a/sc/inc/queryiter.hxx +++ b/sc/inc/queryiter.hxx @@ -85,6 +85,13 @@ protected: SCCOL GetCol() const { return nCol; } SCROW GetRow() const { return nRow; } + /* Only works if no regular expression is involved, only searches for rows in one column, + and only the first query entry is considered with simple conditions SC_LESS_EQUAL + (sorted ascending) or SC_GREATER_EQUAL (sorted descending). Check these things before + invocation! Delivers a starting point, continue with e.g. GetThis() and GetNext() + afterwards. Introduced for FindEqualOrSortedLastInRange(). */ + bool BinarySearch(); + public: ScQueryCellIteratorBase(ScDocument& rDocument, const ScInterpreterContext& rContext, SCTAB nTable, const ScQueryParam& aParam, bool bMod); @@ -140,17 +147,6 @@ protected: // The generic query iterator, used e.g. by VLOOKUP. class ScQueryCellIterator : public ScQueryCellIteratorBase< ScQueryCellIteratorType::Generic > { - /* Only works if no regular expression is involved, only - searches for rows in one column, and only the first - query entry is considered with simple conditions - SC_LESS_EQUAL (sorted ascending) or SC_GREATER_EQUAL - (sorted descending). Check these things before - invocation! Delivers a starting point, continue with - GetThis() and GetNext() afterwards. Introduced for - FindEqualOrSortedLastInRange() - */ - bool BinarySearch(); - bool GetThis(); public: |