Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Document Custom Property of type Date resets time value | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | General | Reporter: | bmarcelly <marcelly.bernard> | ||||||
Component: | ui | Assignee: | michael.ruess | ||||||
Status: | CLOSED FIXED | QA Contact: | issues@framework <issues> | ||||||
Severity: | Trivial | ||||||||
Priority: | P3 | CC: | bernd.eilers, issues, mst.ooo, os_ooo | ||||||
Version: | DEV300m37 | ||||||||
Target Milestone: | OOo 3.3 | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||||
Developer Difficulty: | --- | ||||||||
Attachments: |
|
Description
bmarcelly
2008-12-08 17:51:06 UTC
pb: I take over. *** Issue 101376 has been marked as a duplicate of this issue. *** Issue i101376 which has been marked as duplicate for this issue contains conformance test documents from the OASIS ODF TC Interoperability and Conformance relevant to this issue. @os: please fix the dialog in sfx2; this is purely an UI issue. the dialog should support util::Date, util::DateTime, and util::Time properties for date/time. *** Issue 100704 has been marked as a duplicate of this issue. *** . *** Issue 100703 has been marked as a duplicate of this issue. *** Fixed in cws os137 in sfx2/inc/sfx2/dinfdlg.hxx sfx2/source/dialog/dinfdlg.cxx sfx2/source/dialog/dinfdlg.hrc sfx2/source/dialog/dinfdlg.src sfx2/source/inc/sfxlocal.hrc The type list is enhanced by "DateTime" and "Time" entries. The dialog now provides a DateField and a TimeField instead of the Edit. Reassigned for verification reopening issue: can still not specify a duration on os137 CWS as was asked for in issue i100703 which was marked as duplicate for this issue. The duration type is specified in http://www.oasis-open.org/committees/download.php/33633/OpenDocument-v1.2-part1-cd03.odt section 3.3.3.A duration is something completely different than a time value and is another possible type for a custom metafield not implemented yet with os137. reassigned for implementation so i had a look at the ODF schema, relevant parts for meta:user-defined: <group> <attribute name="meta:value-type"> <value>date</value> </attribute> <ref name="dateOrDateTime"/> </group> <group> <attribute name="meta:value-type"> <value>time</value> </attribute> <ref name="duration"/> </group> <define name="dateOrDateTime"> <choice> <data type="date"/> <data type="dateTime"/> </choice> </define> looking at XMLSchema-2, in dateTime the date part is mandatory. so we have value-type="date" with value of type "date" or "dateTime", and value-type="time" with value of type "duration". in other words, there is no value of type "time". maybe the property type in the UI should be "Duration" instead of "Time"? oops, forgot to CC: bei; please look at the previous comment from me bei->mst: I would interpretate it like you as well value-type="time" should indeed be a duration and not a time like it was implemented on os137. Please have a look at Issue 101376, which was marked as duplicate for this issue, for Testdocuments from the OASIS Interoperability TC. Those are not correctly handled yet with the fixes on os137. bei->os: See §3.2.6 of the xmlschema-2 specification for more detailed information on the ISO 8601 duration format as it must be stored in the document. http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#duration. For the UI we can probably find something more sexy than the ISO 8601 representation. The test documents of issue i101376 contain a variable named "user-time" with such a value. The total editing time on the first tabpage of the properties dialog by the way is stored in the same format. Note that a time value without a date as currently implemented on os137 is not specified in the ODF Standard. indeed, the "duration" is not just a time, but a date and time, where every single component may be ommitted if it is 0. sorry, must have overlooked that. it seems to me that we cannot currently distinguish a duration from a date in the API. bei->mst: that exactly is it NOT a date + a time. It´s a "duration" not a DateTime. It is something like the difference between two DateTime values, which is specified as an amount of years, months, days, hours, minutes and seconds. sorry, what i meant to say is: duration has all the _components_ of a date+time, not just those of a time (which was my original flawed assumption). bei->mst: Duration has NONE of the components of our Date, Time and DateTime classes in the tools library it simply elapsed time as opposed to the time of the clock as is represented by our Time class and implemented on os137. The UI should allow the user to specify a data type of "elapsed time" or "duration" as something like "10 years 5 Months 6 Days 2 Hours 15 Minutes and 45 seconds" or just "20 Minutes" not something like a 24-Hour "clock time" as in "15:00". This is the original flawed assumption. i have just committed support for full XMLSchema-2 "duration" properties in the DocumentProperties services. the "duration" is stored as a new struct css.util.Duration. now os can implement support in the dialog and in the writer docufld.cxx (see issue 105687). Duration now supported. Reassigned for verification MRU->BEI: could you please also have a look at this now, if your resources may allow this? For me, this looks ok now in newer build of os137. Do you agree? bei->mru,mst,os: I am mostly but not totally satisfied yet. Although the main problems have been solved there is one issue left with the import of a duration value in the <meta:edit-duration> field which is shown as total editing time in the User Interface. The problem here is that if there is a value being used which uses month and year subparameters these are simply ignored. This is not in accordance to the recommendation currently discussed in the OASIS ODF Interoperability and Conformance TC which I have communicated to mst by private email before my vacation last week in addition to the comments in this issue. The recommendation is that a ODF Producer should not use Month and Years subparameters (which fortunately does not seem to be the case) but that a consumer should interpret them like that a month there always means 30 Days and a Year there always means 365 days. Calculating them as zero no matter what was specified is an error. I will attach a test document (unusual_editing_duration.odt) with a editing duration of 1 year 1 month 1 day 1 Hour 15 Minutes and 3 Seconds which can be used to demonstrate the error. The total editing time shown for this document in the OpenOffice.org UserInterface of CWS os137 is 25:15:03. This shows that month and year subvalues have been completely ignored while days, hours, minutes and seconds have been use for calculating the value shown. Created attachment 66441 [details]
Test Document with unsual specified editing duration
bei->mru: I also checked all test documents of Issue 101376 which was marked as a duplicate of this issue and those are all imported correctly now with the current os137 OpenOffice.org. bei->mru,mst,os: large values for editing duration are also not imported correctly. Will attach another test document (large_editing_duration.odt) demonstrating this. This document has an editing duration of 400 Days 1 Hour 22 Minutes and 54 Seconds. The value shown in OpenOffice.org of current os137 CWS is 1011:29:08 which is something completely different. I suppose there is still some Time class used somewhere which can not handle these values instead of the new Duration class. Created attachment 66442 [details]
Test Document with a large editing duration
Reassigning to MST for fixing import problems regarding bei's concerns. i've broken out the meta:editing-duration bug into issue 107372. this issue is about user-defined properties, and is FIXED. please verify user-defined properties bei->mst: Agreed better to break that other thing out into a separate issue. User Defined Properties do work fine now. All test documents in this area from the Oasis ODF Interoperability & Conformance TC could be imported correctly. No issues seen on export also. Setting issue to verified. Checked in DEV300m70. |