summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2018-07-07 23:37:59 +0800
committerMark Hung <marklh9@gmail.com>2018-07-11 17:44:38 +0200
commit4dfc014cb3838b61faef32991c8083787ee6d60c (patch)
treed10b2ca3ca514281f736d0d1f8b35c0172c92c69
parentd0acd56420625133a2e5622f44932e439b2cf95d (diff)
tdf#118564 sw/ww8filter - map NFC 11 to SVX_NUM_NUMBER_LOWER_ZH.
The attribute name of the numbering format code 11 is "japaneseCounting" [1]. Although it seemd like a Japanese counting guessing from its name, it's actually use the same characters used by Chinese lower numbers [2]. Ref: [1]https://msdn.microsoft.com/en-us/library/dd923798(v=office.12).aspx [2]https://msdn.microsoft.com/en-us/library/dd772856(v=office.12).aspx Change-Id: I241be1e5e118197207cbc51334272b532e23c25f Reviewed-on: https://gerrit.libreoffice.org/57138 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
-rwxr-xr-xsw/qa/extras/ww8export/data/tdf118564.docbin0 -> 28160 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx4
3 files changed, 8 insertions, 2 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf118564.doc b/sw/qa/extras/ww8export/data/tdf118564.doc
new file mode 100755
index 000000000000..4040e05e27bf
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf118564.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 5e46c38ea337..a53525a5ece7 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -1129,6 +1129,12 @@ DECLARE_WW8EXPORT_TEST(testWw8Cjklist35, "cjklist35.doc")
CPPUNIT_ASSERT_EQUAL(style::NumberingType::NUMBER_LOWER_ZH, numFormat);
}
+DECLARE_WW8EXPORT_TEST(testTdf118564, "tdf118564.doc")
+{
+ sal_Int16 numFormat = getNumberingTypeOfParagraph(3);
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::NUMBER_LOWER_ZH, numFormat);
+}
+
DECLARE_WW8EXPORT_TEST(testTdf92281, "tdf92281.doc")
{
uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1),1), uno::UNO_QUERY);
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 5c0bee451514..b7149da0ae4c 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -761,11 +761,11 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, std::unique_ptr<SfxItemSet
case 35:
case 36:
case 37:
+ case 11:
case 39:nType = SVX_NUM_NUMBER_LOWER_ZH; break;
case 34:nType = SVX_NUM_NUMBER_UPPER_ZH_TW; break;
case 38:nType = SVX_NUM_NUMBER_UPPER_ZH; break;
- case 10:
- case 11:nType = SVX_NUM_NUMBER_TRADITIONAL_JA; break;
+ case 10:nType = SVX_NUM_NUMBER_TRADITIONAL_JA; break;
case 20:nType = SVX_NUM_AIU_FULLWIDTH_JA; break;
case 12:nType = SVX_NUM_AIU_HALFWIDTH_JA; break;
case 21:nType = SVX_NUM_IROHA_FULLWIDTH_JA; break;