Apache OpenOffice (AOO) Bugzilla – Issue 121681
Wrong sorting of values in Calc
Last modified: 2022-10-28 12:54:31 UTC
Created attachment 80178 [details] File showing the sort error A SUSE linux user reported a problem in OOo 3.2: "In the attachment you can see a XY-diagram sorted by x-values which shows a wrong stair. The whole diagram should look like stairs but oo.org uses the y-value of the two x-value = 6 points wrong. The two points with the x-value = 6 have the y-values 0.6333 and 0.7666. If you click on these two points you can see that the point with y=0.7666 is UNDER the point with y=0.6333" I am attaching the document for reference. The fix is very easy and non-copyrightable: In file chart2/source/view/main/VDataSeries.cxx Change the occurance of std::sort (line 312) for std_stable::sort.
(In reply to comment #0) ... > > The fix is very easy and non-copyrightable: > > In file chart2/source/view/main/VDataSeries.cxx > > Change the occurance of std::sort (line 312) for std_stable::sort. I meant std::stable_sort .
.
(In reply to comment #1) > (In reply to comment #0) > > ... > > > > The fix is very easy and non-copyrightable: > > > > In file chart2/source/view/main/VDataSeries.cxx > > > > Change the occurance of std::sort (line 312) for std_stable::sort. > > I meant std::stable_sort . I forgot to mention the fix is based on the comments by Kohei Yoshida.
"pfg" committed SVN revision 1441196 into trunk: i121681 - Wrong sorting of values in Calc
Seems to work.
For reference hrishit submitted the same fix here: https://issues.apache.org/ooo/attachment.cgi?id=80197&action=diff#main/chart2/source/view/main/VDataSeries.cxx_sec1