diff options
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf120338.docx | bin | 0 -> 14898 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 7 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter2.cxx | 11 |
3 files changed, 18 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf120338.docx b/sw/qa/extras/ooxmlexport/data/tdf120338.docx Binary files differnew file mode 100644 index 000000000000..94e0023cea7f --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf120338.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 3fd1ae58f84b..25ed3a744e46 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -869,6 +869,13 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf115212, "tdf115212.docx") assertXPath(pXmlDoc, "//w:p[2]/w:del[1]/w:r[1]/w:fldChar"); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf126243, "tdf120338.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + // export change tracking rejection data for tracked paragraph style change + assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:pPrChange/w:pPr/w:pStyle", "val", "Heading 3"); +} + DECLARE_OOXMLEXPORT_TEST(testTdf118691, "tdf118691.docx") { uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx index 64352b08f5fd..b0c08917e787 100644 --- a/sw/qa/extras/uiwriter/uiwriter2.cxx +++ b/sw/qa/extras/uiwriter/uiwriter2.cxx @@ -1665,6 +1665,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf120338) CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(getParagraph(5), "ParaAdjust")); // right + CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"), + getProperty<OUString>(getParagraph(10), "ParaStyleName")); + CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"), + getProperty<OUString>(getParagraph(11), "ParaStyleName")); + // reject tracked paragraph adjustments lcl_dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {}); @@ -1676,6 +1681,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf120338) getProperty<sal_Int32>(getParagraph(4), "ParaAdjust")); // center CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraph(5), "ParaAdjust")); // left + + // tdf#126243 revert paragraph styles + CPPUNIT_ASSERT_EQUAL(OUString("Standard"), + getProperty<OUString>(getParagraph(10), "ParaStyleName")); + CPPUNIT_ASSERT_EQUAL(OUString("Heading 3"), + getProperty<OUString>(getParagraph(11), "ParaStyleName")); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |