diff options
Diffstat (limited to 'svl')
-rw-r--r-- | svl/qa/unit/svl.cxx | 34 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 8 |
2 files changed, 21 insertions, 21 deletions
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index 80be2b2af79a..5d045a8d00ca 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -1510,36 +1510,36 @@ void Test::testUserDefinedNumberFormats() sCode = "[DBNum3][$-0411]General\\ "; checkPreviewString(aFormatter, sCode, 123456789, eLang, sExpected); - // -- Korean: DBNum1 -> NatNum1, DBNum2 -> NatNum2, DBNum3 -> NatNum4, DBNum4 -> NatNum9 + // -- Korean: DBNum1 -> NatNum4, DBNum2 -> NatNum5, DBNum3 -> NatNum6, DBNum4 -> NatNum10 - // DBNum1 -> NatNum1: Korean lower case characters - // 一二三四五六七八九 - sExpected = u"\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d "; - sCode = "[NatNum1][$-0412]General\\ "; + // DBNum1 -> NatNum4: Korean lower case characters + // 一億二千三百四十五万六千七百八十九 + sExpected = u"\u4e00\u5104\u4e8c\u5343\u4e09\u767e\u56db\u5341\u4e94\u4e07\u516d\u5343\u4e03\u767e\u516b\u5341\u4e5d "; + sCode = "[NatNum4][$-0412]General\\ "; checkPreviewString(aFormatter, sCode, 123456789, eLang, sExpected); sCode = "[DBNum1][$-0412]General\\ "; checkPreviewString(aFormatter, sCode, 123456789, eLang, sExpected); - // DBNum2 -> NatNum2: Korean upper case characters - // 壹貳參四伍六七八九 - sExpected = u"\u58f9\u8cb3\u53c3\u56db\u4f0d\u516d\u4e03\u516b\u4e5d "; - sCode = "[NatNum2][$-0412]General\\ "; + // DBNum2 -> NatNum5: Korean upper case characters + // 壹億貳阡參佰四拾伍萬六阡七佰八拾九 + sExpected = u"\u58f9\u5104\u8cb3\u9621\u53c3\u4f70\u56db\u62fe\u4f0d\u842c\u516d\u9621\u4e03\u4f70\u516b\u62fe\u4e5d "; + sCode = "[NatNum5][$-0412]General\\ "; checkPreviewString(aFormatter, sCode, 123456789, eLang, sExpected); sCode = "[DBNum2][$-0412]General\\ "; checkPreviewString(aFormatter, sCode, 123456789, eLang, sExpected); - // DBNum3 -> NatNum3: fullwidth Arabic digits - // 123456789 - sExpected = u"\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19 "; - sCode = "[NatNum3][$-0412]General\\ "; + // DBNum3 -> NatNum6: fullwidth Arabic digits + // 1억2천3백4십5만6천7백8십9 + sExpected = u"\uff11\uc5b5\uff12\ucc9c\uff13\ubc31\uff14\uc2ed\uff15\ub9cc\uff16\ucc9c\uff17\ubc31\uff18\uc2ed\uff19 "; + sCode = "[NatNum6][$-0412]General\\ "; checkPreviewString(aFormatter, sCode, 123456789, eLang, sExpected); sCode = "[DBNum3][$-0412]General\\ "; checkPreviewString(aFormatter, sCode, 123456789, eLang, sExpected); - // DBNum4 -> NatNum9: Hangul characters - // 일이삼사오육칠팔구 - sExpected = u"\uc77c\uc774\uc0bc\uc0ac\uc624\uc721\uce60\ud314\uad6c "; - sCode = "[NatNum9][$-0412]General\\ "; + // DBNum4 -> NatNum10: Hangul characters + // 일억이천삼백사십오만육천칠백팔십구 + sExpected = u"\uc77c\uc5b5\uc774\ucc9c\uc0bc\ubc31\uc0ac\uc2ed\uc624\ub9cc\uc721\ucc9c\uce60\ubc31\ud314\uc2ed\uad6c "; + sCode = "[NatNum10][$-0412]General\\ "; checkPreviewString(aFormatter, sCode, 123456789, eLang, sExpected); sCode = "[DBNum4][$-0412]General\\ "; checkPreviewString(aFormatter, sCode, 123456789, eLang, sExpected); diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index af68a340f3d0..774b8fdd0d42 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -141,7 +141,7 @@ void ImpSvNumberformatInfo::Copy( const ImpSvNumberformatInfo& rNumFor, sal_uInt static const std::map<LanguageType, std::array<sal_uInt8, 4>> tblDBNumToNatNum = { { primary(LANGUAGE_CHINESE), { 4, 5, 3, 0 } }, { primary(LANGUAGE_JAPANESE), { 4, 5, 3, 0 } }, - { primary(LANGUAGE_KOREAN), { 1, 2, 3, 9 } } }; + { primary(LANGUAGE_KOREAN), { 4, 5, 6, 10 } } }; // static sal_uInt8 SvNumberNatNum::MapDBNumToNatNum( sal_uInt8 nDBNum, LanguageType eLang, bool bDate ) @@ -153,7 +153,7 @@ sal_uInt8 SvNumberNatNum::MapDBNumToNatNum( sal_uInt8 nDBNum, LanguageType eLang { if ( nDBNum == 4 && eLang == primary(LANGUAGE_KOREAN) ) { - nNatNum = 9; + nNatNum = 10; } else if ( nDBNum <= 3 ) { @@ -176,7 +176,7 @@ sal_uInt8 SvNumberNatNum::MapDBNumToNatNum( sal_uInt8 nDBNum, LanguageType eLang static const std::map<LanguageType, std::array<sal_uInt8, 9>> tblNatNumToDBNum = { { primary(LANGUAGE_CHINESE), { 1, 0, 0, 1, 2, 3, 0, 0, 0 } }, { primary(LANGUAGE_JAPANESE), { 1, 2, 3, 1, 2, 3, 1, 2, 0 } }, - { primary(LANGUAGE_KOREAN), { 0, 2, 3, 1, 0, 0, 0, 0, 0 } } }; + { primary(LANGUAGE_KOREAN), { 1, 2, 3, 1, 2, 3, 1, 2, 4 } } }; // static sal_uInt8 SvNumberNatNum::MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType eLang, bool bDate ) @@ -186,7 +186,7 @@ sal_uInt8 SvNumberNatNum::MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType eLan eLang = primary(eLang); // 10 bit primary language if ( bDate ) { - if ( nNatNum == 9 && eLang == primary(LANGUAGE_KOREAN) ) + if ( nNatNum == 10 && eLang == primary(LANGUAGE_KOREAN) ) { nDBNum = 4; } |