summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-11-23 11:18:53 +0100
committerLuboš Luňák <l.lunak@collabora.com>2021-11-23 20:53:59 +0100
commit9f4934c6682697fa7e77953d9b0e558e1a88d017 (patch)
treea79fc46b7dd0ad942568d8e3921493ddce2c44f2 /sc/source
parent88afa134df87119fb23793543a15c23432b94cb2 (diff)
do not fetch cell data if ScRefValueCell can tell that
Change-Id: I2910231c9cf205ce697616e660e49056c221e89d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125731 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/table3.cxx12
1 files changed, 2 insertions, 10 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index a0c3428b2c98..9455b3d2f856 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -3001,20 +3001,12 @@ bool ScTable::ValidQuery(
const ScQueryEntry::QueryItemsType& rItems = rEntry.GetQueryItems();
if (rItems.size() == 1 && rItems.front().meType == ScQueryEntry::ByEmpty)
{
- bool hasData;
- if( pBlockPos )
- {
- ScColumn* column = FetchColumn(rEntry.nField);
- hasData = column->HasDataAt(*pBlockPos->getBlockPosition(rEntry.nField), nRow);
- }
- else
- hasData = aCol[rEntry.nField].HasDataAt(nRow);
if (rEntry.IsQueryByEmpty())
- aRes.first = !hasData;
+ aRes.first = aCell.isEmpty();
else
{
assert(rEntry.IsQueryByNonEmpty());
- aRes.first = hasData;
+ aRes.first = !aCell.isEmpty();
}
}
else