summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfexport
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2021-08-02 14:39:27 +0200
committerJustin Luth <justin_luth@sil.org>2021-08-04 06:04:04 +0200
commitd03aaef3dcb5d142955457ae9b8ca4469cfafa38 (patch)
tree5bab68b1509ed83a6a2f07a25fad9c10708377c8 /sw/qa/extras/odfexport
parentfc0a31f30154c7c5aabb9f0367a10ee14c82821a (diff)
Revert "tdf#104254 sw DOCX import: fix text wrapping in headers"
This reverts commit 798b69087119c01a3b51e0bb3240ef35cfededeb. The change affected not only DOCX compatibilityMode 15, but also DOC and ODT and older versions of DOC and everything else which should not have been affected. This reverted change of course affected layout. Some bug documents didn't loop after this layout breakage. That doesn't mean that those bugs were fixed. So just revert the tests: Revert "tdf#96840: sw_ww8export3: Add unittest" This reverts commit 975488594fc88aaba7298448e0ff727ebca7fe85. Revert "tdf#64997: sw_ww8export3: Add unittest" This reverts commit 02af9b8ef1f87bb6bc5fee22ad184681b20f201a. Change-Id: I54f7b801199bba45d8ca6f82f77e7060c7b3fcf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119887 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras/odfexport')
-rw-r--r--sw/qa/extras/odfexport/data/tdf104254_noHeaderWrapping.odtbin0 -> 63167 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport2.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/tdf104254_noHeaderWrapping.odt b/sw/qa/extras/odfexport/data/tdf104254_noHeaderWrapping.odt
new file mode 100644
index 000000000000..06dde4802b43
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf104254_noHeaderWrapping.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx
index 0812f2c801e3..db2110c612a0 100644
--- a/sw/qa/extras/odfexport/odfexport2.cxx
+++ b/sw/qa/extras/odfexport/odfexport2.cxx
@@ -39,6 +39,16 @@ DECLARE_ODFEXPORT_TEST(testTdf52065_centerTabs, "testTdf52065_centerTabs.odt")
CPPUNIT_ASSERT_EQUAL(OUString(u"Pečiatka zamestnávateľa"), parseDump("//body/txt[4]/Text[4]", "Portion"));
}
+DECLARE_ODFEXPORT_TEST(testTdf104254_noHeaderWrapping, "tdf104254_noHeaderWrapping.odt")
+{
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ sal_Int32 nParaHeight = getXPath(pXmlDoc, "//header/txt[1]/infos/bounds", "height").toInt32();
+ // The wrapping on header images is supposed to be ignored (since OOo for MS compat reasons),
+ // thus making the text run underneath the image. Before, height was 1104. Now it is 552.
+ CPPUNIT_ASSERT_MESSAGE("Paragraph should fit on a single line", nParaHeight < 600);
+}
+
DECLARE_ODFEXPORT_TEST(testTdf137199, "tdf137199.docx")
{
CPPUNIT_ASSERT_EQUAL(OUString(">1<"), getProperty<OUString>(getParagraph(1), "ListLabelString"));