Bug 49540 - Writer tables loosing numbers when switching the language in the number format
Summary: Writer tables loosing numbers when switching the language in the number format
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.3 release
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Number-Format
  Show dependency treegraph
 
Reported: 2012-05-06 01:42 UTC by Johannes Weberhofer
Modified: 2021-05-03 09:49 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Explain the bug (8.76 KB, application/vnd.oasis.opendocument.text)
2013-05-29 20:24 UTC, Johannes Weberhofer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Weberhofer 2012-05-06 01:42:17 UTC
This bug could be related to #42518. It is reproduceable since several versions of libre office, don't know if it ever worked.

Example:

1) Create a text document with language German

2) Insert a table with three lines

3) Enter the numbers 1,2 in Line one, 1,3 in line two

4) Enter formula =<A1:A2> in line three; Result: 2,5

5) Select all cells, go to "Format number..." (Zahlenformat...)

6) Set "English Great Britain" as language.

Result:
0
0
2.5

After pressing <F9>, line three changes to 0, too. On linux version I have also seen, that another number is displayed.
Comment 1 Joel Madero 2012-09-07 21:31:17 UTC
Can you attach a document with this so we can check it out? I just tried with the formula you gave and I get a faulty expression error. Marking as NEEDINFO. Once you attach the document please move back to UNCONFIRMED and I'll take a look at it right away. Thanks for helping us out
Comment 2 QA Administrators 2013-05-29 14:00:19 UTC Comment hidden (obsolete)
Comment 3 Johannes Weberhofer 2013-05-29 20:24:37 UTC
Created attachment 79985 [details]
Explain the bug

Sorry, I've forgotten to post the example.
Comment 4 Johannes Weberhofer 2013-05-29 20:26:41 UTC
The bug is also reproducable with the current stable version 4.0.3.3
Comment 5 ign_christian 2013-06-01 03:04:55 UTC
Confirm same behavior on LO 4.0.4.1 (Win7 32bit) from language Indonesian to English (UK)

Setting back the language doesn't change results.
Comment 6 A (Andy) 2015-03-07 20:32:20 UTC
Reproducible with LO 4.4.1.2, Win 8.1
Comment 7 tommy27 2016-04-16 07:24:45 UTC Comment hidden (obsolete)
Comment 8 Johannes Weberhofer 2016-04-16 07:53:04 UTC
This Bug is still valid with version 5.0.4.2 (opensuse leap) sowie mit Version 5.1.2.2
Comment 9 Johannes Weberhofer 2018-05-02 10:27:08 UTC
This bug dows no longer exist in 6.0.4.1
Comment 10 Laurent Balland 2018-05-02 12:56:05 UTC
The problem is coming from the interpretation of the decimal separator. Your table contains a comma as decimal separator. When you switch to a language which use a point as decimal separator, the contents of your cells are no more recognized as a value and is converted to a text, which sum is 0.

The pb is not fixed for me with Version: 6.0.4.1 (x64)
Build ID: a63363f6506b8bdc5222481ce79ef33b2d13c741
Threads CPU : 4; OS : Windows 6.1; UI Render : par défaut; 
Locale : fr-FR (fr_FR); Calc: CL

Set it back to NEW as no fix was identified

@Johannes Weberhofer: "RESOLVED FIXED" is used only if we know which commit fixed the bug. In your case, you should have selected "RESOLVED WORKSFORME"

The result of the sum in A3 is 0 when switching to a language of the number format using point as decimal separator.

More precise procedure to reproduce the bug:
1. Tools > Options > Language Settings > Languages: Locale setting: choose a language using comma as decimal separator like French (France) or German (Germany)
2. Open attachment 79985 [details]
=> Result in 3rd cell is 2,5 (two and half)
3. Select all cells (click in table and hit twice Ctrl+A)
4. Right click in a cell > Number Format
5. Change language to a language using point as decimal separator, such as English (USA). OK

Actual result:
Display of values in two first cells are the same and sum in 3rd cell is 0

Expected result:
Display of values should change decimal separator to a point (1.2 and 1.3), and sum should be 2.5
Comment 11 Johannes Weberhofer 2018-05-02 13:17:48 UTC
@Laurent BP thanks for re-checking. You are right, the bug still exists. I have tested it within calc were it works nicely.
Have updated the version information as 3.5.3 is no longer maintained.
Comment 12 Laurent Balland 2018-05-02 13:52:22 UTC
(In reply to Johannes Weberhofer from comment #11)
> Have updated the version information as 3.5.3 is no longer maintained.
Version corresponds to the *earliest* version number where the bug appeared. You should not change it.
Revert to 3.5.3
Comment 13 QA Administrators 2019-05-03 02:51:54 UTC Comment hidden (obsolete)
Comment 14 Johannes Weberhofer 2019-05-03 04:31:25 UTC
This bug is still valid with version 6.2.2.2;

However, upon testing I have noticed that setting a useful number format, accepting and setting the language in a second step leads in a valid result.
Comment 15 QA Administrators 2021-05-03 03:44:01 UTC Comment hidden (obsolete)
Comment 16 Johannes Weberhofer 2021-05-03 09:49:11 UTC
This specific behavior can no longer be reproduced.