diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ww8export/data/arabic-zero-numbering.doc | bin | 0 -> 10752 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export3.cxx | 13 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8num.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 4 |
4 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/data/arabic-zero-numbering.doc b/sw/qa/extras/ww8export/data/arabic-zero-numbering.doc Binary files differnew file mode 100644 index 000000000000..c198c4aa44d0 --- /dev/null +++ b/sw/qa/extras/ww8export/data/arabic-zero-numbering.doc diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index af21711d0136..5900892cadf6 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -52,6 +52,19 @@ DECLARE_WW8EXPORT_TEST(testTdf37778_readonlySection, "tdf37778_readonlySection.d CPPUNIT_ASSERT(drawing::FillStyle_NONE != getProperty<drawing::FillStyle>(xStyle, "FillStyle")); } +DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.doc") +{ + auto xNumberingRules + = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules"); + comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0)); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 64 + // - Actual : 4 + // i.e. numbering type was ARABIC, not ARABIC_ZERO. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO), + aMap["NumberingType"].get<sal_uInt16>()); +} + DECLARE_WW8EXPORT_TEST(testTdf122429_header, "tdf122429_header.doc") { uno::Reference<container::XNameAccess> pageStyles = getStyles("PageStyles"); diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index 21e3b96e1559..49e2eb8f4bc5 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -290,6 +290,10 @@ static sal_uInt8 GetLevelNFC( sal_uInt16 eNumType, const SfxItemSet *pOutSet) case style::NumberingType::NUMBER_HANGUL_KO: nRet = 41; break; case style::NumberingType::NUMBER_UPPER_KO: nRet = 44; break; case SVX_NUM_NUMBER_NONE: nRet = 0xff; break; + case SVX_NUM_ARABIC_ZERO: + // 0x16, msonfcArabicLZ + nRet = 22; + break; } return nRet; } diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index d95fe07d4f80..118764b4d73d 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -763,6 +763,10 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, std::unique_ptr<SfxItemSet // actually: ORDINAL nType = SVX_NUM_ARABIC; break; + case 22: + // 0x16, msonfcArabicLZ + nType = SVX_NUM_ARABIC_ZERO; + break; case 23: nType = SVX_NUM_CHAR_SPECIAL; //For i120928,type info |