summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2018-12-29 08:31:20 +0300
committerJustin Luth <justin_luth@sil.org>2018-12-29 11:38:00 +0100
commit7815b4d2a2c89261ad6424c7fe3ce0c453e4d02c (patch)
treecd52c899c81c84034a26109ba5103f5fb63eb4df /sw/qa/extras/ooxmlexport
parent648f24f5d1dae3f0fd5b132d68a5e39066f2572d (diff)
tdf#113849 ooxmlexport: even headers/footers for both or none.
For DOCX, there is a single setting to indicate the use of even headers/footers. So, if either one of these has a separate even, then create an even for both. In 2017, nBreakCode was used to write an empty footer to prevent inheriting any previously defined footer. So I also removed the obsolete debug. Change-Id: I3ec4a399103679092e6a6ec3a7ae9b1ae303cc3e Reviewed-on: https://gerrit.libreoffice.org/65699 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa/extras/ooxmlexport')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf113849_evenAndOddHeaders.odtbin0 -> 24355 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx17
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf113849_evenAndOddHeaders.odt b/sw/qa/extras/ooxmlexport/data/tdf113849_evenAndOddHeaders.odt
new file mode 100644
index 000000000000..d9aa0ae23541
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf113849_evenAndOddHeaders.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 986414ff64a6..66599999f9a4 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -203,6 +203,23 @@ DECLARE_OOXMLEXPORT_TEST(testTdf112694, "tdf112694.docx")
CPPUNIT_ASSERT(!getProperty<bool>(aPageStyle, "HeaderIsOn"));
}
+DECLARE_OOXMLEXPORT_TEST(testTdf113849_evenAndOddHeaders, "tdf113849_evenAndOddHeaders.odt")
+{
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Header2 text", OUString("L. J. Kendall"), parseDump("/root/page[2]/header/txt"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Footer2 text", OUString("*"), parseDump("/root/page[2]/footer/txt"));
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Header3 text", OUString("Shadow Hunt"), parseDump("/root/page[3]/header/txt"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Footer3 text", OUString("*"), parseDump("/root/page[3]/footer/txt"));
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Header4 text", OUString("L. J. Kendall"), parseDump("/root/page[4]/header/txt"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Footer4 text", OUString("*"), parseDump("/root/page[4]/footer/txt"));
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Footer5 text", OUString(""), parseDump("/root/page[5]/footer/txt"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Footer6 text", OUString(""), parseDump("/root/page[6]/footer/txt"));
+
+ //CPPUNIT_ASSERT_EQUAL_MESSAGE("Number of pages", 6, getPages() );
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf118361_RTLfootnoteSeparator, "tdf118361_RTLfootnoteSeparator.docx")
{
uno::Any aPageStyle = getStyles("PageStyles")->getByName("Standard");