summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2023-12-13 20:25:53 -0500
committerMiklos Vajna <vmiklos@collabora.com>2023-12-19 09:04:06 +0100
commitcf58950b281c85c366e0948557151a0fe104ed81 (patch)
treeace6fabc4ae35d278fa50969bea0f2d029f7d6ce /sw
parent940b60c903b11340979eaf37b9b1dad5d823a1c4 (diff)
partial revert tdf#153178 writerfilter: do not create text frame spuriously2
If HoriAlign/VertAlign are defined, that is enough to create a frame. This fixes mstahl's 7.6.4 regression originating with commit 4e2f2489c4c7436f8b3a21a530bc625cbef4e365 make CppunitTest_sw_rtfexport8 CPPUNIT_TEST_NAME=testTdf158586_lostFrame Change-Id: Ibb639673cebcd8d5ec79f5551a5703caf948e0d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160744 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfexport/data/tdf158586_lostFrame.rtf17
-rw-r--r--sw/qa/extras/rtfexport/rtfexport8.cxx11
2 files changed, 28 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/tdf158586_lostFrame.rtf b/sw/qa/extras/rtfexport/data/tdf158586_lostFrame.rtf
new file mode 100644
index 000000000000..cedfd81a1dd8
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf158586_lostFrame.rtf
@@ -0,0 +1,17 @@
+{\rtf1
+
+\paperw8419\paperh5953
+
+\spltpgpar
+
+\ltrpar \sectd
+
+\pard\plain \posxc\posyc First page textbox \par
+\pard 1st page
+
+
+\page \sect \sectd \sbknone
+
+\pard\plain 2nd page
+\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport8.cxx b/sw/qa/extras/rtfexport/rtfexport8.cxx
index bcba0a9beb97..f8d800380cba 100644
--- a/sw/qa/extras/rtfexport/rtfexport8.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport8.cxx
@@ -73,6 +73,17 @@ DECLARE_RTFEXPORT_TEST(testTdf158586_1, "tdf158586_pageBreak1.rtf")
// assertXPathContent(pLayout, "//page[2]/body/txt"_ostr, "Second page");
}
+DECLARE_RTFEXPORT_TEST(testTdf158586_lostFrame, "tdf158586_lostFrame.rtf")
+{
+ // The anchor and align properties are sufficient to define a frame
+ const auto& pLayout = parseLayoutDump();
+ assertXPath(pLayout, "//anchored"_ostr, 1);
+ assertXPathContent(pLayout, "//page[1]/body//txt"_ostr, "1st page");
+ // assertXPathContent(pLayout, "//page[2]/body//txt"_ostr, "2nd page");
+
+ // CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */