From 6e260dbebc91f137d6f797dd10d64e53a063dc0b Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 8 Sep 2017 15:39:14 +0200 Subject: EPUB export: handle section content Just the minimum so content is not completely ignored on export. Change-Id: I2880780ed3ce5d1dd15adbd9222296f52a5e7c3d Reviewed-on: https://gerrit.libreoffice.org/42115 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- writerperfect/qa/unit/EPUBExportTest.cxx | 11 +++++++++++ writerperfect/qa/unit/data/writer/epubexport/section.fodt | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 writerperfect/qa/unit/data/writer/epubexport/section.fodt (limited to 'writerperfect/qa/unit') diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx index 06278d19eb81..706536c9423a 100644 --- a/writerperfect/qa/unit/EPUBExportTest.cxx +++ b/writerperfect/qa/unit/EPUBExportTest.cxx @@ -65,6 +65,7 @@ public: void testLineBreak(); void testEscape(); void testParaCharProps(); + void testSection(); CPPUNIT_TEST_SUITE(EPUBExportTest); CPPUNIT_TEST(testOutlineLevel); @@ -81,6 +82,7 @@ public: CPPUNIT_TEST(testLineBreak); CPPUNIT_TEST(testEscape); CPPUNIT_TEST(testParaCharProps); + CPPUNIT_TEST(testSection); CPPUNIT_TEST_SUITE_END(); }; @@ -362,6 +364,15 @@ void EPUBExportTest::testParaCharProps() assertCss(aCssDoc, aMiddle, " font-weight: bold;"); } +void EPUBExportTest::testSection() +{ + createDoc("section.fodt", {}); + + mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml"); + // This was "After.", i.e. in-section content was ignored. + assertXPathContent(mpXmlDoc, "//xhtml:p[2]/xhtml:span", "In section."); +} + CPPUNIT_TEST_SUITE_REGISTRATION(EPUBExportTest); } diff --git a/writerperfect/qa/unit/data/writer/epubexport/section.fodt b/writerperfect/qa/unit/data/writer/epubexport/section.fodt new file mode 100644 index 000000000000..84fb6d2ae940 --- /dev/null +++ b/writerperfect/qa/unit/data/writer/epubexport/section.fodt @@ -0,0 +1,12 @@ + + + + + Before. + + In section. + + After. + + + -- cgit