Bug 85405 - EDITING: Incorrect sorting of formulae
Summary: EDITING: Incorrect sorting of formulae
Status: RESOLVED DUPLICATE of bug 81633
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.2.2 release
Hardware: x86-64 (AMD64) All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks: 85490 85614
  Show dependency treegraph
 
Reported: 2014-10-24 12:25 UTC by Nigel R Murray
Modified: 2014-12-04 16:50 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Spreadsheet demonstrating how formulae are incorrectly sorted (40.97 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-10-24 12:25 UTC, Nigel R Murray
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nigel R Murray 2014-10-24 12:25:11 UTC
Created attachment 108351 [details]
Spreadsheet demonstrating how formulae are incorrectly sorted

When sorting a table, formulae should not be sorted.  However, in this release (4.3.2.2) formulae are being sorted.  This breaks common usages, such as cumulative sums or counts.

The attached spreadsheet shows two simple tables, each with a column of random numbers and a column of row counts.  The left table is unsorted, the right table sorted on its first column.  When the first column is sorted, the second column (of row counts) is no longer correct.
Comment 1 Jacques Guilleron 2014-10-24 14:46:41 UTC
Hi Nigel,

Did you select Current selection in the Sort Range windows appearing when you ask for Sort?

Jacques
Comment 2 Nigel R Murray 2014-10-24 14:55:06 UTC
Hi Jacques.  No, I didn't make an explicit selection.  I simply click on the column of interest and then click on the "Sort Descending" or "Sort Ascending" icon.  This is the method I have typically used in versions past.

Let me know if you need any further info.
Comment 3 Jean-Baptiste Faure 2014-10-25 05:24:29 UTC
Indeed, whatever the choice made for the Calc configuration option "Update references when sorting range of cells", sorting gives the same result and it is different from the result given by LO 4.2.6.3, 4.1.6 and 4.0.6.

This case is similar to the case of bug 81633 and bug 85215 (attachment 108255 [details])
but it is different because in your case the configuration option seems to have no action.

Problem reproduced with
Version: 4.4.0.0.alpha1+
Build ID: 1df0656c4bb139606081625fb19e39fbef9f8890
and
Version: 4.3.4.0.0+
Build ID: 0bb29affae83d0410f745f46267527e10777fcd2

both built at home under Ubuntu 14.04 x86-64

Best regards. JBF
Comment 4 Jean-Baptiste Faure 2014-10-26 17:07:29 UTC
It works if you sort only the data column (decline the invitation to extend the selection).
In LO 4.4.0.0.alpha1+:
- if option "Update references when sorting range of cells" is not checked (UpdateReferenceOnSort hidden option set to false in 4.3.4.0.0+) the formulas are not modified.
- if option "Update references when sorting range of cells" is checked (UpdateReferenceOnSort hidden option set to true in 4.3.4.0.0+) the formulas are modified but their values are still unchanged.

For me it is a duplicate of bug 81633. Feel free to reopen if you disagree. In this case, please, explain.

Best regards. JBF

*** This bug has been marked as a duplicate of bug 81633 ***