Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Unlocalized date format in Share Document dialog | ||||||
---|---|---|---|---|---|---|---|
Product: | Calc | Reporter: | redflagzhulihua <ooo.redflag> | ||||
Component: | ui | Assignee: | oc | ||||
Status: | CLOSED FIXED | QA Contact: | issues@sc <issues> | ||||
Severity: | Trivial | ||||||
Priority: | P3 | CC: | issues, mikhail.voytenko, ooo, peter.junge | ||||
Version: | DEV300m23 | ||||||
Target Milestone: | --- | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||
Developer Difficulty: | --- | ||||||
Issue Depends on: | |||||||
Issue Blocks: | 84405 | ||||||
Attachments: |
|
Description
redflagzhulihua
2008-07-24 09:54:52 UTC
1. Choose [File] > [New] > [Spreadsheet] and enter any strings 2. Choose [Tools] > [Share Document] 3. Check UI messages 4. Select [Share this spreadsheet with other users] checkbox and click [OK] button 5. Enter a filename in [Save As] dialog and click [Save] button 6. Choose [Tools] > [Share Document] Created attachment 55341 [details]
unlocalized date
Just because I'm the owner of i18n locale data and number formatter does not mean I would be responsible for every dialog that should use localized formats.. @redflagzhulihua: please ensure that your system's respectively OOo locale settings are set to Chinese. @tbe: reassigning to you. It occurs to me that the dialog does use some localized date format, just not the expected one. What means/method does it use? ER: The Share Document dialog displays the date string directly from the shared control file. When writing the date to the shared control file the method ShareControlFile::GetCurrentLocalTime() (svtools/source/misc/sharecontrolfile.cxx) is used, which uses osl_getSystemTime(), osl_getLocalTimeFromSystemTime() and osl_getDateTimeFromTimeValue() in order to get aDate of type oslDateTime. The date is then written in a self-defined(?) format: sprintf( pDateTime, "%02d.%02d.%4d %02d:%02d", aDateTime.Day, aDateTime.Month, aDateTime.Year, aDateTime.Hours, aDateTime.Minutes ); MAV: I think writing a localized date format in the shared control file is the wrong approach (Let's consider the case of two offices with different locales working on the same file.). Therefore this issue must be fixed in the Share Document dialog when displaying the date. What do you think? > The Share Document dialog displays the date string directly from
> the shared control file. [...]
> The date is then written in a self-defined(?)
> format:
>
> sprintf( pDateTime, "%02d.%02d.%4d %02d:%02d", aDateTime.Day,
> aDateTime.Month, aDateTime.Year, aDateTime.Hours, aDateTime.Minutes );
Now that makes me wonder even more, because with DEV300m26 in an en-US
locale for the "Accessed" column I see the value formatted as
mm/dd/yyyy HH:MM
There must be something different displaying it in the dialog. In the
lock file the value is indeed present as dd.mm.yyyy HH:MM
For what is written to the file I would had suggested the ISO 8601
format yyyy-mm-dd HH:MM instead, which is unambiguous and reliable to
parse, for humans and machines ;-)
Hi er, I'm sure my OOo locale setting is Chinese. And step3 of the testcase show the localized date. I'm sorry for the confusion, but I didn't tell the whole story. There are two different cases. In the first case we have an unshared document (step 3) and no shared control file is existing. In this case the modification date from the document properties is taken. A localized string is generated by using the methods ScGlobal::pLocaleData->getDate() and ScGlobal::pLocaleData->getTime(). In the second case we have a shared document (step 6) and an existing shared control file. In this case the date displayed in the Share Document dialog is taken from the shared control file as written in my previous comment. As discussed with OC set to target OOo 3.0.1 accepted fixed in CWS calc46 The following files are affected: sc/source/ui/miscdlgs/sharedocdlg.cxx 1.6.134.1 TBE->OC: Please verify in CWS calc46. verified in internal build cws_calc46 Fixed. Verified with OOo300m15 on Fedora. Works very well. Thank you for your work Closing |