Bug 143526 - Korean NumberFormats are missing and wrong on the Code
Summary: Korean NumberFormats are missing and wrong on the Code
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: DaeHyun Sung
URL:
Whiteboard: target:7.3.0
Keywords:
Depends on:
Blocks: Number-Format CJK-Korean
  Show dependency treegraph
 
Reported: 2021-07-24 09:53 UTC by DaeHyun Sung
Modified: 2022-05-07 07:02 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
KoreanLegal mapping is wrong (compare with Word and LibreOffice) (163.93 KB, image/png)
2021-07-24 09:58 UTC, DaeHyun Sung
Details
KoreanLegal mapping is wrong (compare with Word and LibreOffice) (163.93 KB, image/png)
2021-07-24 10:00 UTC, DaeHyun Sung
Details
Example of Numbering - KoreanLegal on MS Word (13.70 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-07-24 10:01 UTC, DaeHyun Sung
Details
Example of Numbering - KoreanCounting on MS Word file (17.70 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-07-26 14:11 UTC, DaeHyun Sung
Details
Example of Numbering - koreanDigital on MS Word file (16.89 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-07-26 14:16 UTC, DaeHyun Sung
Details
Example of Numbering - koreanDigital2 on MS Word file (16.46 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-07-26 14:19 UTC, DaeHyun Sung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DaeHyun Sung 2021-07-24 09:53:14 UTC
Description:
I read the one of LibreOffice mailing lists.
What is the best fit for hindiVowels import? CHARS_PERSIAN or CHARS_NEPALI
https://lists.freedesktop.org/archives/libreoffice/2021-June/087533.html

I'm curious about Numbering Format for Korean on LibreOffice. 
I read the source code, "sw/source/filter/ww8/docxattributeoutput.cxx"
https://docs.libreoffice.org/sw/html/docxattributeoutput_8cxx_source.html 
https://git.libreoffice.org/core/+/refs/heads/master/sw/source/filter/ww8/docxattributeoutput.cxx


And I compare with "sw/source/filter/ww8/ww8atr.cxx" and Microsoft's OOXML manual
https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oe376/a5deef83-bb01-410f-bde0-9c35abe4ca52
[MS-DOCX]: Word Extensions to the Office Open XML (.docx) File Format
https://docs.microsoft.com/en-us/openspecs/office_standards/ms-docx/b839fe1f-e1ca-4fa6-8c26-5954d0abbccd
https://interoperability.blob.core.windows.net/files/MS-DOCX/%5bMS-DOCX%5d.pdf


that documents are showed "The mapped numbering format values table."


At the code[https://git.libreoffice.org/core/+/refs/heads/master/sw/source/filter/ww8/docxattributeoutput.cxx], Some Korean Numbering features are wrong and missing. 

I found the ST_NumberFormat on the document "[MS-OE376]: Office Implementation Information for ECMA-376 Standards Support"
https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oe376/a5deef83-bb01-410f-bde0-9c35abe4ca52
2.1.350 Part 4 Section 2.13.5.30, numberingChange (Previous Paragraph Numbering Properties)
nfc Value | ST_NumberFormat enumeration equivalent 
24 | ganada
25 | chosung
41 | koreanDigital
42 | koreanCounting
43 | koreanLegal
44 | koreanDigital2

Follow values are Korean Numbering reserved values.

Also, This document "[MS-DOCX]: Word Extensions to the Office Open XML (.docx) File Format" shows example of not only Korean Numbering also others Numbering examples. 
https://docs.microsoft.com/en-us/openspecs/office_standards/ms-docx/b839fe1f-e1ca-4fa6-8c26-5954d0abbccd
2.4 numFmt Extensions
https://docs.microsoft.com/en-us/openspecs/office_standards/ms-docx/a1bb5809-e361-4e49-8e16-7f1a67da4121

String Attribute | value
U+3131, U+3134, U+3137, ... | chosung
U+AC00, U+B098, U+B2E4, ... | ganada
U+C77C, U+C774, U+C0BC, ... koreanCounting
U+C77C, U+C77CU+C601, U+C77CU+C601U+C601, ... | koreanDigital
U+4E00, U+4E00U+96F6, U+4E00U+96F6U+96F6, ... | koreanDigital2
U+D558U+B098, U+B458, U+C14B, ...  | koreanLegal


I found some missing reserved Korean Numbering features on LibreOffice.
Examples are "KoreanCounting", "KoreanDigital2"
https://git.libreoffice.org/core/+/refs/heads/master/sw/source/filter/ww8/docxattributeoutput.cxx

Also, Some Numbering feature is wrong for "KoreanDigital" and "KoreanLegal"
(Fortunately, "chosung" and "ganada" is correct and works good.)

So, I'll register the Some Korean Numbering reserves are wrong and missing. 

koreanDigital doesn't reserved style::NumberingType::NUMBER_HANGUL_KO.
Also, koreanLegal doesn't reserved style::NumberingType::NUMBER_UPPER_KO.
Example) 
"koreanDigital" add new reserved words "일, 일영, 일영영, etc"
"koreanCounting" is mapping style::NumberingType::NUMBER_HANGUL_KO.
"koreanLegal" is new reserved words "하나, 둘, 셋, 넷, 다섯, 여섯, 일곱, 여덟, 아홉, 열"
"koreanDigital" is new reserved works "一, 一零, 一零零, etc"

Steps to Reproduce:
1. Change the MS word's Numbering feature "koreanLegal"
2. add numbering titles


Actual Results:
일.
이.
삼.
사.
오.
육.
칠.
팔.
구.
십.
십일.
십이.


Expected Results:
하나.
둘.
셋.
넷.
다섯.
여섯.
일곱.
여덟.
아홉.
열.
열하나.
열둘.


Reproducible: Always


User Profile Reset: No



Additional Info:
I think, These features can only modified and checked for Korean.
Comment 1 DaeHyun Sung 2021-07-24 09:58:25 UTC
Created attachment 173819 [details]
KoreanLegal mapping is wrong (compare with Word and LibreOffice)

KoreanLegal mapping is wrong (compare with Word and LibreOffice)

Left: MS Word(correct), Right: LibreOffice(wrong)
하나. | 일.
둘. | 이.
셋. | 삼.
넷. | 사.
다섯. | 오.
여섯. | 육.
일곱. | 칠.
여덟. | 팔.
아홉. | 구. 
열. | 십.
열하나. | 십일.
열둘. | 십이.
Comment 2 DaeHyun Sung 2021-07-24 10:00:16 UTC
Created attachment 173820 [details]
KoreanLegal mapping is wrong (compare with Word and LibreOffice)

KoreanLegal mapping is wrong (compare with Word and LibreOffice)

Left: MS Word(correct), Right: LibreOffice(wrong)
하나. | 일.
둘. | 이.
셋. | 삼.
넷. | 사.
다섯. | 오.
여섯. | 육.
일곱. | 칠.
여덟. | 팔.
아홉. | 구. 
열. | 십.
열하나. | 십일.
열둘. | 십이.
Comment 3 DaeHyun Sung 2021-07-24 10:01:54 UTC
Created attachment 173821 [details]
Example of Numbering - KoreanLegal on MS Word

Example of Numbering - KoreanLegal on MS Word
Comment 4 DaeHyun Sung 2021-07-26 14:11:01 UTC
Created attachment 173858 [details]
Example of Numbering - KoreanCounting on MS Word file

Example of Numbering - KoreanCounting on MS Word file

일. 1: 일 koreanCount
이. 2: 이 koreanCount
삼. 3: 삼 koreanCount
사. 4: 사 koreanCount
오. 5: 오 koreanCount
육. 6: 육 koreanCount
칠. 7: 칠 koreanCount
팔. 8: 팔 koreanCount
구. 9: 구 koreanCount
십. 10: 십 koreanCount
십일. 11: 십일 koreanCount
십이. 12: 십이 koreanCount
십삼. 13: 십삼 koreanCount
십사. 14: 십사 koreanCount
십오. 15: 십오 koreanCount
십육. 16: 십육 koreanCount
십칠. 17: 십칠 koreanCount
십팔. 18: 십팔 koreanCount
십구. 19: 십구 koreanCount
이십. 20: 이십 koreanCount
이십일. 21: 이십일 koreanCount
이십이. 22: 이십이 koreanCount
이십삼. 23: 이십삼 koreanCount
이십사. 24: 이십사 koreanCount
이십오. 25: 이십오 koreanCount
이십육. 26: 이십육 koreanCount
이십칠. 27: 이십칠 koreanCount
이십팔. 28: 이십팔 koreanCount
이십구. 29: 이십구 koreanCount
삼십. 30: 삼십 koreanCount
Comment 5 DaeHyun Sung 2021-07-26 14:16:50 UTC
Created attachment 173859 [details]
Example of Numbering - koreanDigital on MS Word file

Example of Numbering - koreanDigital on MS Word file

Num | Left(MS Word) | Right(LibreOffice - Wrong)
1. | 일. | 일.
2. | 이. | 이.
3. | 삼. | 삼.
4. | 사. | 사.
5. | 오. | 오.
6. | 육. | 육.
7. | 칠. | 칠.
8. | 팔. | 팔.
9. | 구. | 구.
10. | 일영. | 십.
11. | 일일. | 십일.
12. | 일이. | 십이.
13. | 일삼. | 십삼.
14. | 일사. | 십사.
15. | 일오. | 십오.
16. | 일육. | 십육.
17. | 일칠. | 십칠.
18. | 일팔. | 십팔. 
19. | 일구. | 십구. 
20. | 이영. | 이십.
Comment 6 DaeHyun Sung 2021-07-26 14:19:59 UTC
Created attachment 173860 [details]
Example of Numbering - koreanDigital2 on MS Word file

Example of Numbering - koreanDigital2 on MS Word file

Num | Left(MS Word) | Right(LibreOffice - Wrong)
1. | 一. | 일.
2. | 二. | 이.
3. | 三. | 삼.
4. | 四. | 사.
5. | 五. | 오.
6. | 六. | 육.
7. | 七. | 칠.
8. | 八. | 팔.
9. | 九. | 구.
10. | 一零. | 십.
11. | 一一. | 십일.
12. | 一二. | 십이.
13. | 一三. | 십삼.
14. | 一四. | 십사.
15. | 一五. | 십오.
16. | 一六. | 십육.
17. | 一七. | 십칠.
18. | 一八. | 십팔. 
19. | 一九. | 십구. 
20. | 二零. | 이십.
Comment 7 Roman Kuznetsov 2021-07-26 18:16:53 UTC
https://gerrit.libreoffice.org/c/core/+/119518
Comment 8 Commit Notification 2021-07-29 06:43:54 UTC
DaeHyun Sung committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4598a385ffaaf8fdc124962d347fead994450bea

tdf#143526 fix and add Korean numbering

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2021-07-29 16:51:14 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c186d09f88d6a4992382a1d15b60db6dbed3a91b

Add NumberingIdentifier unit test, tdf#143526 related

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2021-07-29 21:40:42 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ac80ec817eb07c77a51bc0729985a473c734182e

Make duplicate generated numbering identifiers unique, tdf#143526 follow-up

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2021-08-19 17:11:19 UTC
DaeHyun Sung committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9c13f1ad6384ee05a10ed688b93a46f6489a872a

tdf#143526 add Korean Numbering test case & fix Hanja number codepoint

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2021-08-26 15:43:33 UTC
DaeHyun Sung committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c216777e8add833be5ee49bc98197ea21cbb4da0

tdf#143526 Korean numbering import/export support

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Xisco Faulí 2022-05-03 12:26:31 UTC
A polite ping to DaeHyun Sung:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ?
Otherwise, Could you please explain what's missing?
Thanks
Comment 14 DaeHyun Sung 2022-05-07 07:02:35 UTC
It is already Fixed. 
Sorry.I forgot to check because I was busy.
I was late for the confirmation due to various reasons, such as changing jobs and getting married from late 2021 to 2022.