diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-11-23 11:18:53 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-11-23 20:53:59 +0100 |
commit | 9f4934c6682697fa7e77953d9b0e558e1a88d017 (patch) | |
tree | a79fc46b7dd0ad942568d8e3921493ddce2c44f2 /sc/source | |
parent | 88afa134df87119fb23793543a15c23432b94cb2 (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.cxx | 12 |
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 |