Bug 122091 - FILEOPEN XLSX, Long X axis labels isn’t automatically break
Summary: FILEOPEN XLSX, Long X axis labels isn’t automatically break
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Balázs Varga
URL:
Whiteboard: target:6.3.0 target:6.2.1
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-14 10:38 UTC by NISZ LibreOffice Team
Modified: 2019-02-08 14:43 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the original document side by side in Excel and Calc. (171.10 KB, image/png)
2018-12-14 10:38 UTC, NISZ LibreOffice Team
Details
Example file from Excel with a chart. (20.56 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-12-14 10:39 UTC, NISZ LibreOffice Team
Details
Dense bars needs to use old algorithm (46.50 KB, application/vnd.ms-excel)
2019-01-13 08:09 UTC, Luke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2018-12-14 10:38:02 UTC
Description:
Long X axis labels isn’t automatically break in XLSX spreadsheet created with Microsoft Excel 2016, when the document is opened in LibreOffice Calc.

Steps to Reproduce:
1. Create a new spreadsheet in Microsoft Excel 2016.
2. Insert a chart with long X axis labels.
3. Save the file as XLSX.
4. Open the same file in LibreOffice Calc.

Actual Results:
The X axis labels is incorrect.

Expected Results:
The X axis labels should have the same style as the original file when the document is opened in Microsoft Excel 2016.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2018-12-14 10:38:30 UTC
Created attachment 147516 [details]
Screenshot of the original document side by side in Excel and Calc.
Comment 2 NISZ LibreOffice Team 2018-12-14 10:39:00 UTC
Created attachment 147517 [details]
Example file from Excel with a chart.
Comment 3 Durgapriyanka 2018-12-14 17:38:24 UTC
Thank you for reporting the bug. I can confirm that the bug is present in

Microsoft Excel 2007

Version: 6.3.0.0.alpha0+
Build ID: 3c964980da07892a02d5ac721d80558c459532d0
CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-12-12_02:07:45
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 4 Xisco Faulí 2018-12-18 13:25:47 UTC
Also reproduced in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.15; Render: default; 

and

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 5 Commit Notification 2019-01-07 12:55:36 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/015569fc919b702f7a1b0f09038bafa9f104ca70%5E%21

tdf#122091 OOXML Import: Automatically break of X Axis labels

It will be available in 6.3.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 Luke 2019-01-13 08:09:03 UTC
Created attachment 148283 [details]
Dense bars needs to use old algorithm

Balazs,
Thanks for working on this. It works well for charts with few bars, but if you have many bars, text gets smushed and is unreadable. 

If there is no easy way to measure density, how about the heuristic seemed to be about 15 or more bars to revert to the old behavior of a 45 deg rotation(no break / no overlap)?
Comment 7 Gabor Kelemen (allotropia) 2019-01-13 13:05:05 UTC
(In reply to Luke from comment #6)
> Created attachment 148283 [details]
> Dense bars needs to use old algorithm
> 
> Balazs,
> Thanks for working on this. It works well for charts with few bars, but if
> you have many bars, text gets smushed and is unreadable. 
> 
> If there is no easy way to measure density, how about the heuristic seemed
> to be about 15 or more bars to revert to the old behavior of a 45 deg
> rotation(no break / no overlap)?

Hi Luke

I can confirm there is more work needed in this case.
I gave a try to the patch in https://gerrit.libreoffice.org/#/c/65937/ but that does not solve this situation either.

Do we already have a bug with that file? I'll file a new one if not.
Comment 8 Luke 2019-01-14 00:51:45 UTC
Gabor, 
No bug filed. 

Markus, 
Any thoughts on this?
Comment 9 Balázs Varga 2019-01-18 09:17:20 UTC
(In reply to Luke from comment #6)
> Created attachment 148283 [details]
> Dense bars needs to use old algorithm
> 
> Balazs,
> Thanks for working on this. It works well for charts with few bars, but if
> you have many bars, text gets smushed and is unreadable. 
> 
> If there is no easy way to measure density, how about the heuristic seemed
> to be about 15 or more bars to revert to the old behavior of a 45 deg
> rotation(no break / no overlap)?

Dear Luke,
I think this is what you mentioned: https://bugs.documentfoundation.org/show_bug.cgi?id=122800
But, in this case it is not just an OOXML bug, because the LibreOffice allow the break of words into letters in case of axis labels. I also think your idea to revert to the old behavior of a 45 degree rotation if there is no enough place for the label could be a possible solition. I will commit a patch soon.
Comment 10 Commit Notification 2019-02-08 14:43:13 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/997a1ae35041dc8eba5ba7c4e7e3552632ea08d4%5E%21

tdf#122091 OOXML Import: Automatically break of X Axis labels

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