Bug 53050 - Sum of Table column in writer is wrong
Summary: Sum of Table column in writer is wrong
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.0.4 release
Hardware: x86-64 (AMD64) macOS (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-01 15:59 UTC by Johannes Weberhofer
Modified: 2013-03-13 09:59 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Document having tables with wrong cell's sum (10.07 KB, application/vnd.oasis.opendocument.text)
2012-08-01 15:59 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-08-01 15:59:45 UTC
Created attachment 65038 [details]
Document having tables with wrong cell's sum

The sum of some Table cells is totally wrong. See example.
Comment 1 Julien Nabet 2012-08-12 12:37:00 UTC
On pc Debian x86-64, with master sources updated today, I reproduced the problem.
I noticed that if you clear and retype the numbers of the 3 cells not taken into account (because they're considered with value equal to 0), it works.
Comment 2 Julien Nabet 2012-08-12 13:54:26 UTC
I noticed this in content.xml (by unzipping the odt)

Value OK (taken into account in the sum):
<table:table-cell table:style-name="Tabelle1.D2" office:value-type="float" office:value="1300"><text:p text:style-name="P8">1.300,00</text:p></table:table-cell>

Value KO (not taken into account in the sum):
<table:table-cell table:style-name="Tabelle1.D2" office:value-type="float" office:value="0"><text:p text:style-name="P2"><text:span text:style-name="T5">4.977,</text:span><text:span text:style-name="T9">50</text:span></text:p></table:table-cell>

How did you fill your table ?
Comment 3 Johannes Weberhofer 2012-08-27 09:27:05 UTC
It has been copied from an invoice template, which suddenly is having this problems on some lines (the behaviour in the original document is the same). The values have been inputted via keyboard, some possibly via copy/paste from an database system.

The problem for me is, that overwriting the values via keyboard did does not change the behaviour. In the master document everything is all right, after recalculating with <F9> those lines change to "0"...
Comment 4 Julien Nabet 2012-08-28 21:33:47 UTC
Could you attach the template for some testing?
Comment 5 Jean-Baptiste Faure 2013-03-12 20:47:46 UTC
This bug is fixed by these commits:
LO 4.0.2 : https://gerrit.libreoffice.org/gitweb?p=core.git;a=commit;h=a31707dd91aec5d2dc5b8060ef42960b709ec068
master : https://gerrit.libreoffice.org/gitweb?p=core.git;a=commit;h=332fa1344aaaf8ff190c594fe5829cf1551c5211

If you open the bugdoc with LO 4.0.2.0+ you get 0 in C2, C3 and C4 and the sum is then correct.

Best regards. JBF
Comment 6 Johannes Weberhofer 2013-03-13 08:09:22 UTC
Thank you for fixing it - currently I can not test it, but I think you are right.

I think it's quite problematic, that values in the cells are changed on opening of the document (when I understand the description correctly). That's very bad when I don't have printouts of the documents, what do you think?