sw/qa/extras/ww8export/ww8export3.cxx | 3 +-- sw/source/filter/ww8/ww8par3.cxx | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit 27aedd8f7de6f94469ab515cf0ab0c7e85550efc Author: Justin Luth <justin_l...@sil.org> AuthorDate: Wed Jun 23 11:29:48 2021 +0200 Commit: Justin Luth <justin_l...@sil.org> CommitDate: Fri Jun 25 20:33:28 2021 +0200 tdf#104239 doc import: use "Outline" for m_pChosenWW8OutlineStyle This looks like it was a logic error. Probably they were only looking at the situation where the paragraph style set the numbering style to "Outline". Well, in this case, Heading 1 is actually not part of Chapter Numbering, but it was the body sprm that set the style. In any case, whenever the LFO chosen as the outline style is referenced, it should apply LO's special, unique and extremely troublesome "Outline" numbering style. Change-Id: I354d9b9f4a48abed3453ee046ddd63cda174f25d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117746 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_l...@sil.org> diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index 77c090f1f22d..087d66a6573c 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -815,10 +815,9 @@ DECLARE_WW8EXPORT_TEST(testTdf106541_inheritOutlineNumbering, "tdf106541_inherit DECLARE_WW8EXPORT_TEST(testTdf104239_sharedOutlineNumId, "tdf104239_sharedOutlineNumId.doc") { - // The list should show both level 1 and level 2 digits. It really ought to be "2.1." uno::Reference<beans::XPropertySet> xPara(getParagraph(5, "Principes"), uno::UNO_QUERY); // This was ".1." previously. - CPPUNIT_ASSERT(3 < getProperty<OUString>(xPara, "ListLabelString").getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("2.1."), getProperty<OUString>(xPara, "ListLabelString")); } DECLARE_WW8EXPORT_TEST(testTdf120394, "tdf120394.doc") diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 80bfebd68a61..a7a246d4952f 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1827,7 +1827,9 @@ void SwWW8ImplReader::RegisterNumFormatOnTextNode(sal_uInt16 nCurrentLFO, { // Now this is either not a part of Chapter Numbering, // or else it is using a different numRule than the one copied to Chapter Numbering. - pTextNd->SetAttr(SwNumRuleItem(pRule->GetName())); + OUString sName = pRule == m_pChosenWW8OutlineStyle ? m_rDoc.GetOutlineNumRule()->GetName() + : pRule->GetName(); + pTextNd->SetAttr(SwNumRuleItem(sName)); } pTextNd->SetAttrListLevel(nCurrentLevel); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits