[Libreoffice-bugs] [Bug 125035] Date format in Base is wrong.(zh-CN version)
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Fri Jul 2 15:19:27 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=125035
--- Comment #14 from Eike Rathke <erack at redhat.com> ---
Just a code pointer, trace, for the resulting long date string:
in vcl/source/control/field2.cxx
DateFormatter::ImplGetDateAsText() calls
DateFormatter::FormatDate() for ExtDateFieldFormat::SystemLong calls
in unotools/source/i18n/localedatawrapper.cxx
LocaleDataWrapper::getLongDate()
Problem ist that LocaleDataWrapper::getLongDate() assembles localized
date particles but is agnostic about a locale's format codes or their
interpretation or any particular ordering of date particles other than
the Day/Month/Year order.
To solve that, a proper SvNumberFormatter instance would have to be used
instead. vcl has a static instance of SvNumberFormatter that could be
used, see include/vcl/formatter.hxx Formatter::StaticFormatter. Class
DateFormatter inherits from Formatter (via EntryFormatter) so that
should be viable, but propagating the actual locale may be needed.
Didn't investigate deeper, DateFormatter::FormatDate() gets that
indirectly passed from DateFormatter::ImplGetDateAsText() via
ImplGetLocaleDataWrapper() and GetCalendarWrapper().
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210702/f29f846d/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list