Bug 138045 - FORMATTING: Selecting a theme in Calc changes the language of number fields to US-English
Summary: FORMATTING: Selecting a theme in Calc changes the language of number fields t...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Document-Themes
  Show dependency treegraph
Reported: 2020-11-06 19:15 UTC by Marco Wehofsky
Modified: 2020-11-12 10:54 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Marco Wehofsky 2020-11-06 19:15:45 UTC
If you select a Theme in Calc with Format|Spreadsheet Theme the default language settings and thus the formatting of numbers is always set to English (USA).
If the default language is different this can change the display of numbers in an unexpected way (e.g. if the language is set to German (Germany)).

This occurs also if the default settings are English (GB).

The language is not changed by selecting a template, when the language format of the number was changed previously.

I can remember that this error occurred in an older version.

Steps to Reproduce:
1.Switch LibreOffice Language settings to "Deutsch (Deutschland)" (or any other except "English (US)"): Language of User Interface and Locale Settings.
2. Restart LibreOffice
3. Create a Calc-Dokument (Tabellendokument)
4. Enter a valid number in any cell. For German use e.g. 2,34
5. The number is correctly displayed with comma.
6. Check the Format of the cell with the context menu "Zellen formatieren" on the tab "Zahlen". The Format is the default language ("Deutsch (Deutschland)").
7. Change the theme by opening Format | Themen-Auswahl
8. The displayed number changed from 2,34 to 2.34. 
9. If you check the Format of the cell it is changed to "English (US)". The format is also changed for any empty cell.
10. Change the format of the cell back to "Deutsch (Deutschland)". The number is now displayed as 2,34
11. Change the theme again. The displayed number with the modified format is not changed.

Actual Results:
The language of the cell format is set to "English (US)" if the language was not explicitly changed before.

Expected Results:
Themes should not be bound to a certain language.
If a cell is formatted with the default format this should be retained by selecting a theme.

Reproducible: Always

User Profile Reset: No

Additional Info:
Build-ID: 1:6.4.6-0ubuntu0.20.04.1
CPU-Threads: 4; BS: Linux 5.4; UI-Render: Standard; VCL: gtk3; 
Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE
Calc: threaded
Comment 1 Ming Hua 2020-11-06 22:10:57 UTC
Reproduced with 7.1.0 alpha1 on Windows 10:
Version: (x64)
Build ID: 987671387712c4f9061d6216ff2f001a7bb9e57b
CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: threaded

The language of cell format is changed from zh-CN to en-US after using Format > Spreadsheet Theme.  This also affects cells formatted as Date, so presumablly all formats (not sure what Marco meant by "number fields" in the summary).