[Libreoffice-commits] core.git: sw/qa sw/source

Mark Hung marklh9 at gmail.com
Wed Jul 11 15:45:04 UTC 2018


 sw/qa/extras/ww8export/data/tdf118564.doc |binary
 sw/qa/extras/ww8export/ww8export.cxx      |    6 ++++++
 sw/source/filter/ww8/ww8par3.cxx          |    4 ++--
 3 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 4dfc014cb3838b61faef32991c8083787ee6d60c
Author: Mark Hung <marklh9 at gmail.com>
Date:   Sat Jul 7 23:37:59 2018 +0800

    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 at gmail.com>

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
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf118564.doc 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;


More information about the Libreoffice-commits mailing list