Bug 114173 - FILESAVE XLSX Custom size of chart legend is not preserved when the file is saved as XLSX
Summary: FILESAVE XLSX Custom size of chart legend is not preserved when the file is s...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Bartosz
URL:
Whiteboard: target:6.1.0 target:6.0.0.2 target:5.4.5
Keywords: filter:xlsx
: 108079 (view as bug list)
Depends on:
Blocks: OOXML-Chart Chart-Legends
  Show dependency treegraph
 
Reported: 2017-11-30 13:08 UTC by Gabor Kelemen (allotropia)
Modified: 2018-05-20 13:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file made with Excel 2013 (13.30 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-11-30 13:08 UTC, Gabor Kelemen (allotropia)
Details
The example file saved by LO6 alpha (17.17 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-11-30 13:09 UTC, Gabor Kelemen (allotropia)
Details
The two files in Calc and Excel side by side (127.48 KB, image/png)
2017-11-30 13:09 UTC, Gabor Kelemen (allotropia)
Details
Example .xlsx file created by MS Office 2003 (11.13 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-01-03 18:47 UTC, Bartosz
Details
Example .xlsx file after resave with LibreOffice 6.0 and manual fix (8.25 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-01-03 19:04 UTC, Bartosz
Details
Example .xlsx file created by Office 2013, with additional charts for testing purposes (18.64 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-01-04 06:22 UTC, Bartosz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2017-11-30 13:08:32 UTC
Created attachment 138128 [details]
Example file made with Excel 2013

The custom size of the chart legend is not preserved when the spreadsheet is saved as XLSX.

Steps to reproduce:
1. Create a new spreadsheet in LibreOffice Calc.
2. Create a simple chart (a column chart with default settings will do) based on any values.
3. Change the size of the chart legend.
4. Save the file as XLSX.
5. Reload the file.

Actual results:
The size of the chart legend will revert to default.

Expected results:
The custom size of the chart legend should be preserved.
Comment 1 Gabor Kelemen (allotropia) 2017-11-30 13:09:19 UTC
Created attachment 138129 [details]
The example file saved by LO6 alpha
Comment 2 Gabor Kelemen (allotropia) 2017-11-30 13:09:40 UTC
Created attachment 138130 [details]
The two files in Calc and Excel side by side
Comment 3 Buovjaga 2017-12-03 14:41:43 UTC
Repro.

Version: 6.1.0.0.alpha0+ (x64)
Build ID: cc1db6f2b0ebe05ae807628778835b62df00eca2
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-12-03_00:59:10
Locale: fi-FI (fi_FI); Calc: group threaded

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 4 Bartosz 2018-01-03 18:47:27 UTC
Created attachment 138860 [details]
Example .xlsx file created by MS Office 2003
Comment 5 Bartosz 2018-01-03 19:04:02 UTC
Created attachment 138861 [details]
Example .xlsx file after resave with LibreOffice 6.0 and manual fix

The root cause of problem is missing in <c:legend> following fields:

                    <c:w val="0.41459448854442293"/>
                    <c:h val="0.23161616722845749"/>

in path:
  /xl/charts/chart1.xml

After adding it manually the width and height of legend is displayed correctly.
Comment 6 Bartosz 2018-01-04 06:22:36 UTC
Created attachment 138869 [details]
Example .xlsx file created by Office 2013, with additional charts for testing purposes
Comment 7 Bartosz 2018-01-06 04:34:59 UTC
Additionally following field needs to be added to legend, 
to properly display legend in MS Office:

            <c:txPr>
                <a:bodyPr/>
                <a:lstStyle/>
                <a:p>
                    <a:pPr>
                        <a:defRPr sz="900"/>
                    </a:pPr>
                </a:p>
            </c:txPr>
Comment 8 Commit Notification 2018-01-09 12:37:25 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

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

tdf#114173 Preserve size of chart legend during xlsx export

It will be available in 6.1.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 9 Commit Notification 2018-01-09 16:09:59 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=836d2b4d47ff4cedf81ecf6b02a5b2b4963329bd&h=libreoffice-6-0

tdf#114173 Preserve size of chart legend during xlsx export

It will be available in 6.0.0.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 10 Commit Notification 2018-01-27 20:08:20 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=46f1fbcea97f777d12efed580a8f04da154106a3&h=libreoffice-5-4

tdf#114173 Preserve size of chart legend during xlsx export

It will be available in 5.4.5.

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 11 Bartosz 2018-02-06 23:02:14 UTC
*** Bug 108079 has been marked as a duplicate of this bug. ***