Bug 85807 - Remove merged cell restriction on sorting
Summary: Remove merged cell restriction on sorting
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.2.2 release
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Merge-Split
  Show dependency treegraph
 
Reported: 2014-11-03 15:00 UTC by Mike Ruskai
Modified: 2019-09-14 17:10 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample document. (13.37 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-11-03 15:00 UTC, Mike Ruskai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Ruskai 2014-11-03 15:00:38 UTC
Created attachment 108841 [details]
Sample document.

Simple sample attached.

Select A1:B3, then attempt to sort by column A descending.  If you have the "Include formats" sort option selected, you get the message "Ranges containing merged cells can only be sorted without formats."

If you uncheck "Include formats" in the search options, the sort completes, but the bold status of A3 stays in A3 instead of following the value to A1 as it should in any sane sorting scenario.

There is no logical reason for sorting with formats to not work simply because there are some merged cells involved.  If there are some arcane edge cases that cause bad results, then simply throw up an (optional) warning to that effect.  Don't block the sort.
Comment 1 dpage.FOSS 2014-11-19 02:29:18 UTC
Confirmed on Windows 7, Libre Office Version 4.3.4.1.
Set to minor - low, because it does not prevent professional quality work, but can slow it down.  

Please do not to change the priority/severity without knowing how we use these fields internally.  Thank you.
Comment 2 Luke 2014-11-19 04:29:15 UTC
I just tested this spreadsheet with WPS sheets and Gnumeric. Both of them refused to sort with error 
"Merged Cells cannot be sorted"

It's trivial to work around this. And considering how the last enhancement to sort went, I do not think this should be approved without test cases and more analysis.
Comment 3 Joel Madero 2014-11-19 04:38:40 UTC
This was incorrectly closed as NOTABUG. I have talked to a core developer who says that it is possible but that it is an enhancement request as it behaves as it was designed to behave (and how most, if not all other software in the same category behaves). Marking it as such.
Comment 4 Luke 2019-09-14 17:10:12 UTC
While this enhancement makes sense for trivial examples, when dealing with a complex table, you must also add the requirement that all merged cells must be the same size. Otherwise you get into a messy situation where the result of the merge could be undefined / nonsensical.