Bug 86762 - Sorting shouldn't require refresh
Summary: Sorting shouldn't require refresh
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.5.2 release
Hardware: Other All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:4.4.0.0.beta2 target:4.2.8 tar...
Keywords: regression
Depends on:
Blocks: 85490
  Show dependency treegraph
 
Reported: 2014-11-27 03:54 UTC by Luke
Modified: 2014-12-10 15:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample spreadsheet that requires refreshing after sort (13.15 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-11-27 03:54 UTC, Luke
Details
simplified test case document (7.62 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-11-30 00:16 UTC, Eike Rathke
Details
updated simplified test case document (8.31 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-12-01 15:48 UTC, Eike Rathke
Details
updated simplified test case document to include sort columns (8.02 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-12-02 14:01 UTC, Eike Rathke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2014-11-27 03:54:49 UTC
Created attachment 110108 [details]
Sample spreadsheet that requires refreshing after sort

With the new sorting routine some spreadsheets now require you to press Ctrl+Shift+F9 after a sort to get the correct results.

Steps to reproduce:
1. Open SortNeedRefresh.ods with a recent build of Calc (updateRefs=False)
2. Sort column A descending
3. Open SortNeedRefresh.ods in Calc 4.1 or earlier, OpenOffice Calc, Google Sheets, Excel, or WPS Sheets
4. Sort column A descending
5. Compare results

Calc should give the correct results without the user having to manually refresh.
Comment 1 raal 2014-11-27 19:59:20 UTC
I can confirm with Version: 4.5.0.0.alpha0+
Build ID: 90fe751ab381cf59e87b79d921b3773567774af2
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-11-27_06:13:34
Comment 2 Eike Rathke 2014-11-30 00:16:44 UTC
Created attachment 110246 [details]
simplified test case document

Load much simplified test case document.
With UpdateReferenceOnSort=false do:
* sort A1:B2 on A descending
  * note that D1:E2 are now all 0
* enter 16 in B2
  * D1 and E1 change to 8
  * D2 and E2 are still 0, should be 16
* enter 32 in B1
  * D2 and E2 change to 16
  * D1 and E1 are still 8, should be 32

=> broadcasters are sorted cross-wise
=> after sort the empty cell B2 is not broadcasted, otherwise D1 and E1
   would change their value to 8
Comment 3 Eike Rathke 2014-11-30 00:31:59 UTC
Regression already introduced in 4.2.5, 4.3.0 (4.3.1 changed to partly UpdateReferenceOnSort=true so acts differently, but 4.3.4 has it again) and early 4.4.0
Comment 4 Eike Rathke 2014-12-01 15:48:19 UTC
Created attachment 110307 [details]
updated simplified test case document

Test case showing also range references are affected and don't get properly notified when new values are entered.
Comment 5 Commit Notification 2014-12-02 13:58:01 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6c2111f17089eb667bf526561d7667d17825e822

fdo#86762 re-establish listeners to move cell broadcasters

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2014-12-02 13:58:04 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=08793e08c7e9cefe594c49130f782725e386c463

fdo#86762 broadcast also empty cells after sort

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2014-12-02 13:58:09 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e119f3883513aeaa49f332362620e955dc8b453f

fdo#86762 re-establish listeners on moved broadcasters

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Eike Rathke 2014-12-02 14:01:00 UTC
Created attachment 110357 [details]
updated simplified test case document to include sort columns

Similar to sort rows, added test case data to sort left to right (sort columns) on range A5:B6
Comment 9 Commit Notification 2014-12-02 14:38:14 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4c254a6d2532460351180c071fabf44129e8885d&h=libreoffice-4-4

fdo#86762 re-establish listeners to move cell broadcasters

It will be available in 4.4.0.0.beta2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2014-12-02 14:38:18 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7e12f98fc05c6828ca0823cbaf45670073778c8a&h=libreoffice-4-4

fdo#86762 broadcast also empty cells after sort

It will be available in 4.4.0.0.beta2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2014-12-02 14:38:21 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=61f8e9734d5e27fd39978bada0e91c1526bc6003&h=libreoffice-4-4

fdo#86762 re-establish listeners on moved broadcasters

It will be available in 4.4.0.0.beta2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Eike Rathke 2014-12-02 16:32:18 UTC
Pending review
at https://gerrit.libreoffice.org/13273 for 4-3
at https://gerrit.libreoffice.org/13274 for 4-3-5
at https://gerrit.libreoffice.org/13275 for 4-2
at https://gerrit.libreoffice.org/13276 for 4-2-8
Comment 13 Commit Notification 2014-12-02 18:55:17 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bbfa317b9cfdbb0c44140e3414d4c2dfba9bcef4

unit test for sort with broadcasters, fdo#86762

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2014-12-02 20:23:04 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-2-8":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b83207805b9902742bc6a56335293853b3883fe3&h=libreoffice-4-2-8

fdo#86762 re-establish listeners to move cell broadcasters

It will be available in 4.2.8.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2014-12-02 20:24:34 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f70bfe9d6ba27944935865eed731c6fc07649a1a&h=libreoffice-4-2

fdo#86762 re-establish listeners to move cell broadcasters

It will be available in 4.2.9.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2014-12-02 20:24:39 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fd1ae18d54f4a57aaa67c0a011fef7e6c20fdbeb&h=libreoffice-4-3

fdo#86762 re-establish listeners to move cell broadcasters

It will be available in 4.3.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2014-12-02 22:57:54 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=60fe8a4cd6c0697fbc1c9b8988a8340c1f29a174&h=libreoffice-4-4

unit test for sort with broadcasters, fdo#86762

It will be available in 4.4.0.0.beta2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2014-12-10 15:05:27 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=91e9b38bee769ab41332b1cae6d2bbbd83a27eff&h=libreoffice-4-3-5

fdo#86762 re-establish listeners to move cell broadcasters

It will be available in 4.3.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.