summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2018-12-29 18:50:18 +0300
committerJustin Luth <justin_luth@sil.org>2018-12-29 19:25:58 +0100
commit6aeba04b31cc33135f84bd7ea38a04ee9faa14ec (patch)
tree0f8702b30148b16424a0c23bddcd489145cf1a3e /sw
parentc5ab681957283c6624a2380d994f556b0676757d (diff)
tdf#120511 writerfilter: track inserted frame per section
The logic using IsTextFrameInserted is worried about whether a frame has been inserted before a table *in this section*, so track frame's existence per section, not per document. Change-Id: I8aa8a695b89727832e65535adae3fc3c94f95be5 Reviewed-on: https://gerrit.libreoffice.org/65720 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf120511_eatenSection.docxbin0 -> 29319 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf120511_eatenSection.docx b/sw/qa/extras/ooxmlexport/data/tdf120511_eatenSection.docx
new file mode 100644
index 000000000000..6a6d6f17bae7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf120511_eatenSection.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 66599999f9a4..4b0d7bd8d1d7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -462,6 +462,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113258_noBeforeAutospacing, "tdf113258_noBeforeA
getProperty<sal_Int32>(xShape->getStart(), "ParaTopMargin"));
}
+DECLARE_OOXMLEXPORT_TEST(testTdf120511_eatenSection, "tdf120511_eatenSection.docx")
+{
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nHeight = getXPath(pXmlDoc, "/root/page[1]/infos/prtBounds", "height").toInt32();
+ sal_Int32 nWidth = getXPath(pXmlDoc, "/root/page[1]/infos/prtBounds", "width").toInt32();
+ CPPUNIT_ASSERT_MESSAGE( "Page1 is portrait", nWidth < nHeight );
+ nHeight = getXPath(pXmlDoc, "/root/page[2]/infos/prtBounds", "height").toInt32();
+ nWidth = getXPath(pXmlDoc, "/root/page[2]/infos/prtBounds", "width").toInt32();
+ CPPUNIT_ASSERT_MESSAGE( "Page2 is landscape", nWidth > nHeight );
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf104354, "tdf104354.docx")
{
uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);