Bug 167793 - Sorting a range with hidden or grouped rows -- messes up which rows were hidden
Summary: Sorting a range with hidden or grouped rows -- messes up which rows were hidden
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-03 15:37 UTC by vic
Modified: 2026-01-01 19:16 UTC (History)
2 users (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 vic 2025-08-03 15:37:21 UTC
Description:
see STR below

Steps to Reproduce:
I present in parallel what happends with Grouping (F12) and Hiding (from context menu) . 

1.In range A1:A10 create list 1,2,..10. 
Also in range A12:A21 create same list.

2. In first range, Group (F12) rows 3-5. 
In second range Hide rows 14-16.

3. Select first range and sort Descending. 
Do same for 2nd range

3. Pay attention to which rows are now hidden. Try unhide/uncollapse.

Actual Results:
In first range (by Grouping):
there is a "+" sign but the rows 3-5 do not look collapsed there. Instead there is an extra range of rows hidden:6-8.
If click the "+" then the "-", rows 3-8 are hidden.

In second range (by Hiding):
now rows 17-19 are hidden, not the original 14-16

Expected Results:
For both Grouping and Hiding: sorting should not affect which rows were set to group/hide (except that properly change the content inside, as per sorting order). 


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.5.2 (X86_64) / LibreOffice Community
Build ID: 03d19516eb2e1dd5d4ccd751a0d6f35f35e08022
CPU threads: 2; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 1 m_a_riosv 2025-08-03 23:47:09 UTC
Please test if changing
Menu>Tools>Options>LibreOffice Calc>General - Update references when sorting range of cells
has any effect.
Comment 2 vic 2025-08-04 03:28:48 UTC
(In reply to m_a_riosv from comment #1)
> Please test if changing
> Menu>Tools>Options>LibreOffice Calc>General - Update references when sorting
> range of cells
> has any effect.

It has no effect.
Comment 3 Buovjaga 2026-01-01 19:16:09 UTC
For sorting destroying group information, we have bug 101182

About sorting and hidden rows, bug 130053 comment 3 says Calc behaves in the same way as Excel, so maybe it would be disruptive for users to change things...