sc/source/core/data/table3.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
New commits: commit b90a5d0f23ffdf1b43c752db424c65bec6f0e8f1 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Mon Nov 15 14:53:50 2021 +0100 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Mon Nov 15 17:56:14 2021 +0100 Revert "improve performance of cell equality comparisons)" (tdf#139612) This reverts commit 5e9c2677e8fcd19b289d947b94ceba52b138728b. Reason for revert: I based this on code that tdf#139612 talks about, and which is possibly incorrect. Change-Id: Ie9e46a19ac8fe10bbf6cf6f429741200684d5bfd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125138 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 02c2619624b5..9c7417278658 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -2705,12 +2705,6 @@ public: // Simple string matching i.e. no regexp match. if (isTextMatchOp(rEntry)) { - bool matchWholeCell = bMatchWholeCell; - // When comparing for (in)equality, we can simply compare the whole cell - // even when not explicitly asked, and that code is faster (it's simpler, - // no SharedString temporary, etc.). - if( rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL ) - matchWholeCell = true; if (rItem.meType != ScQueryEntry::ByString && rItem.maString.isEmpty()) { // #i18374# When used from functions (match, countif, sumif, vlookup, hlookup, lookup), @@ -2720,7 +2714,7 @@ public: if ( rEntry.eOp == SC_NOT_EQUAL ) bOk = !bOk; } - else if ( matchWholeCell ) + else if ( bMatchWholeCell ) { if (pValueSource1) { @@ -2758,7 +2752,7 @@ public: sal_Int32 nStrPos; if (!mbCaseSensitive) - { + { // Common case for vlookup etc. const svl::SharedString rSource(pValueSource1? *pValueSource1 : mrStrPool.intern(*pValueSource2)); const rtl_uString *pQuer = rItem.maString.getDataIgnoreCase();