[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sc/source
Eike Rathke
erack at redhat.com
Mon Mar 26 16:08:51 UTC 2018
sc/source/core/data/dociter.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit c3ca9d933b289df49e45f223493f3a22a1f74d14
Author: Eike Rathke <erack at redhat.com>
Date: Fri Mar 23 13:13:03 2018 +0100
Enable binary search for numeric values again
... as used in LOOKUP and VLOOKUP.
This was disabled as a fallout from
commit bad266fa06294f1dacec11ec02dfc6ae4ec8cdc4
CommitDate: Mon Feb 22 21:30:28 2016 +0100
ScQueryEntry::GetSearchTextPtr() with SearchType, tdf#72196
that changed the !bRegExp condition (which includes numeric) to
bLiteral (which covers only text string) searches.
Change-Id: I265286ffe75bc7cd9e660ab82b0e647d82865eb9
(cherry picked from commit c53235ba9aab844c4b16ecf7a28429e256bace6d)
Reviewed-on: https://gerrit.libreoffice.org/51779
Tested-by: Eike Rathke <erack at redhat.com>
Reviewed-by: Dennis Francis <dennis.francis at collabora.co.uk>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 13abb17a9fc4..96af2dbc3150 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1288,8 +1288,9 @@ bool ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
bIgnoreMismatchOnLeadingStrings = true;
bool bLiteral = mpParam->eSearchType == utl::SearchParam::SearchType::Normal &&
mpParam->GetEntry(0).GetQueryItem().meType == ScQueryEntry::ByString;
- bool bBinary = bLiteral && mpParam->bByRow && (mpParam->GetEntry(0).eOp ==
- SC_LESS_EQUAL || mpParam->GetEntry(0).eOp == SC_GREATER_EQUAL);
+ bool bBinary = mpParam->bByRow &&
+ (bLiteral || mpParam->GetEntry(0).GetQueryItem().meType == ScQueryEntry::ByValue) &&
+ (mpParam->GetEntry(0).eOp == SC_LESS_EQUAL || mpParam->GetEntry(0).eOp == SC_GREATER_EQUAL);
bool bFound = false;
if (bBinary)
{
More information about the Libreoffice-commits
mailing list