summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorKevin Suo <suokunlong@126.com>2022-01-29 16:35:12 +0800
committerEike Rathke <erack@redhat.com>2022-02-07 18:52:40 +0100
commit24e6217c0abdaed703a077e77881ad6e8b4f6f0e (patch)
tree8b00c36e627541c512870df7c2d9306bcd240c9e /i18npool
parent30585873ca8c861aa2d13f85797930f62195ee55 (diff)
tdf#77803: Use NATNUM12 and NATNUM4 for Chinese Numberring
For Chinese, format code NATNUM7 and NATNUM8 are "short lower case text" and "short upper case text", respectively, see [1]. We need full lower and full upper here for numbering purpose, not "short" form. E.g. for number 100, we need "一百" (lower case) and "壹佰" (upper case), rather than "百" which is in short form. Use NATNUM12 for chinese lower, and NATNUM5 for Chinese upper. See bug 147054 for the reason why we do not use NATNUM4 for Chinese lower. [1] https://help.libreoffice.org/latest/en-US/text/shared/01/05020301.html Change-Id: I69c93d62f1026117a6d403ade63a9abfbe5c73f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129143 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 831b502a2771..bb1303ad8844 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -752,15 +752,15 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal
locale = aLocale;
break;
case NUMBER_LOWER_ZH:
- natNum = NativeNumberMode::NATNUM7;
+ natNum = NativeNumberMode::NATNUM12;
locale.Language = "zh";
break;
case NUMBER_UPPER_ZH:
- natNum = NativeNumberMode::NATNUM8;
+ natNum = NativeNumberMode::NATNUM5;
locale.Language = "zh";
break;
case NUMBER_UPPER_ZH_TW:
- natNum = NativeNumberMode::NATNUM8;
+ natNum = NativeNumberMode::NATNUM5;
locale.Language = "zh";
locale.Country = "TW";
break;
@@ -1054,7 +1054,9 @@ const Supported_NumberingType aSupportedTypes[] =
{style::NumberingType::NATIVE_NUMBERING, "Native Numbering", LANG_CJK|LANG_CTL},
{style::NumberingType::FULLWIDTH_ARABIC, nullptr, LANG_CJK},
{style::NumberingType::CIRCLE_NUMBER, nullptr, LANG_CJK},
- {style::NumberingType::NUMBER_LOWER_ZH, nullptr, LANG_CJK},
+ // The cSymbol is defined here for compatibility with files created by old releases.
+ // Otherwise if nullptr, these 3 digits may change as NATNUM12 depends on 3rd-party lib.
+ {style::NumberingType::NUMBER_LOWER_ZH, "一, 二, 三, ...", LANG_CJK},
{style::NumberingType::NUMBER_UPPER_ZH, nullptr, LANG_CJK},
{style::NumberingType::NUMBER_UPPER_ZH_TW, nullptr, LANG_CJK},
{style::NumberingType::TIAN_GAN_ZH, nullptr, LANG_CJK},