summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-11-16 01:30:24 +0100
committerLuboš Luňák <l.lunak@collabora.com>2021-11-17 10:10:58 +0100
commit8dec2a98ce29251936cd45ebf864a89ff767ee50 (patch)
tree5b336bda4ba803f2859bc0bdc0a57e89ab6213d8 /sc/source/core
parentfcad2503ede92b515076f9bb3162855dcc2c575d (diff)
revert "vlookup - optimize SC_EQUAL and NOT_EQUAL." (tdf#139612)
That commit breaks lookup when the "Search criteria = and <> must apply to whole cells" option is disabled, as it enforces whole cell checking regardless of the option. Given that the option is enabled by default in LO ('SearchCriteria' in Calc.xcs) and it's what MSOffice does as well, and this default gives good performance regardless of the option, I don't understand the purpose of the commit. Possibly it was based on a document where somebody disabled the option and then indeed got worse performance. Solution: Don't do that :). This reverts the code parts of a953fa1c0f6a40a08859570516c511f3a841 . The test I've kept but switched to ensure that partial matching does work if the option to match whole cells is disabled. I've also changed the tooltip for the option to mention performance and not suggest that off is the default. Change-Id: I56d7b6e7b8e9f0622f7ad6d447daf56c3b705a7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125267 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/table3.cxx9
1 files changed, 0 insertions, 9 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 9c7417278658..0ef833511dba 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2767,11 +2767,6 @@ public:
if (nIndex < 0)
nStrPos = -1;
- else if (rEntry.eOp == SC_EQUAL ||
- rEntry.eOp == SC_NOT_EQUAL)
- {
- nStrPos = pCellStr == pQuer ? 0 : -1;
- }
else
{ // OUString::indexOf
nStrPos = rtl_ustr_indexOfStr_WithLength(
@@ -2803,14 +2798,10 @@ public:
switch (rEntry.eOp)
{
case SC_EQUAL:
- bOk = ( nStrPos == 0 );
- break;
case SC_CONTAINS:
bOk = ( nStrPos != -1 );
break;
case SC_NOT_EQUAL:
- bOk = ( nStrPos != 0 );
- break;
case SC_DOES_NOT_CONTAIN:
bOk = ( nStrPos == -1 );
break;