diff options
author | Kevin Suo <suokunlong@126.com> | 2024-01-16 10:13:59 +0800 |
---|---|---|
committer | Kevin Suo <suokunlong@126.com> | 2024-01-18 13:08:22 +0100 |
commit | 89e032e9c4c51f52680c7d8bacf59ab2a34f2180 (patch) | |
tree | 1616d789157eda4b1e156f4084d9edffeaa8670d /sc/source/core | |
parent | ab7893544dc6be6dc192dffefd57cd5ddd421c35 (diff) |
tdf#158314: show Empty and Error entries as non-selected and inactive...
...when hidden by autofilter.
The "show hidden filter elements as inactive" feature was added and improved by:
commit 2d1df9f3dccc10f13b8585ad18afce1542ebc4d1
(tdf#117276 sc: Show hidden filter elements as inactive elements)
commit 2085e90fe8ac129bc4dbac4612d1ea7544335dae
(FilteredRow is not a property of the column, tdf#117276 follow-up)
commit 7321db3cadc8c0e4437ca04e5dcb652734ea9c26
(Related tdf#117276 sc: Show hidden filter elements as inactive elements)
commit 19533948370dc1ccd7334dbe1a8b7fc8330b10c0
(Name FilteredRow what it is, not hidden; tdf#117276 follow-up)
Those changes correctly made normal hidden filter elements as inactive,
but failed to do so for Empty and Error entries.
This patch shows the hidden Empty and Error entries as inactive and unselected.
Also, do not show the Empty entry at the top of the list in case it is inactive.
Change-Id: Ibcd758cebc0692b04b162cdfc3e06eceb86b17da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162166
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Kevin Suo <suokunlong@126.com>
Tested-by: Kevin Suo <suokunlong@126.com>
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/data/column3.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index de352fd95cdc..3481abfe8e9e 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -2584,7 +2584,7 @@ class FilterEntriesHandler { if (!mrFilterEntries.mbHasEmpties) { - mrFilterEntries.push_back(ScTypedStrData(OUString())); + mrFilterEntries.push_back(ScTypedStrData(OUString(), 0.0, 0.0, ScTypedStrData::Standard, false, mbFilteredRow)); mrFilterEntries.mbHasEmpties = true; } return; @@ -2614,7 +2614,7 @@ class FilterEntriesHandler OUString aErr = ScGlobal::GetErrorString(nErr); if (!aErr.isEmpty()) { - mrFilterEntries.push_back(ScTypedStrData(std::move(aErr))); + mrFilterEntries.push_back(ScTypedStrData(std::move(aErr), 0.0, 0.0, ScTypedStrData::Standard, false, mbFilteredRow)); return; } } |