Bug 126133 - Calc does not import xlsx from Excel 2.4 correctly - Chart axis title rotated (OK if resaved in MSO)
Summary: Calc does not import xlsx from Excel 2.4 correctly - Chart axis title rotated...
Status: VERIFIED 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
Keywords: bibisected, bisected, filter:xlsx, regression
Depends on:
Blocks: OOXML-Chart
  Show dependency treegraph
 
Reported: 2019-06-27 13:22 UTC by Johann Spies
Modified: 2020-11-06 16:18 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
The xlsx-file wrongly imported. (8.23 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-06-27 13:24 UTC, Johann Spies
Details
The xlsx-file compared MSO 2016 LO 6.4+.png (137.28 KB, image/png)
2019-07-05 14:00 UTC, Timur
Details
The example file saved by Excel 365 (15.61 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-02-10 08:34 UTC, Gabor Kelemen (allotropia)
Details
The original file and its Excel-saved version side by side in LO 7.0alpha (122.72 KB, image/png)
2020-02-10 09:12 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johann Spies 2019-06-27 13:22:06 UTC
Description:
A xlsx-file created through pyopenxl shows up correctly in Excel, but the charts does not show up correctly in LibreOffice.
The x-titles are rotated at 90 degrees and the tips for both the x and y axes are missing.

Steps to Reproduce:
1.Run the python code at https://openpyxl.readthedocs.io/en/stable/charts/bar.html#vertical-horizontal-and-stacked-bar-charts
2. Open the resulting bar.xlsx in Calc and compare with the output on the webpage. I have asked somebody with Excel to open the resulting file and it shows up correctly in Excel - like the illustration on the webpage.
3.

Actual Results:
The titles are all rotated 90 degrees.

The ticks on both the x and y axes are missing.

Expected Results:
LoCalc being able to handle xlsx-charts.

Charts resemble those in Excel or on webpage referred to  above.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
 optirun glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 940M/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 418.74
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 418.74
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:


Version: 6.3.0.0.beta2
Build ID: 6c6edded7133daf2d8d0b2ea7ae25b8109c5c064
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-ZA (en_ZA.utf8); UI-Language: en-US
Calc: CL

See Log: 6c6edded7133daf2d8d0b2ea7ae25b8109c5c064
Comment 1 Johann Spies 2019-06-27 13:24:48 UTC
Created attachment 152445 [details]
The xlsx-file wrongly imported.
Comment 2 raal 2019-07-04 05:08:05 UTC
I can confirm with Version: 6.4.0.0.alpha0+
Build ID: 9fbedb7929936a45967ae49bc15b985f95e2ebd3
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
but not in Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 3 Timur 2019-07-05 14:00:30 UTC
Created attachment 152593 [details]
The xlsx-file compared MSO 2016 LO 6.4+.png

"File not imported correctly" is always a wrong title. 
Bugzilla is not "document based", like "this document doesn't display nice". 
Bugzilla is "issue based", so a single issue must be pointed at, after a search for not being a duplicate. 
We need to precise what is a single issue here. 

FWIS and what needs to be checked in the existing bugs:
- chart title is missing (from before)
- axis title rotated (change in 5.0 but for both)
- values are missing (regression from 5.0)
Comment 4 Xisco Faulí 2019-07-12 16:32:11 UTC
Regression introduced by:

author	Markus Mohrhard <markus.mohrhard@googlemail.com>	2015-05-06 06:08:47 +0200
committer	Markus Mohrhard <markus.mohrhard@googlemail.com>	2015-05-08 14:56:41 +0200
commit 07e3155a666e85b8213608423ae84dbd2b30c3dc (patch)
tree 560bf3f1389f16721f71de406827c5ff975cb32d
parent 8a051cb9543b49cc70f5e6728df3387b128d3daf (diff)
inherit default title rotation from parent, tdf#75316

Bisected with: bibisect-50max

Adding Cc: to Markus Mohrhard
Comment 5 Xisco Faulí 2019-07-12 16:33:17 UTC Comment hidden (obsolete)
Comment 6 Timur 2019-09-16 13:05:36 UTC Comment hidden (obsolete)
Comment 7 Xisco Faulí 2019-09-26 11:11:21 UTC
(In reply to Timur from comment #6)
> Xisco, which of these is now this bug, per your bibisect, 2. or 3.?
> 
> 1. chart title is missing (from 4.4). I converted bug 119138 to this issue.
> 2. axis title rotated (change in 5.0 but for both)
> 3. values are missing (regression from 5.0)

Hi Timur,
the bisection is about the number 2, the axis titles being rotated...
@Balasz, I thought you might be interested in this issue...
Comment 8 Gabor Kelemen (allotropia) 2020-02-10 08:33:32 UTC
This happens because for the    <catAx> tag there is value: 
    <axPos val="l"/>
set. Which is wrong (left), it should be:
     <c:axPos val="b"/> (below)

Excel imports this value and corrects it after saving to a different file.
Comment 9 Gabor Kelemen (allotropia) 2020-02-10 08:34:07 UTC
Created attachment 157764 [details]
The example file saved by Excel 365
Comment 10 Gabor Kelemen (allotropia) 2020-02-10 09:12:37 UTC
Created attachment 157766 [details]
The original file and its Excel-saved version side by side in LO 7.0alpha

After saving the file with Excel, the output is shown correctly in Calc.
Comment 11 Commit Notification 2020-10-30 18:09:13 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#126133 Chart OOXML import: set default text rotation to 0°

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 12 Xisco Faulí 2020-11-06 16:18:57 UTC
Verified in

Version: 7.1.0.0.alpha1+
Build ID: 9c8ed8c8526b9b696d0bf592eb7d963950f3cef4
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Tünde Tóth, thanks for fixing this issue!

I tried to backport it but the unittest depends on another unittest. I guess we can live without the backport for a few months. In the end, this is a regression from 5.0