sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
New commits: commit 50ecf0f53aabb204df00b052a442def33dd16028 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu Oct 27 20:09:37 2022 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Oct 28 08:07:47 2022 +0200 CppunitTest_sw_ooxmlexport: use more SwParaPortion::dumpAsXml() See commit feeed3e762cf077fbd9cf48f82e949365108ccc1 (CppunitTest_sw_layoutwriter: avoid some a11y-based layout testing, 2022-04-07) for motivation. Change-Id: Ie0fdfb333ecb14ce8c015d3bd1750f9b16ce4d5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141944 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index c10290269305..468b60dee8c1 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -437,11 +437,11 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf106541_noinheritChapterNumbering) CPPUNIT_ASSERT_EQUAL(sPara3NumberingStyle, getProperty<OUString>(getParagraph(4), "NumberingStyleName")); xmlDocUniquePtr pXmlDoc = parseLayoutDump(); - assertXPath(pXmlDoc, "//body/txt/Special", 3); //three of the four paragraphs have numbering - assertXPath(pXmlDoc, "//body/txt[1]/Special", "rText", "1"); - assertXPath(pXmlDoc, "//body/txt[2]/Special", 0); //second paragraph style disables numbering - assertXPath(pXmlDoc, "//body/txt[3]/Special", "rText", "I."); - assertXPath(pXmlDoc, "//body/txt[4]/Special", "rText", "II."); + assertXPath(pXmlDoc, "//body/txt/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']", 3); //three of the four paragraphs have numbering + assertXPath(pXmlDoc, "//body/txt[1]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']", "expand", "1"); + assertXPath(pXmlDoc, "//body/txt[2]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']", 0); //second paragraph style disables numbering + assertXPath(pXmlDoc, "//body/txt[3]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']", "expand", "I."); + assertXPath(pXmlDoc, "//body/txt[4]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']", "expand", "II."); } DECLARE_OOXMLEXPORT_TEST(testTdf53856_conflictingStyle, "tdf53856_conflictingStyle.docx") @@ -859,7 +859,7 @@ DECLARE_OOXMLEXPORT_TEST(testNumOverrideLvltext, "num-override-lvltext.docx") CPPUNIT_ASSERT_EQUAL(OUString("1.1"), getProperty<OUString>(xPara, "ListLabelString")); // The paragraph marker's red font color was inherited by the number portion, this was ff0000. - CPPUNIT_ASSERT_EQUAL(OUString("ffffffff"), parseDump("//Special[@nType='PortionType::Number']/SwFont", "color")); + CPPUNIT_ASSERT_EQUAL(OUString("ffffffff"), parseDump("//SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']", "font-color")); } DECLARE_OOXMLEXPORT_TEST(testNumOverrideStart, "num-override-start.docx")