Bug 159109 - FILEOPEN PPTX: sourceLinked ignored for axis - should be 0.00% from data series formatcode
Summary: FILEOPEN PPTX: sourceLinked ignored for axis - should be 0.00% from data seri...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pptx, implementationError
Depends on: 142108
Blocks: OOXML-Chart
  Show dependency treegraph
 
Reported: 2024-01-10 16:07 UTC by Justin L
Modified: 2024-02-20 06:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
chart2/qa/extras/data/pptx/percentage-number-formats.pptx (57.49 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2024-01-10 16:07 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2024-01-10 16:07:33 UTC
Created attachment 191850 [details]
chart2/qa/extras/data/pptx/percentage-number-formats.pptx

In chart2/qa/extras/chart2import.cxx, Matúš Kukan wrote
    // FIXME: This should be in fact "0.00%".

He did a lot of work in the LO 4.4 timeframe related to formatting of the axis. I suspect that much of this is ultimately incorrect, although it served its purpose at the time.

With bug 137691, the import and export of the data series should be correct. This is what sourceLinked is referring to. I assume it means that if the data series have a formatCode, then use that instead of the axis' numFmt formatCode. (TODO - what if the first series has no formatCode, but the second one does?)

Of course, this can only work if we can trust that the data series have properly imported the formatcode - depends on bug 142108.


Specifically, oox/source/drawingml/chart/objectformatter.cxx should be obsolete:        // Setting "LinkNumberFormatToSource" does not really work, at least not for axis :-/

and there probably are many more hacks in the code as well.
perhaps 4744400afc9c2be99f62b12180fa33b43acef564
and other portions of 7c3dd4a9c1a05bbb6867ca6db6229da38f5f68ed are suspicious?

Steps to reproduce the problem.
1.) open percentage-number-formats.pptx and see that the Y axis is 0.0%, not 0.00%.

Prior to 4.4 commit c8cc89ff802d86b1f3a69afe1b4835b7df7f70c7, this was (correctly) using the data-series (incorrect, General) format and displayed as 0.00 (no percentage). So it wasn't every actually correct - not a regression.


I started work on this, but ran out of time.
https://gerrit.libreoffice.org/c/core/+/161825
Comment 1 Buovjaga 2024-01-19 17:23:52 UTC
Confirmed

Arch Linux 64-bit, X11
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 18e579761cb622e8ff7e67f319ef80c61b3bd588
CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 19 January 2024