Bug 79441 - Internal references to other sheets not sorted (summary comment 31, and then comment 56)
Summary: Internal references to other sheets not sorted (summary comment 31, and then ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.5.1 rc
Hardware: Other All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:4.4.0 target:4.3.0 target:4.2....
Keywords: regression
: 80312 80314 81451 81542 83213 84511 86125 86506 86519 86742 86902 86916 87010 87231 (view as bug list)
Depends on:
Blocks: mab4.2 85490
  Show dependency treegraph
 
Reported: 2014-05-30 07:03 UTC by Laurent BP
Modified: 2014-12-11 10:31 UTC (History)
22 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file to sort on column D in sheet Average (55.70 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-05-30 07:15 UTC, Laurent BP
Details
Bibisect log (1.60 KB, text/plain)
2014-05-30 13:17 UTC, Laurent BP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent BP 2014-05-30 07:03:04 UTC
Description: Version 4.3 modify sorting behavior of references to other sheets. Bug 77018 refers to external references (which apply to all versions of LibO) but with Version 4.3 same bug affects sorting of references to other sheet.

Steps to reproduce:
1. Unzip attachment 100009 containing
2. Open test.ods
3. Accept update of links (useless for this bug)
4. Select cells A15:D20
5. Sort decreasing according to column A with fast sort button

Expected behavior:
references in column C should be modified to keep Values as the right place as they were with prior versions (<=4.2)

Current behavior:
References in column C remain the same, thus mixing values of column A and C

Note:
- same bug apply to column B (external references) which is for bug 77018.
- behavior of column D (internal references to the same sheet) is not a bug as referenced cells should be sorted in the same time
Comment 1 Laurent BP 2014-05-30 07:15:39 UTC
Created attachment 100144 [details]
Test file to sort on column D in sheet Average

As attachment 100009 may appear as a feature and not a bug (behavior is now the same whatever references types are) and to make bug clearer, lets consider a document from real life as attached.

Steps to reproduce:
1. Open attached file
2. Select A1:D11 in sheet Average
3. Sort descending on column D

Expected behavior:
Students should be sorted with the highest average at the top

Current behavior:
Nothing change
Comment 2 pierre-yves samyn 2014-05-30 07:33:21 UTC
Hi

I confirm the regression on windows 7/64 & Version: 4.3.0.0.beta1
Build ID: 2e39c7e59c8fc8b16a54c3d981dceef27fb0c07f

Regards
Pierre-Yves
Comment 3 Laurent BP 2014-05-30 07:40:25 UTC
NOT reproduce with:
- Version: 4.3.0.0.alpha0+
Build ID: 22b709e84a7b6d38cab2dd37f2f2b28e0fc9d062
TinderBox: Win-x86@47-TDF, Branch:MASTER, Time: 2014-02-20_00:02:36

Reproduce with:
- Version: 4.3.0.0.alpha0+
Build ID: 9278df2c21fed09b6b10465ca33b227ad7c49b41
TinderBox: Win-x86@47-TDF, Branch:MASTER, Time: 2014-03-19_08:44:54
Comment 4 Laurent BP 2014-05-30 07:41:10 UTC
Argh!! Bug was backported to 4.2.5
Reproduce with Version: 4.2.5.0.0+
Build ID: 8ff260e47873674ca03a334f6b3198d66dc68db7
TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-05-04_21:46:54
Comment 5 Laurent BP 2014-05-30 13:17:02 UTC
Created attachment 100163 [details]
Bibisect log

Bibisected:
4d0e676c140628557df5cd6c7bc843854b61af51 is the first bad commit
commit 4d0e676c140628557df5cd6c7bc843854b61af51
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Mon May 12 00:14:14 2014 +0000

    source-hash-fa40f7df971b1aaabccc11668a987336f50e3b0d
    
    commit fa40f7df971b1aaabccc11668a987336f50e3b0d
    Author:     Miklos Vajna <vmiklos@collabora.co.uk>
    AuthorDate: Sat Mar 15 17:36:49 2014 +0100
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Sat Mar 15 17:40:46 2014 +0100
    
        rtftok: OPEN_M_TOKEN -> RTFTokenizer::lookupMathKeyword()
    
        Change-Id: I60d0e65d0e7f37b2d5cded64cee1270c51ed5b3d

:100644 100644 22186839f42f5d422f85906177e65a5a86aab3c6 67cf4d993a8880c8e558da6b353cea364e230330 M      ccache.log
:100644 100644 2a2fa2a93aeee93d774a245fa6928cd0f71ee7b4 1b45c18989cb85a070dde3282d4d88c740b546fa M      commitmsg
:100644 100644 32730498dfcfe90ba8e20e3de525cf584f324c8b fa3e2cdec7e5f609dddff4d1452f663a2fca7ebe M      make.log
:040000 040000 c6cc4459e2dbc27c9c690bdb7289682a4d54260b 834530fad4ed019169a143c964faa33bf7cd7032 M      opt
Comment 6 Kohei Yoshida 2014-05-31 03:54:59 UTC
Not a regression; it's an old bug from OOo times.  See Bug 45146.

And bibisect result is bogus.
Comment 7 Jean-Baptiste Faure 2014-05-31 07:23:52 UTC
(In reply to comment #6)
> Not a regression; it's an old bug from OOo times.  See Bug 45146.
> 
> And bibisect result is bogus.

Hi Kohei,

Sorry but I disagree because with attachment 100144 [details] it works as expected in LO 4.1.6 and LO 4.0.6 (generic Linux versions from TDF) under Ubuntu 14.04 x86-64.

Best regards. JBF
Comment 8 Jean-Baptiste Faure 2014-05-31 07:30:58 UTC
I think that in this case, the (bogus?) behavior described in bug 45146 is the expected behavior. Laurent could you confirm ?

Best regards. JBF
Comment 9 Laurent BP 2014-05-31 12:26:37 UTC
Hi Kohei,

(In reply to comment #6)
> Not a regression; it's an old bug from OOo times.  See Bug 45146.
I think the three bugs deals with the same problem but concern different type of references:
- bug 45146 deals with internal references to the same sheet. It is broken from the old time, and none spreadsheet I tested (AOO, Excel) are able to fix it. I'm not sure it is possible.
- bug 79441 (this bug) deals with internal references to a different sheet. It was broken between 4.2.4.2 and 4.3 beta1 (more precisely between 22b709e84a7b6d38cab2dd37f2f2b28e0fc9d062 and 9278df2c21fed09b6b10465ca33b227ad7c49b41). I will redo a better bibisection.
- bug 77018 deals with external references. It is broken from the old time, but was fixed by AOO between 3.4.0 and 3.4.1.

The three bugs are visible through attachment 100009. See comment #0. Breaking sorting of internal references to other sheet was recently introduced, then I consider it as a regression. Test attachment 100144 [details] (see comment #1) with LibO 4.2.4.2 and LibO 4.2.5.1 to see the regression.

> And bibisect result is bogus.
Sorry. On the way to do a better one.
Comment 10 Laurent BP 2014-05-31 13:23:07 UTC
(In reply to comment #6)
> And bibisect result is bogus.

I tried again, but I've got exactly the same result :(
I downloaded http://people.canonical.com/~bjoern/bibisect/bibisect-43only.tar.xz
and follow instructions from
https://wiki.documentfoundation.org/QA/HowToBibisect#Bibisecting_a_regression_in_LibreOffice

Is 43only repo bogus, or did I make something wrong?
Comment 11 Laurent BP 2014-06-01 19:10:55 UTC
Regression was introduced by commit 0698c49ccdbf62dd84d3f9c5d25ee039f4fff722
http://cgit.freedesktop.org/libreoffice/core/commit/?id=0698c49ccdbf62dd84d3f9c5d25ee039f4fff722

to solve bug 72741

Add Michael as copy
Comment 12 Winfried Donkers 2014-06-02 08:38:02 UTC
(In reply to comment #9)
> - bug 45146 deals with internal references to the same sheet. It is broken
> from the old time, and none spreadsheet I tested (AOO, Excel) are able to
> fix it. I'm not sure it is possible.

I checked and Excel does sort correctly provided the reference is on the same line (e.g. cell B4 contains '=B34'). It should be nice if at least that functionality could be fixed.
Comment 13 Laurent BP 2014-06-02 09:23:54 UTC
(In reply to comment #0)
> 1. Unzip attachment 100009 [details] containing

(In reply to comment #1)
> As attachment 100009 [details] may appear as a feature and not a bug

Sorry I mistyped attachment number. The right document is attachment 100089 [details].

(In reply to comment #12)
> (In reply to comment #9)
> > - bug 45146 deals with internal references to the same sheet. It is broken
> > from the old time, and none spreadsheet I tested (AOO, Excel) are able to
> > fix it. I'm not sure it is possible.
> 
> I checked and Excel does sort correctly provided the reference is on the
> same line (e.g. cell B4 contains '=B34'). It should be nice if at least that
> functionality could be fixed.

Please continue this discussion in the right bug report.
Comment 14 Laurent BP 2014-06-02 11:32:08 UTC
Change version to 4.2.5 RC1
Comment 15 janekptacijarabaci 2014-06-21 08:51:29 UTC
*** Bug 80314 has been marked as a duplicate of this bug. ***
Comment 16 Laurent BP 2014-06-21 13:28:40 UTC
*** Bug 80312 has been marked as a duplicate of this bug. ***
Comment 17 Eike Rathke 2014-07-10 20:57:14 UTC
Taking.
Comment 18 Commit Notification 2014-07-11 16:42:36 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

resolved fdo#79441 keep 3D references intact during sort



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 19 Eike Rathke 2014-07-11 17:35:16 UTC
Pending review
for 4-3 at https://gerrit.libreoffice.org/10238
for 4-3-0 at https://gerrit.libreoffice.org/10239
for 4-2 at https://gerrit.libreoffice.org/10240
for 4-2-6 at https://gerrit.libreoffice.org/10241
Comment 20 Commit Notification 2014-07-14 13:39:21 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=caf35a3ab2fa19134a900dcfd2dcc86936e435a5&h=libreoffice-4-3

resolved fdo#79441 keep 3D references intact during sort


It will be available in LibreOffice 4.3.1.

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 21 Commit Notification 2014-07-14 14:55:25 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=2d5e4e5a551ac7c2329f21327ff4c4aa8582d154&h=libreoffice-4-2

resolved fdo#79441 keep 3D references intact during sort


It will be available in LibreOffice 4.2.7.

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 22 Commit Notification 2014-07-15 16:07:41 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-3-0":

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

resolved fdo#79441 keep 3D references intact during sort


It will be available already in LibreOffice 4.3.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 23 ign_christian 2014-07-17 08:10:18 UTC
*** Bug 81451 has been marked as a duplicate of this bug. ***
Comment 24 Commit Notification 2014-07-22 14:03:30 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-2-6":

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

resolved fdo#79441 keep 3D references intact during sort


It will be available already in LibreOffice 4.2.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 25 Jürgen Mähnß 2014-07-27 13:05:32 UTC
Tried LO 4.2.6.1, Version from 2014-07-10: bug is not resolved.
Comment 26 V Stuart Foote 2014-07-27 13:28:05 UTC
(In reply to comment #25)
> Tried LO 4.2.6.1, Version from 2014-07-10: bug is not resolved.

As 4.2.6.1 was built on 10 July that would not have the patch applied. Please install a current build of 4.2.6.2 (24 July) or 4.3.0.4 (26 July), or of master and report against that.
Comment 27 Eike Rathke 2014-07-28 07:26:04 UTC
Setting this to FIXED again instead of NEEDINFO.
Comment 28 tommy27 2014-07-28 07:45:14 UTC
I remove this bug from mab4.3 list and I leave it on the mab4.2
a MAB can't be in more than 1 list, please do not file mabs in multiple list at once.
Comment 29 V Stuart Foote 2014-07-28 13:46:10 UTC
(In reply to comment #27)
> Setting this to FIXED again instead of NEEDINFO.

@Eike, I've no doubt it is fixed. But it would have been appropriate to wait for Juergen M. to respond and close it himself once he tests against a patched build, and why I set it NEEDINFO instead of back to NEW.

Stuart
Comment 30 Jürgen Mähnß 2014-07-28 14:51:54 UTC
Advices are a bit confusing for me.
I tried daily build 
libo-42~2014-07-28_11.48.32_LibreOfficeDev_4.2.7.0.0_Win_x86
from http://dev-builds.libreoffice.org/daily/
This doesn't work.
Unfortunately I couldn't find 4.2.6.2 July 24th in daily builds.
Now found it under http://dev-builds.libreoffice.org/pre-releases/win/x86/.
With that release sorting works now.
Comment 31 Laurent BP 2014-08-11 20:39:16 UTC
This bug was solved in these versions:
- Version: 4.3.1.0.0+
Build ID: 5d0673b0f9126f140ffc3d130ee3f04d4f8dcb07
TinderBox: Win-x86@42, Branch:libreoffice-4-3, Time: 2014-07-15_08:56:58
- Version: 4.2.6.2
Build ID: 185f2ce4dcc34af9bd97dec29e6d42c39557298f

This bug reappeared in these versions:
- Version: 4.2.7.0.0+
Build ID: 8de2e9b4bc53e6c097897142bad223c100d36292
TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-08-08_21:42:21
- Version: 4.3.2.0.0+
Build ID: 4744400afc9c2be99f62b12180fa33b43acef564
TinderBox: Win-x86@42, Branch:libreoffice-4-3, Time: 2014-08-11_06:41:42
- Version: 4.4.0.0.alpha0+
Build ID: ad85ce18d3939170e5ef7b1a1f8e5dda2c8aeb9c
TinderBox: Win-x86@39, Branch:master, Time: 2014-08-11_05:21:44

Description:
Sorting has been improved for external references (bug 77018) and internal references to the same sheet (bug 45146). But for internal references to an other sheet, bug 79441 reappeared may be with resolution of bug 45146.

Step to reproduce:
1. Unzip attachment 100089 [details]
2. Open test.ods and accept to update link
3. Sort descending A15:D20 on column A

Expected behavior:
Formulas in column B to D should be updated to have their values move to their new lines

Current behavior:
- external references (column B bug 77018) are correctly sorted
- internal references to same sheet (column D bug 45146 and bug 81309) are correctly sorted
- internal references to other sheet (column C this bug) are NOT correctly sorted

Bug reappeared may due to resolution of bug 81309
http://cgit.freedesktop.org/libreoffice/core/commit/?id=5c6ee09126631342939ae8766fe36083d8c011e3
Comment 32 Joel Madero 2014-08-11 20:44:39 UTC
Please don't reopen a bug without leaving a comment that gives your version of LibreOffice and OS. Closing again as RESOLVED -> FIXED
Comment 33 Laurent BP 2014-08-11 21:06:38 UTC
@Joel: sorry if comment 31 was not clear enough. All versions mentioned were tested on Win 7.

I can add that bug reappeared also in Version: 4.3.1.1
Build ID: c4b15cd4d00dec6b266fa830b4ba73e31ae6ce73

Should I open a new bug instead?
Comment 34 Joel Madero 2014-08-11 21:09:14 UTC
ah Laurent - apologies! I didn't know that was your email address ;) Of course you know what you're doing on the bug tracker, ignore my previous comment, back to REOPENED and once again apologies
Comment 35 janekptacijarabaci 2014-08-13 08:32:05 UTC
Please create a test for it.

https://bugs.freedesktop.org/show_bug.cgi?id=81542#c2
Comment 36 Eike Rathke 2014-08-13 14:48:43 UTC
I think I found what's going on, working on it.
Comment 37 Commit Notification 2014-08-14 21:52:10 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

correct references after sort, fdo#79441



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 38 Eike Rathke 2014-08-14 21:59:26 UTC
Actually both attachments produced wrong or even weird behavior, https://bugs.freedesktop.org/attachment.cgi?id=100144 and https://bugs.freedesktop.org/attachment.cgi?id=100089

I'll try to get that into unit tests.
Comment 39 Eike Rathke 2014-08-15 00:52:49 UTC
Pending review
https://gerrit.libreoffice.org/10929 for 4-3
https://gerrit.libreoffice.org/10930 for 4-2
Comment 40 Commit Notification 2014-08-15 13:11:35 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

unit test for sheet and in-range range references after sort, fdo#79441



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 41 Commit Notification 2014-08-22 17:36:44 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=2d8d35f9f74102b800a3b777a5e3d79dce283ae9&h=libreoffice-4-2

correct references after sort, fdo#79441


It will be available in LibreOffice 4.2.7.

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 42 Commit Notification 2014-08-22 17:37:02 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=b07951a867e66c8b8523505de9ad6c13e9b55fc7&h=libreoffice-4-3

correct references after sort, fdo#79441


It will be available in LibreOffice 4.3.2.

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 43 Laurent BP 2014-08-25 08:33:58 UTC
(In reply to comment #42)
> Eike Rathke committed a patch related to this issue.
Thanks Eike: it works well with Version: 4.3.2.0.0+
Build ID: 02bcf0d5abff100289d01c29eee2ed0685eb64ca
TinderBox: Win-x86@42, Branch:libreoffice-4-3, Time: 2014-08-23_08:23:00
Comment 44 Jean-Baptiste Faure 2014-09-01 10:33:37 UTC
Sorry to reopen this bug, but there is a corner case that seems not been handle by the fix: if you select a block of _entire_ rows and sort, then Calc crashes.
Steps to reproduce:
1/ open the test doc (attachment 100144 [details])
2/ select the cell A2
3/ click on the header of row 2
4/ holding the shift key, click on the header of row 11
5/ click on the button sort descending
==> crash

Reproduced (on Ubuntu 14.04 x86-64) with the master, LO 4.3.2.0.0+ and LO 4.2.7.0.0+, each having the fix for this bug. Calc crashes if there is references in the range concerned by sorting.
I did a revert of the commit on LO 4.2.7.0.0+ and I do not reproduce the crash anymore.

Best regards. JBF
Comment 45 Commit Notification 2014-09-02 16:30:41 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

check for empty slots' valid NULL pointer, fdo#79441



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 46 Eike Rathke 2014-09-02 16:37:14 UTC
Pending review
https://gerrit.libreoffice.org/11258 for 4-3
https://gerrit.libreoffice.org/11259 for 4-2
Comment 47 Jean-Baptiste Faure 2014-09-02 19:51:30 UTC
Thank you very much for the quick fix. It works as expected on version 4.3.2.0.0+.

Best regards. JBF
Comment 48 Commit Notification 2014-09-02 21:00:06 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=a7f7b93299a9a7af8b243099f78f236172c4cb51&h=libreoffice-4-2

check for empty slots' valid NULL pointer, fdo#79441


It will be available in LibreOffice 4.2.7.

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 49 Commit Notification 2014-09-02 21:00:25 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=5f0899dae3ac649e1b80de81d4e388da7f07982a&h=libreoffice-4-3

check for empty slots' valid NULL pointer, fdo#79441


It will be available in LibreOffice 4.3.2.

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 50 Commit Notification 2014-09-03 18:03:26 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

yet another unit test for fdo#79441



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 51 Jürgen Mähnß 2014-09-21 15:01:29 UTC
Tested sorting with mentioned file on a win7 system, used daily build 18-Sep-2014 16:50 LibreOfficeDev_4.3.3.0.0_Win_x86.msi
works fine for me
Comment 52 Jean-Baptiste Faure 2014-10-09 19:22:30 UTC
*** Bug 84511 has been marked as a duplicate of this bug. ***
Comment 53 Jean-Baptiste Faure 2014-10-09 20:03:10 UTC
*** Bug 83765 has been marked as a duplicate of this bug. ***
Comment 54 Jean-Baptiste Faure 2014-10-11 10:00:41 UTC
*** Bug 83213 has been marked as a duplicate of this bug. ***
Comment 55 Doriano Cometto 2014-10-21 11:00:36 UTC
I originally posted this on Bug 83765, which has been marked as duplicate of this one.
In any case I'm still able to reproduce it with 4.3.4 on Win 7

 

Simplified steps to repro from scratch:

1). Fill cells A1:C3 with following data:

1	1	2
3	1	1
=SUM(A1:A2)	=SUM(B1:B2)	=SUM(C1:C2)

2). Select cells A1:C3 > Data > Sort
3). Tab: Options > choose Direction 'Left to right (sort columns)'
4). Tab: Sort Criteria > Sort key 1 "Row 3" (default: Ascending) > OK

Sort result: 3  4  2 -> incorrect

Expected result: 2  3  4

*) Incorrect result also shown if we choose Descending on step 4).

Reproduced with: libo-43~2014-10-17_16.12.56_LibreOfficeDev_4.3.4.0.0_Win_x86.msi
Comment 56 Jean-Baptiste Faure 2014-10-21 19:54:26 UTC
There is some interference with the fix for bug 81309 and bug 81633. Indeed if tested with LO 4.4.0.0.alpha1+, the result depend on the choice made for the option "Update reference when sorting range of cells". If the option is checked sorting works as expected.

Because the commit of comment #37 is posterior to the fix for bug 81309, I guess it is reversed by the backport of the configuration option (bug 81633) to 4.3. If you change to hidden option UpdateReferenceOnSort from false to true you get back to behavior of 4.3.2

Hi Eike, is it possible to do something here?

Best regards. JBF
Comment 57 Eike Rathke 2014-10-31 00:53:10 UTC
This bug here is about references to *other* internal sheets, such as Sheet2.A1 when sorting on Sheet1. The example given in comment 55 has nothing to do with this.
Comment 58 Commit Notification 2014-11-25 02:15:16 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

fix fdo#79441 again and keep references to other sheets during 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 59 Commit Notification 2014-11-25 02:15:21 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

check that the fdo#79441 case works in both update references modes

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 60 Commit Notification 2014-11-25 02:28:03 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=36d53e879e7a2571ebae7d755b7e5aacf76c4d55&h=libreoffice-4-4

fix fdo#79441 again and keep references to other sheets during 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 61 Commit Notification 2014-11-25 02:28:07 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=86a930d69a2bb66370ac72396281285efb3edc6c&h=libreoffice-4-4

check that the fdo#79441 case works in both update references modes

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 62 Eike Rathke 2014-11-25 14:54:21 UTC
Pending review
for 4-3 at https://gerrit.libreoffice.org/13114 and https://gerrit.libreoffice.org/13115
for 4-2 at https://gerrit.libreoffice.org/13118 (to accompany the other sort fixes of that branch in case there would be a release)
Comment 64 tommy27 2014-11-25 17:38:26 UTC
@Eike
does this mean that a 4.2.8 is going to be releases?
I thought the 4.2.x branch already reached the end of life with 4.2.7
Comment 65 Eike Rathke 2014-11-26 19:00:20 UTC
I don't know yet. I hope.. 4.2.x is end of life, but 4.2.7 is in a bad condition regarding Sort behavior.
Comment 67 V Stuart Foote 2014-12-01 14:15:40 UTC
*** Bug 86742 has been marked as a duplicate of this bug. ***
Comment 68 V Stuart Foote 2014-12-01 14:20:51 UTC
*** Bug 86125 has been marked as a duplicate of this bug. ***
Comment 69 V Stuart Foote 2014-12-01 14:23:29 UTC
*** Bug 81542 has been marked as a duplicate of this bug. ***
Comment 70 Jean-Baptiste Faure 2014-12-06 19:04:12 UTC
*** Bug 87010 has been marked as a duplicate of this bug. ***
Comment 71 Jean-Baptiste Faure 2014-12-06 19:51:59 UTC
*** Bug 86916 has been marked as a duplicate of this bug. ***
Comment 72 Jean-Baptiste Faure 2014-12-06 20:08:34 UTC
*** Bug 86902 has been marked as a duplicate of this bug. ***
Comment 73 V Stuart Foote 2014-12-07 03:17:56 UTC
*** Bug 86519 has been marked as a duplicate of this bug. ***
Comment 74 raal 2014-12-08 20:16:32 UTC
*** Bug 86506 has been marked as a duplicate of this bug. ***
Comment 75 raal 2014-12-11 10:31:03 UTC
*** Bug 87231 has been marked as a duplicate of this bug. ***