Bug 134826 - FILEOPEN XLSX Support Hungarian font style names in spreadsheet headers
Summary: FILEOPEN XLSX Support Hungarian font style names in spreadsheet headers
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Tibor Nagy
URL:
Whiteboard: target:7.1.0
Keywords: filter:xlsx
Depends on:
Blocks: XLSX-Header-Footer
  Show dependency treegraph
 
Reported: 2020-07-15 10:22 UTC by NISZ LibreOffice Team
Modified: 2020-07-27 13:17 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Excel with different styles applied to header text (9.88 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-07-15 10:22 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Excel and Calc (98.91 KB, image/png)
2020-07-15 10:23 UTC, NISZ LibreOffice Team
Details
The exported file in Excel and Calc (107.88 KB, image/png)
2020-07-15 10:25 UTC, NISZ LibreOffice Team
Details
The example file modified and saved using German locale Calc. (5.03 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-07-15 10:25 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-07-15 10:22:50 UTC
Created attachment 163049 [details]
Example file from Excel with different styles applied to header text

This is split off from bug #134316
In Excel if there is a header with custom font style set for the text, being one of Normal, Bold, Italic Bold Italic, this localized style name is not only displayed in the Excel GUI, but actually gets written into the XLSX file.

ISO/IEC 29500-1:2016(E) section 18.3.1.46 headerFooter (Header Footer Settings) explicitly allows this for the &"font name,font type" formatting code.

Calc does not support reading this for many languages, English and German being the exceptions so far.
Here we ask for addition of Hungarian too (and to open the gate for other languages).

On the other hand exporting such localized font style names from a newly created spreadsheet to XLSX works fine and Excel recognizes them correctly (provided both Calc and Excel have same locale) – but Calc after a reload, does not, except for files saved with German locale.

Steps to reproduce:
    1. Open attached file
    2. Go to Insert – Headers and Footers

Actual results:
The left and right side sections show all text in normal style.

Expected results:
The left and right side sections should display text in bold, italic, bold+italic styles.

LibreOffice details:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: f7eff4319be741143f6d8d5e0f2995e3ce46b126
CPU szálak: 4; OS: Windows 6.3 Build 9600; Felületmegjelenítés: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL
Comment 1 NISZ LibreOffice Team 2020-07-15 10:23:31 UTC
Created attachment 163050 [details]
Screenshot of the original document side by side in Excel and Calc
Comment 2 NISZ LibreOffice Team 2020-07-15 10:25:00 UTC
Created attachment 163051 [details]
The exported file in Excel and Calc

Here the style settings for the Calibri (Left) and Impact (Center) font were saved in German and work in German Calc, the settings for TNR (Right) font were saved in Hungarian (these translated style settings seem to come from the font itself) and this works in Hungarian Excel.
Comment 3 NISZ LibreOffice Team 2020-07-15 10:25:20 UTC
Created attachment 163052 [details]
The example file modified and saved using German locale Calc.
Comment 4 Commit Notification 2020-07-27 11:40:06 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/055735fa8589670f67e016bc3b7835d4cf81641f

tdf#134826 XLSX import: extend localized bold/italic footer/header

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 5 László Németh 2020-07-27 11:47:10 UTC
Note: to test the unit test document of the previous fix, fill an empty cell before choosing File->Print Preview.