Bug 134659

Summary: Default alignment of chart axis labels is not centered
Product: LibreOffice Reporter: NISZ LibreOffice Team <libreoffice>
Component: ChartAssignee: Balázs Varga <varga.balazs3>
Status: RESOLVED FIXED    
Severity: normal CC: nemeth, varga.balazs3
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=122014
Whiteboard: target:7.1.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 90486    
Attachments: Example file from Excel
Screenshot of the original document side by side in Excel and Calc
test_document

Description NISZ LibreOffice Team 2020-07-08 14:54:41 UTC
Created attachment 162810 [details]
Example file from Excel

Attached XLSX file contains a column, line and bar chart with one very long labeled data point, such that it breaks to multiple lines.
In Excel such long labels are aligned by default as centered, but in Calc they are aligned left. Center alignment looks subjectively better.

Steps to reproduce:
    1. Open attached file

Actual results:
Long axis labels are aligned left, which is uglier than centered alignment.

Expected results:
Long axis labels should be aligned centered.

LibreOffice details:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 9af38b4504ccda57a0c32eb8bdd03e5a8ca29ddc
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2020-07-08 14:55:00 UTC
Created attachment 162811 [details]
Screenshot of the original document side by side in Excel and Calc
Comment 2 Durgapriyanka 2020-07-08 19:56:53 UTC
Thank you for reporting the bug. I can confirm the bug present in

Version: 6.4.0.0.alpha1+ (x86)
Build ID: ec7374ff84c71edfbb30d6e4dc5b486b6df7107f
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-11-10_21:37:30
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
	

and in

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 3 Commit Notification 2020-07-15 16:02:42 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9eb614f8d2d9cc983c51bcdde211ee0c59c3a96c

tdf#134659 chart2: use centered label alignment at text break

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 4 Tünde Tóth 2020-07-16 13:26:29 UTC
*** Bug 134639 has been marked as a duplicate of this bug. ***
Comment 5 Tünde Tóth 2020-07-22 09:20:54 UTC
Created attachment 163398 [details]
test_document

Test document to commit b877b9bc894892e61f0d6311729f7b01139923d6 (chart2: clean-up redundant ShapeFactory::createText())