Bug 253042

Summary: Time is shown as 00:00 when file is loaded
Product: [Applications] calligrasheets Reporter: Jure Repinc <jlp>
Component: generalAssignee: Calligra Sheets (KSpread) Bugs <calligra-sheets-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: mkruisselbrink, ra25
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Urnik2.ods
Original file with times in cells and some simple calculations based on the times
same file after saving with kspread

Description Jure Repinc 2010-10-02 19:07:28 UTC
Version:           svn (using Devel) 
OS:                Linux

When O open the document that contains times it is hown as 00:00 in a soreadsheet. The time is hown correctly in the Tool Options dock. If I click in the value lineedit and then cancel edition the display in spreadsheet cell is updated and then shows the value correctly. I've noticed this in both KOffice 2.2.1 and in SVN.

Reproducible: Always

Steps to Reproduce:
1. Open the attached file
2. Check out column A

Actual Results:  
Columen A shows all time values as 00:00 (and they are gray)

Expected Results:  
The values should be from 7:00 to 20:00 (and black)
Comment 1 Jure Repinc 2010-10-02 19:09:18 UTC
Created attachment 52170 [details]
Urnik2.ods
Comment 2 Jeremy Whiting 2010-10-05 17:45:19 UTC
Created attachment 52244 [details]
Original file with times in cells and some simple calculations based on the times
Comment 3 Jeremy Whiting 2010-10-05 18:05:55 UTC
Created attachment 52247 [details]
same file after saving with kspread

Note: All I did was open the previous file (originaltimefile.ods) in kspread and click save.  The document appeared fine in kspread but when opening in openoffice again, the times were all wrong, or different somehow.
Comment 4 Marijn Kruisselbrink 2010-10-06 11:57:04 UTC
SVN commit 1183113 by mkruisselbrink:

fix saving of time values in ods files. This unfortunately got broken by a change in Qt4.1 and kspread relying on undocumented behavior of QTime::toString()
BUG: 253042

 M  +2 -2      Cell.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1183113
Comment 5 Marijn Kruisselbrink 2010-10-06 12:04:42 UTC
Unfortunately kspread 2.x had a bug in the time-saving code, resulting in
problematic files like this Urnik2.ods. I now fixed this for the upcoming 2.3
release, but I don't really see any easy solution to get kspread to load these
corrupted files correctly.
Comment 6 Marijn Kruisselbrink 2010-11-05 21:29:49 UTC
*** Bug 255749 has been marked as a duplicate of this bug. ***