Bug 140707 - CALC Sort Failure
Summary: CALC Sort Failure
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Sorting
  Show dependency treegraph
 
Reported: 2021-02-27 22:53 UTC by Ron Willing
Modified: 2023-04-06 17:12 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
CALC sample of failure (183.61 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-03-08 17:33 UTC, Ron Willing
Details
Replace original file with this actual failing file with CALC sort bug (13.40 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-03-08 17:42 UTC, Ron Willing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ron Willing 2021-02-27 22:53:10 UTC
Description:
Calc/Excel Sort Incompatibility
I have spreadsheet I use in my spreadsheet class that demonstrates the sort functions of Excel and Calc. To save the original content before the sort, I copy rows 2 through 6, cells A & B to D2. I then select cells D2 through D6 and click on the Sort AZ icon. I get the warning about adjacent information like Excel and hit enter. The problem is Calc includes Row 1 cells D1 & E1 in the sort that causes the Title to be included in the sort. Excel does not do that. It seems the different formatting between Rows 1 & 2 does not matter
The real problem is that this failure is inconsistent. Some list work and some fail. Lists starting in D2 and E10 fail but A2, G2, J2 H10, A17 and D17 function correctly. Mind blowing! Problem is reproduceable.

Steps to Reproduce:
1.Create list with Titles in Row 1 Cells A & B & D
2.Create list in Rows 2-6 Cols A & B
3.Copy R2-6 A & B to D2
4.Sort D2-D6
5.Yes to Expand sort
6.Problem = Title in D1 included in sort even though not selected.
7.Copies at other locations may or not fail. Have sample to share

Actual Results:
6. Problem = Title in D1 included in sort even though not selected.

Expected Results:
Excel does not include title. Only sorts selected cells. Some locations in CALC work correctly. Have CALC file to share via email.


Reproducible: Sometimes


User Profile Reset: No



Additional Info:
Should not included Title cells. Fails on my other computers.
Comment 1 Xisco Faulí 2021-03-01 12:33:36 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 2 Ron Willing 2021-03-08 17:33:54 UTC
Created attachment 170340 [details]
CALC sample of failure

Actual spreadsheet that fails
Comment 3 Ron Willing 2021-03-08 17:36:14 UTC
Actual failing sample supplied
Comment 4 Ron Willing 2021-03-08 17:42:34 UTC
Created attachment 170341 [details]
Replace original file with this actual failing file with CALC sort bug

Sent wrong file first. It is my teaching sample.
Comment 5 Akshit 2022-01-02 09:45:32 UTC
Hello Ron,

I can confirm this bug is present in my version, I would like to add, however, your issue could be solved by selecting what needs to be sorted and sort it with 'current selection' instead of 'extend selection'

As far as I can tell this seems to be an issue with how the titles are assigned to columns.

Present in
Version: 7.2.2.2 / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 12; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Calc: threaded