summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-11-15 14:53:50 +0100
committerLuboš Luňák <l.lunak@collabora.com>2021-11-15 17:56:14 +0100
commitb90a5d0f23ffdf1b43c752db424c65bec6f0e8f1 (patch)
tree04b5a194a25b1286f9ac183f9ac4938220431501 /sc
parentf0b745e59f150ea33fc09eb88d682f8cbc085f7c (diff)
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.lunak@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/table3.cxx10
1 files changed, 2 insertions, 8 deletions
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();