https://bz.apache.org/ooo/show_bug.cgi?id=82849

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #14 from [email protected] ---
Excel appears to always write full XMLSchema-2 style dateTime for the <Cell>
element when its ss:Type is "DateTime". Even when you just type in times
without a date, it uses 1899-12-31 as the date.

In ODF 1.3, a cell can have type office:date-value or office:time-value. The
office:date-value is a dateOrDateTime, which is either a "date" or "dateTime"
of the XMLSchema-2 specification. The office:time-value is a duration, which is
a XMLSchema-2 "duration" type.

The XSLT code in spreadsheetml2ooo.xsl attempts to use the cell's style to
determine whether to import the value as a date, outputting the YYYY-MM-DD an
ODF office:date-value, or just a time, outputting the HH:mm:ss as the ODF
office:time-value. The decision is made on several heuristics, such as presence
of 'y' for year, and absence of the word "Time", in the cell's style.

This is wrong for several reasons:
1. The style should have no relationship with the data import, and should not
lead to data loss during import.
2. The XMLSchema-2 dateTime from ss:DateTime should directly become the
office:date-value, which the style then formats as appropriate, whether as a
date or a time or both.
3. The code only allows pure dates or pure times, never dateTime.

pturmel's 2nd patch fixes most of these problems, so I am going to commit it.

-- 
You are receiving this mail because:
You are on the CC list for the issue.
You are the assignee for the issue.

Reply via email to