Kaydet (Commit) 95c91f09 authored tarafından Eike Rathke's avatar Eike Rathke

Resolves: tdf#101963 loading zh-TW ROC calendar use EE|E instead of YYYY|YY

This still (unnecessarily) prefixes with [~ROC] but preserves the
intended "no leading zero" semantics.

Change-Id: I154be0978a8147ceddefcb546c257d44f770b5de
üst 583aec25
......@@ -1215,11 +1215,17 @@ void SvXMLNumFmtElementContext::EndElement()
case XML_TOK_STYLE_YEAR:
rParent.UpdateCalendar( sCalendar );
//! I18N doesn't provide SYSTEM or extended date information yet
// Y after G (era) is replaced by E
if ( rParent.HasEra() )
// Y after G (era) is replaced by E, also if we're switching to the
// other second known calendar for a locale.
/* TODO: here only for zh-TW, handle for other locales as well. */
if ( rParent.HasEra() ||
(sCalendar.equalsIgnoreAsciiCaseAscii("ROC") &&
rParent.GetLocaleData().getLoadedLanguageTag().getBcp47() == "zh-TW"))
{
rParent.AddNfKeyword(
sal::static_int_cast< sal_uInt16 >(
bEffLong ? NF_KEY_EEC : NF_KEY_EC ) );
}
else
rParent.AddNfKeyword(
sal::static_int_cast< sal_uInt16 >(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment