Description: If creating a doughnut chart in LibreOffice, after save and reload, the order of its circles become reversed. Steps to Reproduce: 1. click on insert toolbar, select chart 2. right click on the chart, select chart type 3. select pie, select donut 4. click on the outer circle, right click, select insert data labels 5. save and reload Actual Results: Outer circle(s) become inner circle(s). Expected Results: Do not change the order of circles. Reproducible: Always User Profile Reset: No Additional Info:
Created attachment 148969 [details] Screenshot of the problem in Writer with the expected result (above) and the wrong result after filesave and reload (below).
Created attachment 148970 [details] Example file from Word with the wrong circle order.
Created attachment 148971 [details] The original odt file from Writer with the right circle order. (The docx file should look like this).
Created attachment 148979 [details] mso example docx file with lo doughnut chart default values datatable
Created attachment 148980 [details] comparing mso and lo behavior with lo doughnut chart default datatable values
Created attachment 149061 [details] Naive Excel correctly Roundtrips This is tricky because LO's default order is outer to inner, while MSO's order is inner to outer order. We already correctly round trip MSO docs preserving the order. We only want to swap the order when converting ODF to OOXML The order is preserved even if you take an MSO doughnut, imported it to ODF, and then exported it to back to OOXML. The only case that is broken is when you start as ODF. Is there some compatibility flag that needs to be set or checked? Both XLS and XLSX are affected.
Created attachment 149062 [details] Native Calc shows XLS and XLSX affected
Some results: If you reverse this loop... (like this: for( sal_Int32 nSeriesIdx= rSeriesSeq.getLength()-1; nSeriesIdx<=0; --nSeriesIdx )) ...then the order of circles will be reversed after every filesave (and reload). https://opengrok.libreoffice.org/xref/core/oox/source/export/chartexport.cxx?r=82b91027#1941 There is a member function about the view in piechart.cxx: https://opengrok.libreoffice.org/xref/core/chart2/source/view/charttypes/PieChart.cxx?r=033ebc5a#390 which is working this way: https://opengrok.libreoffice.org/xref/core/chart2/source/view/inc/VSeriesPlotter.hxx?r=40144617#134 ...it can be a related stuff.
If this bug is fixed, it probably fix this also: https://bugs.documentfoundation.org/show_bug.cgi?id=108067
Tünde Tóth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/22cd7d8b679d238559820d3c4cd5ff0b9153ffce tdf#123218 tdf#108067 config key ReverseXAxisOrientationDoughnutChart It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
No backport needed since the commit adds a config key.
Verified in: Version: 7.1.0.0.alpha0+ (x64) Build ID: 34a09c9c61bff30e8c4d16132bb47b2b1b16e422 CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: hu-HU Calc: threaded