Bug 123774 - FILESAVE Percentage format in ODS pie chart not saved in XLSX format
Summary: FILESAVE Percentage format in ODS pie chart not saved in XLSX format
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Balázs Varga
URL:
Whiteboard: target:6.5.0 target:6.4.0.1
Keywords: filter:xlsx
Depends on:
Blocks: OOXML-Chart Pie-and-Donut
  Show dependency treegraph
 
Reported: 2019-02-28 21:49 UTC by Aron Budea
Modified: 2024-10-15 21:05 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample ODS (14.76 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-02-28 21:49 UTC, Aron Budea
Details
Sample XLSX (saved in Calc from ODS) (7.46 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-02-28 21:50 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2019-02-28 21:49:24 UTC
Created attachment 149666 [details]
Sample ODS

This is similar / follow-up to bug 122031.
Attaching an ODS created in Calc that is similar to attachment 147454 [details] (which was created in Excel), the percentage format in chart is set to 3 decimals.

- Save as XLSX, and reload.

=> Percentages have no decimals. Same when the resulting file is opened in Excel.

The chart is also flipped horizontally, but let that have its own bug report.

Observed using LO 6.3.0.0.alpha0+ (140fd0a1b1da1b0b14bda17c926dd8f95750ba92) & 4.4.0.3 / Windows 7.
In 4.0.0.3 & 3.3.0 even data labels aren't exported.
Comment 1 Aron Budea 2019-02-28 21:50:14 UTC
Created attachment 149667 [details]
Sample XLSX (saved in Calc from ODS)
Comment 2 m_a_riosv 2019-02-28 21:58:38 UTC
Repro with
Version: 6.2.1.1 (x64)
Build ID: 757c58e8cb70b2982843211a54750fb3cd79acd5
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: es-ES (es_ES); UI-Language: en-US
Calc: threaded
Comment 3 Aron Budea 2019-02-28 22:51:17 UTC
(In reply to Aron Budea from comment #0)
> The chart is also flipped horizontally, but let that have its own bug report.
Actually, this has been reported as bug 108059.
Comment 4 Gabor Kelemen (allotropia) 2019-06-20 21:23:24 UTC
@Balazs, this may interest you :)
Comment 5 Aron Budea 2019-06-21 00:51:50 UTC
The problem here is that the data series has NumberFormat property, so the following lines will always pick that up:
https://opengrok.libreoffice.org/xref/core/oox/source/export/chartexport.cxx?r=1b26a6e7#3008
https://opengrok.libreoffice.org/xref/core/oox/source/export/chartexport.cxx?r=1b26a6e7#3086

Perhaps it would be better to check the state of the actual 'Show value as percentge' checkbox, and take the respective number format based on that... just an idea.
Comment 6 Commit Notification 2019-11-21 16:32:35 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

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

tdf#123774 OOXML chart export: keep digits of percentages of data points 

It will be available in 6.5.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 7 Commit Notification 2019-11-22 07:04:36 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

tdf#123774 OOXML chart export: keep digits of percentages of data points 

It will be available in 6.4.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.