diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-01 10:54:51 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-01 16:30:04 +0100 |
commit | ab7bdd1f91a7e6e25854601cca712488554ab960 (patch) | |
tree | 110157779e7bf585c863f981a7095f6f0d3581e4 /writerperfect/qa/unit | |
parent | 6af2cd34404ef6b19fb218931de0b42a2731c57f (diff) |
EPUB export: initial fixed layout support
This is just the bare minimum that is already a fixed layout and is
valid.
Change-Id: I64e1216d92125377d7836988586da9ea1d878536
Reviewed-on: https://gerrit.libreoffice.org/45643
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerperfect/qa/unit')
-rw-r--r-- | writerperfect/qa/unit/EPUBExportTest.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx index 335347de60ff..a9692bc2c293 100644 --- a/writerperfect/qa/unit/EPUBExportTest.cxx +++ b/writerperfect/qa/unit/EPUBExportTest.cxx @@ -57,6 +57,7 @@ public: void testOutlineLevel(); void testMimetype(); void testEPUB2(); + void testEPUBFixedLayout(); void testPageBreakSplit(); void testSpanAutostyle(); void testParaAutostyleCharProps(); @@ -96,6 +97,7 @@ public: CPPUNIT_TEST(testOutlineLevel); CPPUNIT_TEST(testMimetype); CPPUNIT_TEST(testEPUB2); + CPPUNIT_TEST(testEPUBFixedLayout); CPPUNIT_TEST(testPageBreakSplit); CPPUNIT_TEST(testSpanAutostyle); CPPUNIT_TEST(testParaAutostyleCharProps); @@ -292,6 +294,20 @@ void EPUBExportTest::testEPUB2() assertXPath(mpXmlDoc, "/opf:package", "version", "2.0"); } +void EPUBExportTest::testEPUBFixedLayout() +{ + uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence( + { + // Explicitly request fixed layout. + {"EPUBLayoutMethod", uno::makeAny(static_cast<sal_Int32>(libepubgen::EPUB_LAYOUT_METHOD_FIXED))} + })); + createDoc("hello.fodt", aFilterData); + + mpXmlDoc = parseExport("OEBPS/content.opf"); + // This was missing, EPUBLayoutMethod filter option was ignored and we always emitted reflowable layout. + assertXPathContent(mpXmlDoc, "/opf:package/opf:metadata/opf:meta[@property='rendition:layout']", "pre-paginated"); +} + void EPUBExportTest::testPageBreakSplit() { uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence( |