From 8a473fa08642485e73427ee6bf4cba95192c0264 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 15 Oct 2024 18:49:10 +0200 Subject: CppunitTest_sw_ooxmlexport12: remove dead code After calling loadAndSave, isExported always returns true Code added in 9e1e88ad5cf2dc0e9b188c60930445652a6c7519 "tdf#145720 DOCX export: fix loss of tracked moving" If it's changed to check the layout from parseLayoutDump instead of the export, it also fails Change-Id: I0f8248db44ab299c3b6a6ed0901357d6e153e1aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174979 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 40 ++++++++---------------------- 1 file changed, 10 insertions(+), 30 deletions(-) (limited to 'sw/qa') diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx index 138ee27c9789..7bd131cffc83 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx @@ -1563,21 +1563,11 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132271) loadAndSave("tdf149388.docx"); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // import change tracking in floating tables - if (!isExported()) - { - assertXPath(pXmlDoc, "//w:del", 2); - assertXPath(pXmlDoc, "//w:ins", 2); - assertXPath(pXmlDoc, "//w:moveFrom", 0); - assertXPath(pXmlDoc, "//w:moveTo", 0); - } - else - { - assertXPath(pXmlDoc, "//w:del", 1); - assertXPath(pXmlDoc, "//w:ins", 1); - // tracked text moving recognized during the import - assertXPath(pXmlDoc, "//w:moveFrom", 1); - assertXPath(pXmlDoc, "//w:moveTo", 1); - } + assertXPath(pXmlDoc, "//w:del", 1); + assertXPath(pXmlDoc, "//w:ins", 1); + // tracked text moving recognized during the import + assertXPath(pXmlDoc, "//w:moveFrom", 1); + assertXPath(pXmlDoc, "//w:moveTo", 1); } CPPUNIT_TEST_FIXTURE(Test, testTdf149388_fly) @@ -1598,21 +1588,11 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf136667) loadAndSave("tdf149388_fly.docx"); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); // import change tracking in floating tables - if (!isExported()) - { - assertXPath(pXmlDoc, "//w:del", 2); - assertXPath(pXmlDoc, "//w:ins", 4); - assertXPath(pXmlDoc, "//w:moveFrom", 0); - assertXPath(pXmlDoc, "//w:moveTo", 0); - } - else - { - assertXPath(pXmlDoc, "//w:del", 1); - assertXPath(pXmlDoc, "//w:ins", 3); - // tracked text moving recognized during the import - assertXPath(pXmlDoc, "//w:moveFrom", 1); - assertXPath(pXmlDoc, "//w:moveTo", 1); - } + assertXPath(pXmlDoc, "//w:del", 1); + assertXPath(pXmlDoc, "//w:ins", 3); + // tracked text moving recognized during the import + assertXPath(pXmlDoc, "//w:moveFrom", 1); + assertXPath(pXmlDoc, "//w:moveTo", 1); } CPPUNIT_TEST_FIXTURE(Test, testTdf136850) -- cgit