Bug 152804 - (python generated) TABLES: Numbers in a cell equal to or greater than 10 are set to 0 upon saving and re-opening
Summary: (python generated) TABLES: Numbers in a cell equal to or greater than 10 are ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: lowest trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Tables MSO-External-Producers
  Show dependency treegraph
 
Reported: 2023-01-02 04:09 UTC by Mitch
Modified: 2024-09-30 16:02 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
csv file used to generate the final .odt (89 bytes, text/csv)
2023-01-02 04:12 UTC, Mitch
Details
Generated .odt file that exhibits the issue (64.96 KB, application/vnd.oasis.opendocument.text)
2023-01-02 04:13 UTC, Mitch
Details
The template .odt file used to generate the final .odt (15.36 KB, application/vnd.oasis.opendocument.text)
2023-01-02 04:13 UTC, Mitch
Details
The Python script used to generate the .odt file (8.19 KB, text/x-python)
2023-01-02 04:14 UTC, Mitch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mitch 2023-01-02 04:09:48 UTC
Description:
I have a script that takes a .csv file and produces an .odt file by taking an existing .odt template and writing the data from the .csv into it.

When saving the generated .odt file and then re-opening it, any number in a cell that is 10 or greater will be set to 0.

Steps to Reproduce:
1. Download the attachments
2. Open invoice-1.odt
3. Save it
4. Close it
5. Re-open it; the cell containing 10 will now contain 0

Note that invoice-1.odt can be generated by running "python3 make-invoice.py 1".

Actual Results:
The cell that contained 10 now contains 0 after saving and re-opening.

Expected Results:
The cell that contained 10 still contains 10 after saving and re-opening.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 32; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.1
Calc: threaded

I also tested with a daily build, and the problem is reproducible there too:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 312100003fc7cae358038aaec853584782c698f8
CPU threads: 32; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 1 Mitch 2023-01-02 04:12:32 UTC
Created attachment 184435 [details]
csv file used to generate the final .odt
Comment 2 Mitch 2023-01-02 04:13:00 UTC
Created attachment 184436 [details]
Generated .odt file that exhibits the issue
Comment 3 Mitch 2023-01-02 04:13:31 UTC
Created attachment 184437 [details]
The template .odt file used to generate the final .odt
Comment 4 Mitch 2023-01-02 04:14:00 UTC
Created attachment 184438 [details]
The Python script used to generate the .odt file
Comment 5 Mitch 2023-01-02 04:16:33 UTC
This seems similar to https://bugs.documentfoundation.org/show_bug.cgi?id=133611, except it doesn't happen for all numbers.
Comment 6 Dieter 2023-01-20 07:40:33 UTC
I confirm it with

Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded

Steps:
1. Open attachment 184436 [details]
2. Save, close and reopen
Comment 7 Dieter 2023-01-20 07:42:46 UTC
(In reply to Mitch from comment #5)
> This seems similar to
> https://bugs.documentfoundation.org/show_bug.cgi?id=133611, except it
> doesn't happen for all numbers.

Bug 133611 is a duplicate of bug 131025, which is fixed since LO 7.3. but perhaps not tested with numbers > 10.
Comment 8 Justin L 2023-01-20 13:24:11 UTC
Already seen in LO 3.6, 5.3, 7.0 - assuming inherited from OOo.

It seems fairly clear that there is something fundamentally wrong with the python script, but I don't know anything about calc or the ods format, so I won't bother speculating on what that might be.

If I manually enter a number, then it reloads fine, so that should give some good comparison data.

(I hope you know that an ODS is just a zip file, so you could do a comparison of the unzipped contents of a hand-modified document and the python output.)
Comment 9 elmau 2023-02-14 15:09:46 UTC
I confirm it with:

Version: 7.5.0.3 (X86_64) / LibreOffice Community
Build ID: 50(Build:3)
CPU threads: 16; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
7.5.0-1
Calc: CL threaded