From 4d2bd386837524fd9f74f827f59ac3dfc64b3a6a Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Mon, 25 Apr 2022 13:23:08 +0200 Subject: BinarySearch() can be in ScQueryCellIteratorBase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I89d7e58a9706526aa2871dba1e4f922ff94562a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134094 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- sc/inc/queryiter.hxx | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'sc/inc/queryiter.hxx') 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: -- cgit