Bug 134247 - FILEOPEN DOCX Stacked charts with resized legend show legend entries reversed
Summary: FILEOPEN DOCX Stacked charts with resized legend show legend entries reversed
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All All
: medium normal
Assignee: Tünde Tóth
URL:
Whiteboard: target:7.1.0 target:7.0.0.1
Keywords:
Depends on:
Blocks: OOXML-Chart
  Show dependency treegraph
 
Reported: 2020-06-23 07:14 UTC by NISZ LibreOffice Team
Modified: 2020-07-02 14:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word (62.37 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-06-23 07:14 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer - column and line charts (78.00 KB, image/png)
2020-06-23 07:18 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer - bar and area (70.73 KB, image/png)
2020-06-23 07:20 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-06-23 07:14:16 UTC
Created attachment 162332 [details]
Example file from Word

Attached document contains a few stacked charts with a custom sized and positioned legend. 
The legend was originally positioned below the chart, then resized to look like it is positioned right.
When opened in Writer the order of legend entries is reversed in case of column, line and area charts, but not for bar chart.

Steps to reproduce:
    1. In Word insert a stacked chart of column, line or area type.
    2. Enable legend and position it below, the chart.
    3. Resize the legend by dragging its top left corner over its right side to make it look like its positioned to the right, and its items are below each other.

Actual results:
Legend entries are in reversed order.

Expected results:
Same order as in Word.

LibreOffice details:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 642fc41cd7d080384658e10b30bb9d3b38a2cbd9
CPU szálak: 4; OS: Windows 6.3 Build 9600; Felületmegjelenítés: alapértelmezett; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL

Also in:
Verzió: 6.0.0.3
Build az.: 64a0f66915f38c6217de274f0aa8e15618924765
CPU szálak: 4; OS: Windows 6.3; Felületmegjelenítés: alapértelmezett; 
Területi beállítások: hu-HU (hu_HU); Calc: CL
(but here even the stacked bar chart was bad!)
Comment 1 NISZ LibreOffice Team 2020-06-23 07:18:51 UTC
Created attachment 162333 [details]
Screenshot of the original document side by side in Word and Writer - column and line charts
Comment 2 NISZ LibreOffice Team 2020-06-23 07:20:05 UTC
Created attachment 162334 [details]
Screenshot of the original document side by side in Word and Writer - bar and area
Comment 3 NISZ LibreOffice Team 2020-06-23 07:28:10 UTC
The bar chart case was fixed in:

https://git.libreoffice.org/core/+/ee2434656f24ccb31246b1347d46b72710faf076

author	Balazs Varga <balazs.varga991@gmail.com>	Wed Dec 05 16:00:09 2018 +0100
committer	Bartosz Kosiorek <gang65@poczta.onet.pl>	Tue Dec 11 09:43:38 2018 +0100

tdf#114163 Chart: fix order of legend names

HTH :)
Comment 4 Bartosz 2020-06-23 11:25:05 UTC
The xlsx file <c:legendPos val="b"/> attribute, which seems not properly handled by LibreOffice:

        <c:legend>
            <c:legendPos val="b"/>
            <c:layout>

After deleting <c:legendPos val="b"/> the legend is displaying is displaying in reverse order also for MS Word.
Comment 5 Commit Notification 2020-06-29 10:05:51 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b3057b7944dc52cc2ee3c57f44d4265c625e8dad

tdf#134247 Chart OOXML import: fix order of legend entries

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.
Comment 6 Commit Notification 2020-07-02 14:13:05 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/305250469e0b22307454ebbf294457f4f2097ba9

tdf#134247 Chart OOXML import: fix order of legend entries

It will be available in 7.0.0.1.

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.