Bug 130053 - Calc 6.4.0: Sorting considers hidden cells
Summary: Calc 6.4.0: Sorting considers hidden cells
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-17 12:43 UTC by Axel Braun
Modified: 2020-01-30 16:06 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Braun 2020-01-17 12:43:33 UTC
Description:
Have a table with some hidden rows.
Now sort for one column
Result: Sorting considers hidden rows as well. So the result is not really what you expect....

Version: 6.4.0.1
Build-ID: 40(Build:1)
CPU-Threads: 4; BS: Linux 5.4; UI-Render: Standard; VCL: kf5; 
Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE
Calc: threaded

Steps to Reproduce:
1. have a table with some rows hidden
2. sort by any column (in this case it was D, not A)
3.

Actual Results:
sorting is based on whole table including hidden rows.
Displayed results are different from original content

Expected Results:
Sorting is only conducted on visible content - invisible content should remain untouched


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Kevin Suo 2020-01-30 13:47:41 UTC
I do not reproduce with rows which are hidden by the auto-filter. I assume you are referring to the same when saying "hidden".

Steps I used:

1. Type in the following in spreadsheet:
a
1
3
3
2

2. Set autofilter, unselect "3", so now the table has "a" as the header row, and 2 value rows showing values 1 and 2.

3. In autofilter drop down, click sort ascending.
Now the values are correctly sorted, the value "3" is not showing up. This is expected.

Am I doing something wrong? Could you give more details showing how to reproduce this, by giving steps 1,2,3,4, and provide test document if necessary.

I mark this as NEEDINFO, please set the status back to UNCONFIRMED once you have provided the above information. Thanks.
Comment 2 Axel Braun 2020-01-30 15:19:39 UTC
(In reply to Kevin Suo from comment #1)
> I do not reproduce with rows which are hidden by the auto-filter. I assume
> you are referring to the same when saying "hidden".

Not hidden by auto-filter.
Mark a row -> right mouse button -> hide
please try with this setting
Comment 3 Kevin Suo 2020-01-30 15:51:42 UTC
(In reply to Axel Braun from comment #2)
> Not hidden by auto-filter.
> Mark a row -> right mouse button -> hide

Then why do you think this is a bug, rather than a feature? I noticed that Microsoft Excel is doing the same behaviour. If a row is hidden manually, it is included in the sort operation. If it is hidden because of the auto filter or standard filter, it is ignored in the sort.
Comment 4 Kevin Suo 2020-01-30 16:03:14 UTC
Also, be aware that, if you select the visible rows and delete these rows, the hidden rows in between will also be deleted. With autofilter, the hidden rows (hidden by autofilter rule) will remain.

I mark this as RESOLVED NOTABUG. Feel free to mark it back to UNCONFIRMED if someone does not agree - if that is the case, you'd better provide evidence (technical specs etc) to show why the hidden rows should be ignored in sort.
Comment 5 Kevin Suo 2020-01-30 16:06:59 UTC
By the way, this behaviour is consistent in all the libreoffice versions - It is the same at least in version 5.2 based on my observation.