From a09fc7dd097357b60931739b6ed281a0b931aa73 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Mon, 13 Mar 2017 08:35:00 +0300 Subject: ooxmlimport: move tdf#55381 unit test to ooxmlexport MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This test wasn't round-trippable because the page breaks were all lost, and all of the frames ended up on page 1. fixed in 5.3 daily debug bibisect 12a5c2be4d64199c6540969c645118112084a639 best guess: author Tamás Zolnai 2016-10-28 14:10:41 (GMT) best guess: commit b927c1f4b334f80d2c2965e5b7327d6b6a685105 tdf#103544: DOCX exp.: Image loss when have a frame anchored to the same para. This doc still needs some work - the frames are shifted backwards one page, so frame 1 is on page 2 and the last page contains two frames. Change-Id: I512c1d66b742b29f1a9fe8644355f3d9df5ed1f1 Reviewed-on: https://gerrit.libreoffice.org/35127 Tested-by: Jenkins Reviewed-by: Justin Luth --- sw/qa/extras/ooxmlexport/data/fdo55381.docx | Bin 0 -> 4710 bytes sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 10 ++++++++++ sw/qa/extras/ooxmlimport/data/fdo55381.docx | Bin 4710 -> 0 bytes sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 9 --------- 4 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 sw/qa/extras/ooxmlexport/data/fdo55381.docx delete mode 100644 sw/qa/extras/ooxmlimport/data/fdo55381.docx diff --git a/sw/qa/extras/ooxmlexport/data/fdo55381.docx b/sw/qa/extras/ooxmlexport/data/fdo55381.docx new file mode 100644 index 000000000000..ffeae1f874eb Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo55381.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index d60b3320d23c..176c9180a29a 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -37,6 +37,16 @@ protected: } }; +DECLARE_OOXMLEXPORT_TEST(testFdo55381, "fdo55381.docx") +{ + uno::Reference xModel(mxComponent, uno::UNO_QUERY); + uno::Reference xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY); + uno::Reference xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY); + xCursor->jumpToLastPage(); + CPPUNIT_ASSERT_EQUAL(sal_Int16(4), xCursor->getPage()); + //TODO: frames not located on the correct pages +} + DECLARE_OOXMLEXPORT_TEST(testTdf92045, "tdf92045.docx") { // This was true, resulted in setting the blinking font effect. diff --git a/sw/qa/extras/ooxmlimport/data/fdo55381.docx b/sw/qa/extras/ooxmlimport/data/fdo55381.docx deleted file mode 100644 index ffeae1f874eb..000000000000 Binary files a/sw/qa/extras/ooxmlimport/data/fdo55381.docx and /dev/null differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index bbc8ef0fa8d5..367b894a08d7 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -873,15 +873,6 @@ DECLARE_OOXMLIMPORT_TEST(testFdo75722dml, "fdo75722-dml.docx") CPPUNIT_ASSERT_EQUAL(sal_Int64(3128), nRot); } -DECLARE_OOXMLIMPORT_TEST(testFdo55381, "fdo55381.docx") -{ - uno::Reference xModel(mxComponent, uno::UNO_QUERY); - uno::Reference xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY); - uno::Reference xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY); - xCursor->jumpToLastPage(); - CPPUNIT_ASSERT_EQUAL(sal_Int16(4), xCursor->getPage()); -} - DECLARE_OOXMLIMPORT_TEST(testFdo76803, "fdo76803.docx") { // The ContourPolyPolygon was wrong -- cgit v1.2.3