summaryrefslogtreecommitdiff
path: root/sc/source/core/data/cellvalue.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-05-14 15:59:29 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-05-14 22:06:44 +0200
commitfce7c123203c91f62b45447f45e1d1f1b45d5b48 (patch)
tree0a5e4973d4d2a208b4b1722fe94c072a5d4db0d2 /sc/source/core/data/cellvalue.cxx
parentaa446591b7feb5bb667533ef7acdfc636105f9d9 (diff)
cache cell positions when searching in calc (tdf#108347)
The document has a large number of rows, and mdds normally always searches from the first item when looking up the container position, which leads to a quadratic cost when searching the entire sheet. GetCellValue() already has a variant that caches the last position, so just use it (and make sure to invalidate if it's search&replace and something changes). Change-Id: I26da60cebf641e10ed92e548fe5f9016900d3cf0 Reviewed-on: https://gerrit.libreoffice.org/72290 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/source/core/data/cellvalue.cxx')
-rw-r--r--sc/source/core/data/cellvalue.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx
index b131debdb7a2..7fffc669ee6c 100644
--- a/sc/source/core/data/cellvalue.cxx
+++ b/sc/source/core/data/cellvalue.cxx
@@ -491,7 +491,7 @@ void ScCellValue::release( ScColumn& rColumn, SCROW nRow, sc::StartListeningType
mfValue = 0.0;
}
-OUString ScCellValue::getString( const ScDocument* pDoc )
+OUString ScCellValue::getString( const ScDocument* pDoc ) const
{
return getStringImpl(*this, pDoc);
}
@@ -647,7 +647,7 @@ double ScRefCellValue::getRawValue() const
return 0.0;
}
-OUString ScRefCellValue::getString( const ScDocument* pDoc )
+OUString ScRefCellValue::getString( const ScDocument* pDoc ) const
{
return getStringImpl(*this, pDoc);
}