Issue 125400 - CJK numbering ordered list fallback to Arabic numerals
Summary: CJK numbering ordered list fallback to Arabic numerals
Status: RESOLVED FIXED
Alias: None
Product: Writer
Classification: Application
Component: open-import (show other issues)
Version: 4.2.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.1.15
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-10 16:37 UTC by Mark Hung
Modified: 2023-03-02 15:25 UTC (History)
6 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Original numbering in a docx file in MSO (15.93 KB, image/png)
2014-08-10 16:37 UTC, Mark Hung
no flags Details
Chinese numbering fallback to Arabic numerals in AOO (29.79 KB, image/png)
2014-08-10 16:39 UTC, Mark Hung
no flags Details
Test case. (11.74 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-08-10 16:41 UTC, Mark Hung
no flags Details
Patch for fixing the issue. (776 bytes, patch)
2014-08-10 16:43 UTC, Mark Hung
no flags Details | Diff
Patch to filters for Chinese(ZH-TW) numbering issues (6.12 KB, text/plain)
2014-08-16 00:12 UTC, Mark Hung
no flags Details
Patch for Chinese(ZH-TW) numbering issues (6.12 KB, patch)
2014-08-16 00:21 UTC, Mark Hung
no flags Details | Diff
Patch for Chinese(ZH-TW) numbering issues (7.92 KB, patch)
2014-08-26 15:17 UTC, Mark Hung
no flags Details | Diff
Explain for the test case. (141.52 KB, image/png)
2014-08-27 13:41 UTC, Mark Hung
no flags Details
Complete test cases explain (755.96 KB, application/vnd.oasis.opendocument.text)
2014-08-28 15:08 UTC, Mark Hung
no flags Details
All test cases(zipped) (36.30 KB, application/x-zip-compressed)
2014-08-28 15:10 UTC, Mark Hung
no flags Details
Patch for CJK numbering issues. (10.76 KB, patch)
2014-09-19 16:43 UTC, Mark Hung
no flags Details | Diff
Patch for fixing CJK numbered list. (21.35 KB, patch)
2014-11-26 11:23 UTC, Mark Hung
marklh9: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Mark Hung 2014-08-10 16:37:55 UTC
Created attachment 83808 [details]
Original numbering in a docx file in MSO

Chinese numbering in docx fallback to Arabic numerals.

This issue is specific to the docx files created by traditional Chinese version of MSO that were used in taiwan. More specifically, taiwaneseCountingThousand of w:numfmt attribute in ooxml is ignored.
Comment 1 Mark Hung 2014-08-10 16:39:24 UTC
Created attachment 83809 [details]
Chinese numbering fallback to Arabic numerals in AOO
Comment 2 Mark Hung 2014-08-10 16:41:03 UTC
Created attachment 83810 [details]
Test case.
Comment 3 Mark Hung 2014-08-10 16:43:45 UTC
Created attachment 83811 [details]
Patch for fixing the issue.
Comment 4 Mark Hung 2014-08-16 00:12:31 UTC
Created attachment 83840 [details]
Patch to filters for Chinese(ZH-TW) numbering issues
Comment 5 Mark Hung 2014-08-16 00:21:01 UTC
Created attachment 83841 [details]
Patch for Chinese(ZH-TW) numbering issues

Check 'patch' field. Following Chinese(ZH-TW) issues were fixed:

* RTF import 
* doc import and export
* docx import
Comment 6 Steve Yin 2014-08-26 09:38:16 UTC
(In reply to Mark Hung from comment #5)
> Created attachment 83841 [details]
> Patch for Chinese(ZH-TW) numbering issues
> 
> Check 'patch' field. Following Chinese(ZH-TW) issues were fixed:
> 
> * RTF import 
> * doc import and export
> * docx import

Hi Mark,

I applied your patch and found that the issue was not fixed. Can you check it?
Comment 7 Steve Yin 2014-08-26 10:10:36 UTC
(In reply to Steve Yin from comment #6)
> (In reply to Mark Hung from comment #5)
> > Created attachment 83841 [details]
> > Patch for Chinese(ZH-TW) numbering issues
> > 
> > Check 'patch' field. Following Chinese(ZH-TW) issues were fixed:
> > 
> > * RTF import 
> > * doc import and export
> > * docx import
> 
> Hi Mark,
> 
> I applied your patch and found that the issue was not fixed. Can you check
> it?

Sorry, I mixed it up with i125495.

This patch works.
Comment 8 Steve Yin 2014-08-26 10:31:49 UTC
There are two cases which cannot identify ZH-TW and ZH-CN. It seems that a new definition is needed.
Comment 9 Mark Hung 2014-08-26 15:17:05 UTC
Created attachment 83890 [details]
Patch for Chinese(ZH-TW) numbering issues


* RTF import 
* RTF export
* doc import and export
* docx import

Update supports to RTF export. Also export SVX_NUM_NUMBER_LOWER_ZH based on application language setting. Map to 39 if LANGUAGE_CHINESE_SIMPLIFIED and 35 otherwise.

Note that there are several Chinese numbering type in MSO that has minor difference, and is not implemented in AOO. For example, a circle that represent zero were used in some cases. They are inevitably all mapped to SVX_NUM_NUMBER_LOWER_ZH and are not able to mapped back again. So I'd advice to accept current implementation unless any side effects are found.

If it is possible to find Japanese testers, we can improve it further. They are all the same.
Comment 10 Steve Yin 2014-08-27 06:16:30 UTC
(In reply to Mark Hung from comment #9)
> Created attachment 83890 [details]
> Patch for Chinese(ZH-TW) numbering issues
> 
> 
> * RTF import 
> * RTF export
> * doc import and export
> * docx import
> 
> Update supports to RTF export. Also export SVX_NUM_NUMBER_LOWER_ZH based on
> application language setting. Map to 39 if LANGUAGE_CHINESE_SIMPLIFIED and
> 35 otherwise.
> 
> Note that there are several Chinese numbering type in MSO that has minor
> difference, and is not implemented in AOO. For example, a circle that
> represent zero were used in some cases. They are inevitably all mapped to
> SVX_NUM_NUMBER_LOWER_ZH and are not able to mapped back again. So I'd advice
> to accept current implementation unless any side effects are found.
> 
> If it is possible to find Japanese testers, we can improve it further. They
> are all the same.

Thanks for fixing RTF export.

I found the patch did not work for docx import.
Comment 11 Oliver-Rainer Wittmann 2014-08-27 11:05:04 UTC
I will also have a look at this issue.
Comment 12 Mark Hung 2014-08-27 13:41:47 UTC
Created attachment 83894 [details]
Explain for the test case.

Note that improvement for docx import is only for LOWER_NUMBER_ZH and FULL_WIDTH_NUMBER.
Comment 13 Mark Hung 2014-08-28 15:08:43 UTC
Created attachment 83900 [details]
Complete test cases explain
Comment 14 Mark Hung 2014-08-28 15:10:32 UTC
Created attachment 83901 [details]
All test cases(zipped)
Comment 15 Steve Yin 2014-09-16 08:34:59 UTC
@Oliver: any comments?
Comment 16 Mark Hung 2014-09-19 16:42:19 UTC
See also https://issues.apache.org/ooo/show_bug.cgi?id=69855
Comment 17 Mark Hung 2014-09-19 16:43:25 UTC
Created attachment 83968 [details]
Patch for CJK numbering issues.

This patch includes Japanese & Korean numbering.
Comment 18 Mark Hung 2014-11-22 09:18:19 UTC
Hi Developers, 

What's happening? 
Is there anyone working on verifying or merging the patch? 
Do I need to improve anything or provide any information
 in order to get it merged?
Comment 19 Steve Yin 2014-11-25 03:19:32 UTC
(In reply to Mark Hung from comment #18)
> Hi Developers, 
> 
> What's happening? 
> Is there anyone working on verifying or merging the patch? 
> Do I need to improve anything or provide any information
>  in order to get it merged?

Hi Mark,

Sorry for the late reply. Something changes in the community... I will check them in. Thank you for your contribution again!
Comment 20 Mark Hung 2014-11-25 05:32:33 UTC
hi Steve,

Thank you.  After months passed, I've done submitting similar fix to LibreOffice 

https://gerrit.libreoffice.org/#/c/12252/

I'd like to take some time to update patch I submitted here, especially for coding style and differentiating simplified Chinese and traditional Chinese. Would you suggest that I just obsolte patch here, or wait for you to merge the code first?
Comment 21 Steve Yin 2014-11-25 10:35:41 UTC
(In reply to Mark Hung from comment #20)
> hi Steve,
> 
> Thank you.  After months passed, I've done submitting similar fix to
> LibreOffice 
> 
> https://gerrit.libreoffice.org/#/c/12252/
> 
> I'd like to take some time to update patch I submitted here, especially for
> coding style and differentiating simplified Chinese and traditional Chinese.
> Would you suggest that I just obsolte patch here, or wait for you to merge
> the code first?

Hi Mark,

I found that you and other contributors made some improvements on this patch. So my suggestion is that you can obsolete the old patch and update a new patch. Then I will deliver your latest patch in the trunk. Thanks.
Comment 22 Mark Hung 2014-11-26 11:23:48 UTC
Created attachment 84246 [details]
Patch for fixing CJK numbered list.


Update patch. This patch differs from previous patches in  (a)code clean up (b)Export NUMBER_LOWER_ZH as differnt values of Simplified Chinese or Traditional Chinese based on language setting.
Comment 23 Steve Yin 2014-11-27 10:16:34 UTC
Hi Mark,

Thanks. I will take care of it. :)
Comment 24 Steve Yin 2014-11-28 15:35:38 UTC
The patch is OK. UT passed.
Comment 25 SVN Robot 2014-11-28 15:45:45 UTC
"steve_y" committed SVN revision 1642310 into trunk:
Issue 125400 - CJK numbering ordered list fallback to Arabic numerals
Comment 26 Matthias Seidel 2023-03-02 15:25:28 UTC
Cherry-picked for AOO41X with:
https://github.com/apache/openoffice/commit/c43a074bcb3028e78ea20162afdadb1ff1448427