Bug 1364406 - wrong cell format in LO 5.1 compared to 4.4
Summary: wrong cell format in LO 5.1 compared to 4.4
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: libreoffice
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Eike Rathke
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-05 09:48 UTC by Aleksandar Kostadinov
Modified: 2016-08-05 19:36 UTC (History)
5 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2016-08-05 19:36:27 UTC


Attachments (Terms of Use)
formatbug.ods (13.20 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-08-05 09:48 UTC, Aleksandar Kostadinov
no flags Details

Description Aleksandar Kostadinov 2016-08-05 09:48:42 UTC
Created attachment 1187809 [details]
formatbug.ods

Description of problem:
See attached document and the `SUM Total:` field. In 4.4 (fedora 23) it shows properly as format `[HH]:mm`. But in 5.x (fedora 24) it shows up as `####`.

Version-Release number of selected component (if applicable):
libreoffice-5.1.5.1-2.fc24.x86_64

How reproducible:
always

Steps to Reproduce:
1. open formatbug.ods
2. look at `SUM Total:` field

Actual results:
####

Expected results:
00:00

Comment 1 David Tardon 2016-08-05 10:05:38 UTC
Try to make the cell a bit wider...

Comment 2 Aleksandar Kostadinov 2016-08-05 13:35:31 UTC
Ok, it shows "something" when it is wider but that something is "12:00:00 AM" instead of "00:00" like it used to show in 4.4.

This file has been created with 4.4 (Fedora 23) and showed "00:00". That to me shows that is a bug as old documents should still show correctly in newer versions.

Comment 3 Eike Rathke 2016-08-05 14:12:28 UTC
D54 (and others) have a format [HH]:MM of the Default (system/office) locale applied, D56 has a format HH:MM:SS AM/PM of the English-US locale applied. Check with Ctrl+1 or Format -> Cells.

Comment 4 Eike Rathke 2016-08-05 14:35:36 UTC
In fact the document has things stored wrongly. Opening in 4.4 I see the format on D56 being [H]:MM:SS;@ of Default locale. But the cell is not stored as a time cell like the others, it is of office:value-type="float" office:value="0" instead of office:value-type="time" office:time-value="PT00H00M00S". That seems to confuse the format inheritance for the SUM formula and somehow the default format of the currently active locale is applied (not as Default locale but as fixed locale, only this I'd consider a bug).

You can fix the document by applying the correct format once and save again, after which the cell is correctly saved with office:value-type="time" office:time-value="PT00H00M00S"

Comment 5 Aleksandar Kostadinov 2016-08-05 16:47:31 UTC
I quickly figured how to fix the document when I faced the issue (as you suggested setting format). I can't exactly understand what is confused and how from your comment.

I think though that document renders in one way in 4.4 but in 5.1 is not rendered as before. I think it is good to retain compatibility with older LO versions as long as this doesn't harm user experience in other ways.

I'm reopening for the last time. I leave it up to you to decide whether backward compatibility can be fixed or not.

Comment 6 Eike Rathke 2016-08-05 17:12:26 UTC
As said, 4.4 apparently stored it broken and determined the format inherited from the other time cells it sums in a different way. I'll see if I can do anything. However, that will likely not go into 5.1 anymore.

Comment 7 Aleksandar Kostadinov 2016-08-05 17:26:15 UTC
I think it makes a lot of sense to inherit format from summed cells. It is likely user expects to have the sum cell by default in same format as source cells.
Not sure how should different formats of source cells be handled. But when all source cells are same format it appears to be a no brainer to me. Or probably I have too little experience with spreadsheets.


Note You need to log in before you can comment on or make changes to this bug.