Bug 78694

Summary: After partial sorting data become incorrect
Product: LibreOffice Reporter: Timon <kaktebyavirubit>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jbfaure, miguelangelrv
Priority: medium    
Version: 4.2.4.2 release   
Hardware: x86 (IA32)   
OS: Windows (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: file were partial sorting causes problems

Description Timon 2014-05-14 11:11:08 UTC
Created attachment 99028 [details]
file were partial sorting causes problems

LibreOffice Version: 4.2.4.2 Build ID: 63150712c6d317d27ce2db16eb94c2f3d7b699f8 on Russian Windows XP Professional SP3 (32bit)

If we try to open Example_34.ods file in LibreOffice, select cells A4:E38 and make Sort Ascending and after that immediately Undo: Sort (or Ctrl+Z) that we'll see that some cells (from cell F25 to F39) have a value other than the original (cell F25 had value 1677,13 after such operations became 1669,87; cell F27 had value 527,64 after such operations became 525,86 and so on). If we select full rows (A4:AMJ38), than after Undo all is fine.

In LibreOffice Version 4.1.4.2 there was no such problem with partial sorting.
Comment 1 m_a_riosv 2014-05-16 20:32:53 UTC
Hi Timon, thanks for reporting.

All you need to do is a hard recalc [Shift+Ctrl+F9].

Maybe cells are not marked after undo, and is needed a hard recalc.

But I can agree it's a bug.
Comment 2 ign_christian 2014-07-31 13:54:15 UTC
Not reproduced in LO 4.2.6.2 under Ubuntu 12.04 x86. 
Perhaps it's been fixed somewhere between 4.2.5-4.2.6
Comment 3 Timon 2014-08-01 04:19:28 UTC
In LibreOffice Version: 4.3.0.4 Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0 problem was also fixed.
Comment 4 Timon 2014-09-01 08:58:52 UTC
In LibreOffice Version: 4.3.1.2 Build ID: 958349dc3b25111dbca392fbc281a05559ef6848 problem is back again!
Cells are different (cell F5 had value 60,11 after such operations became 153,33; cell F8 had value 42,30 after such operations became 12,23; cell F13 had value 131,78 after such operations became 33,16 and and as a result the total amount in F39 is also incorrect).
Hard recalc [Shift+Ctrl+F9] helps to solve problem, but that bug should be fixed.
Comment 5 Jean-Baptiste Faure 2014-10-12 06:25:25 UTC
The last fix for bug 80846 solved the problem here. See https://bugs.freedesktop.org/show_bug.cgi?id=80846#c58

I mark this bug report as a duplicate of bug 80846. Backport of the fix to 4.3 is on the way.

Best regards. JBF

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