summaryrefslogtreecommitdiff
path: root/writerperfect/qa/unit/EPUBExportTest.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-01-22 15:18:45 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-01-23 09:05:02 +0100
commita54787669b9283efdfdd18b0cbafc3184cdde58f (patch)
treec64aac62a0c2d2e7baf1b5eddaba396270ec09d4 /writerperfect/qa/unit/EPUBExportTest.cxx
parent75f5d70d5d9f58a76e42d151f187c50bad50378c (diff)
EPUB export, fixed layout: add chapter names to the navigation document
Extend vcl::PDFExtOutDevData so that it's possible to use it outside the PDF export; this way the EPUB export can know which chapters start on which page. This means fixed and reflowable layout has the same table of contents, instead of just Page <N> in the fixed layout case. Change-Id: I935fb23c66ec747431b91e83b0e677d4e5f704b9 Reviewed-on: https://gerrit.libreoffice.org/48332 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'writerperfect/qa/unit/EPUBExportTest.cxx')
-rw-r--r--writerperfect/qa/unit/EPUBExportTest.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx
index 176324b0dff7..47e84ebf1bbc 100644
--- a/writerperfect/qa/unit/EPUBExportTest.cxx
+++ b/writerperfect/qa/unit/EPUBExportTest.cxx
@@ -348,6 +348,13 @@ void EPUBExportTest::testEPUBFixedLayoutImplicitBreak()
// This was missing, implicit page break (as calculated by the layout) was lost on export.
CPPUNIT_ASSERT(mxZipFile->hasByName("OEBPS/sections/section0002.xhtml"));
CPPUNIT_ASSERT(!mxZipFile->hasByName("OEBPS/sections/section0003.xhtml"));
+
+ // Make sure that fixed layout has chapter names in the navigation
+ // document.
+ mpXmlDoc = parseExport("OEBPS/toc.xhtml");
+ // This was 'Page 1' instead.
+ assertXPathContent(mpXmlDoc, "//xhtml:li[1]/xhtml:a", "First chapter");
+ assertXPathContent(mpXmlDoc, "//xhtml:li[2]/xhtml:a", "Second chapter");
}
void EPUBExportTest::testPageBreakSplit()