summaryrefslogtreecommitdiff
path: root/external/libepubgen
AgeCommit message (Collapse)Author
2018-01-23EPUB export, fxl: silence Page <N> toc entries when have chapter namesMiklos Vajna
The EPUB ToC is now on par with the PDF ToC. Change-Id: Iea714fdb68c825aa14345037e909c354bbd7cf00 Reviewed-on: https://gerrit.libreoffice.org/48346 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-01-23EPUB export, fixed layout: add chapter names to the navigation documentMiklos Vajna
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>
2018-01-19EPUB export: handle text frame and image widthMiklos Vajna
So that an image and its caption in a text frame always go to separate lines. Change-Id: I439e370ad3bc8628f80a8db45499f8bffd84ef2b Reviewed-on: https://gerrit.libreoffice.org/48148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-23EPUB export: fix invalid XHTML output for text boxesMiklos Vajna
<div> not allowed inside <p>. Also fix two more similar validation problems. Change-Id: I7c326743b5e89a5a32609bdf312cb8caa203692e Reviewed-on: https://gerrit.libreoffice.org/46983 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-14external: upload libepubgen-0.1.0Miklos Vajna
The only change is that version support is now available unconditionally, otherwise most code changes were bundled already in the form of patches. Change-Id: I0e456d85c9d84002cabcd77b31b02c9a7ad16ac5 Reviewed-on: https://gerrit.libreoffice.org/46386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-04EPUB export, fixed layout: fix spine namesMiklos Vajna
They are pages, not sections. Change-Id: Ifd72d5ebec1d372a9bd99653d849479a6ffb6bfa Reviewed-on: https://gerrit.libreoffice.org/45690 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-04EPUB export, fixed layout: switch to a metafile-based approachMiklos Vajna
Trying to guess layout from flat ODF output is an approach that doesn't scale, think of complex documents with split tables, etc. Do it similar to the PDF export instead: take a metafile of each page and use the existing SVG writer to embed it into XHTML. Change-Id: I6e860834beb8025519d3e367f858077ae9e9c006 Reviewed-on: https://gerrit.libreoffice.org/45647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-01EPUB export: handle page size in fixed layoutMiklos Vajna
Requires parsing master pages and page layouts. Change-Id: Ia8b9e59a9355396d3776af06e8e67ec88033754b Reviewed-on: https://gerrit.libreoffice.org/45645 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-01EPUB export: initial fixed layout supportMiklos Vajna
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>
2017-12-01EPUB export: support image popup for images and textMiklos Vajna
Handle relative links on image / text as data for a popup. Pick the images up from <base directory>/<base name>/<relative url> as a start. Change-Id: I9b6183d554e3792aa71dfffc19a671a0e4c302cc Reviewed-on: https://gerrit.libreoffice.org/45601 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-01EPUB export: handle footnotesMiklos Vajna
Stringly speaking just linking from the main text to the footnote content would be enough from an EPUB point of view, but let's do the other direction as well, since Writer provides that. Change-Id: Iba366ef11a8375347d57a650c57baf8e8002e820 Reviewed-on: https://gerrit.libreoffice.org/45600 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-30EPUB export: allow overwriting of document metadataMiklos Vajna
Pick up overrides from <base directory>/<base name>.xmp as a start. Change-Id: Ib64a6bbdadc53633fb1f0d4a7efdde2e3c96b5ef Reviewed-on: https://gerrit.libreoffice.org/45551 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-29EPUB export: add support for cover imagesMiklos Vajna
Pick them up from <base directory>/<base name>.cover-image.<ext> as a start. Change-Id: Ie5ee7c02d6b3271e6e850ca9a2a10ed0bb4a598d Reviewed-on: https://gerrit.libreoffice.org/45483 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-29EPUB export: implement font embedding supportMiklos Vajna
Also avoid librevenge::RVNGBinaryData::appendBase64Data() for performance reasons. Times with and without the XMLBase64ImportContext rework for sw/qa/extras/odfexport/data/embedded-font-props.odt: - before: 1m32.254s - after: 0m7.045s (Need to insvestigate macOS font embedding situation in general, later.) Change-Id: I5aa56bfbfa8dc64f19c021202a1b87618b4b2775 Reviewed-on: https://gerrit.libreoffice.org/45385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-27EPUB export: handle text box wrap typesMiklos Vajna
Change-Id: I89487bc115ba84cfb7700b1617e531f2d3aed950
2017-11-27EPUB export: avoid wrap type for as-char anchored imagesMiklos Vajna
This fixes the wrapping of the inner frame of writerperfect/qa/unit/data/writer/epubexport/text-box.fodt. Change-Id: I8f2a4a2db8e49469c08f3dbf11d5891df3eddff8 Reviewed-on: https://gerrit.libreoffice.org/45311 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-27EPUB export: handle non-image framesMiklos Vajna
TextFrame on the Writer UI. Change-Id: I755fde113ef86a656b7f1f39c02642c22a5a6102 Reviewed-on: https://gerrit.libreoffice.org/45310 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-27EPUB export: handle image wrap typesMiklos Vajna
Change-Id: If7ef8f8e72e68fb71285ddb0164f033f44c62a53 Reviewed-on: https://gerrit.libreoffice.org/45309 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-27EPUB export: handle horizontal left/right positioning of non-as-char imagesMiklos Vajna
The change in XMLStyleContext::startElement() just makes sure that properties from the parent graphic styles are read, but currently it's just a nice-to-have addition, we don't depend on this yet, so no test. Change-Id: Ieac599dd47049edea57cb0860aa483f1045b47fd Reviewed-on: https://gerrit.libreoffice.org/45308 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-27EPUB export: switch back to using an external CSSMiklos Vajna
And fix the root of the problem in libepubgen. Also clean up related test code, so asserting CSS markup is as simple as asserting XML markup now. Change-Id: Iebe20be07e604b864e65a3376609a44a35bfa491 Reviewed-on: https://gerrit.libreoffice.org/45306 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-27EPUB export: handle image bordersMiklos Vajna
This requires handling of graphic styles. Change-Id: I74d4ee882b91192da44d8d7bbd88c1a66e97695f Reviewed-on: https://gerrit.libreoffice.org/45305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-24EPUB export: handle total table widthMiklos Vajna
This is important when e.g. the col width are 50-50%, then without explicit total table width the table width won't be correct. Change-Id: I5ccd6dfb5b78c564485d54cda62e12f3d1ca36c1 Reviewed-on: https://gerrit.libreoffice.org/45204 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-24EPUB export: handle cell widthMiklos Vajna
By handling relative column widths in libepubgen (since LO may only know that one, when layout is not available) and parsing column properties in writerperfect. Change-Id: I8fae5f1a3c970b97c2b452f3c20eff0911a56ba8 Reviewed-on: https://gerrit.libreoffice.org/45202 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-24EPUB export: implement row span for tablesMiklos Vajna
By turning <table:table-cell> attributes into librevenge properties. Also make sure that row/cell styles are inline at a libepubgen level. Change-Id: Ic23058748d241209845f76d8edc548bab8212c5f
2017-11-08drop obsolete patchDavid Tardon
Change-Id: Iabcb334fc3304c1c77e8e77826f2b665cb4daf55
2017-11-05fix build of bundled libepubgen on ppc64leDavid Tardon
Change-Id: I559058ffe2192764a27d278eea0e4d4676bbd64d
2017-10-28libepubgen: pass optimization flags to configureDavid Tardon
Change-Id: I50e0c7bfe89249c421b8e03f57445ce1bf51ecb4 Reviewed-on: https://gerrit.libreoffice.org/43982 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2017-10-18EPUB export: better handling of tabsMiklos Vajna
Mapping ODF/librevenge tab to \t in HTML is not a great idea, as it's ignorable whitespace. Go with NBSPs and a breakable space instead, that is much closer visually (15 is just an arbitrary number, it's what MS Word uses in its HTML export, LO Writer HTML export doesn't handle this). Adapt the empty paragraph case to also use NBSP for consistency. Change-Id: I131802416499eb4f3a83a333b37ca20b59fcd56a
2017-10-18EPUB export: handle headings inside sectionsMiklos Vajna
On one hand, we don't want to split inside a section as there might be elements we need to close/open at split boundary, OTOH this is currently not a problem as we don't produce any output for sections. So remove the level management for sections (this way allowing headings to split inside sections), let's get back to this when there is a concept how e.g. multiple columns would be represented in EPUB. Use case is when sections are used to just group paragraph together and mark all of them read-only: in this case it's unexpected that headings are handled differently to not-in-section ones. Change-Id: If419624f8eec4a6f676ad7f186484c0035f62626 Reviewed-on: https://gerrit.libreoffice.org/43482 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-17EPUB export: fix handling of empty paragraphsMiklos Vajna
sw HTML export does work to avoid vertical collapsing of empty (ODF) paragraphs, do the same for EPUB export. Change-Id: I316a310178dd4aadbe3ed8548be23d64aabf5e47 Reviewed-on: https://gerrit.libreoffice.org/43451 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-17EPUB export: ignore underline type/style 'none'Miklos Vajna
This is similar to commit ebf34ec31fb441d6226075a51f5f83ebf4668082 (EPUB export: ignore line though type/style 'none', 2017-09-11), but this time for underline. Change-Id: I806f64cc59e8cd8ab944500256755c18ed3d1249 Reviewed-on: https://gerrit.libreoffice.org/43449 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-19EPUB export: write styles inline to please poor readersMiklos Vajna
And add a filter option to disable the new behavior, if wanted. Change-Id: Ib70f60fc38d02c959452882bf593cd498b642fba Reviewed-on: https://gerrit.libreoffice.org/42433 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-11EPUB export: ignore line though type/style 'none'Miklos Vajna
In CSS this is a boolean property, but in ODF it's an enum, so map none to false and everything else to true. Change-Id: Id28d0a33121c9c1fd5a1ae6bf68280a9c4cffc03 Reviewed-on: https://gerrit.libreoffice.org/42159 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-08EPUB export: avoid writing image/x-vclgraphic to the output fileMiklos Vajna
The spec has a fixed list of allowed MIME types. Change-Id: I99a3121e41a2f6a3d0c5a040d66302161b16b0fb Reviewed-on: https://gerrit.libreoffice.org/42116 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-09-08EPUB export: fix double escaped NBSPMiklos Vajna
The EPUB package interface already XML-escapes characters, avoid a double escape. And once that works, handle NBSP/tabs. Change-Id: I8b7bbdc2592096bdd46fbdb29b48b723ef5cf990 Reviewed-on: https://gerrit.libreoffice.org/42098 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-06iOS, add arm64 support in libepubjan Iversen
Added patch to support arm64 Change-Id: If230ddd45b9d1fecc91e1cb529ff3f3da7f2c03d
2017-09-04EPUB export: write author metadataMiklos Vajna
<meta:initial-creator> is the author and <dc:creator> is the "last modified by" in ODF (it seems), so map the first to EPUB's <dc:creator>. Change-Id: Id701c8c38b0901ae14fbbc7b32d01b43d6d03f68 Reviewed-on: https://gerrit.libreoffice.org/41903 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-08-29Pass --enable-debug also down to external/libepubgenMiklos Vajna
So one gets debug symbols if wanted. Change-Id: I71fdf224ff1e445800c9bbf4f2289e53f57232ed Reviewed-on: https://gerrit.libreoffice.org/41669 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-08-29EPUB export: write generator stringMiklos Vajna
Should help with debugging when it's not clear the version creating the output had a certain fix or not. Change-Id: Ibd1b5153d3210d30f95eba8927c55e2e812d985c Reviewed-on: https://gerrit.libreoffice.org/41652 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-08-25EPUB export: make sure that the mimetype stream is not compressedMiklos Vajna
Similar to ODF, the spec mandates this, and recent enough epubcheck validator asserts this. Also backport 2 libepubgen commits that fix other validator errors around missing mimetypes / malformed URLs. Change-Id: I29f0524465a30d26585cea92ec27bd336f6a17d8 Reviewed-on: https://gerrit.libreoffice.org/41526 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-22EPUB export: fix validation error around as-char imagesMiklos Vajna
Matching testcase is in libepubgen.git only. Change-Id: Iee00264894099ccafb7b2d7d3252e2c7cc48ab11 Reviewed-on: https://gerrit.libreoffice.org/41427 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-08-22EPUB export: fix unexpected first chapter nameMiklos Vajna
Matching testcase is in libepubgen.git only. Change-Id: I7a6ce6a8f7deaa26a2b31ca024ff98a02a8a85f7 Reviewed-on: https://gerrit.libreoffice.org/41421 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-08-17EPUB export: fix unexpected text in chapter namesMiklos Vajna
Chapter name was a collection of all heading 1 (and contained heading 2, heading 3, ...) texts, but just heading 1 itself is enough. Change-Id: I893a935c4f4855ef5d19a01e2679ba7101af853f Reviewed-on: https://gerrit.libreoffice.org/41246 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-17EPUB export: use real chapter namesMiklos Vajna
Instead of "Seciton N" placeholders, by backporting the relevant libepubgen commit. Change-Id: I7073658597205927eeefc4e63ec23bd95cf4f30c Reviewed-on: https://gerrit.libreoffice.org/41241 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-08-15EPUB export: initial index supportMiklos Vajna
Split output by chapters. The index is still basic, just "Section N" entries so far. Change-Id: I4db659ee4110ab30f4b75f44c41f958533ddad7f Reviewed-on: https://gerrit.libreoffice.org/41177 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-11EPUB export: improve metadata handlingMiklos Vajna
Handle language and document modification date, these two were the remaining ones where EPUB3 mandates a value. With this, the default values are not used if the document has custom values. Change-Id: Ief36e8143a530fe03ae9f96bbf5b3e33527f1555 Reviewed-on: https://gerrit.libreoffice.org/41052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-11EPUB export: add initial metadata support, document titleMiklos Vajna
librevenge also uses librevenge:descriptive-name next to dc:title for this purpose, but the later seems to be recommended in new code. Change-Id: I3c3887911945ad14960c7cbbccfa66716e519893 Reviewed-on: https://gerrit.libreoffice.org/41044 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-11EPUB export: write legacy ToC as wellMiklos Vajna
Tolerated in EPUB3, and some readers not yet fully supporting EPUB3 (just EPUB2) actually need it. Change-Id: I8b52d081a939c74052f3945cc21c834c2af8bb7d
2017-08-10EPUB export: write EPUB3 outputMiklos Vajna
EPUB3 was released in 2011, it makes little sense to target the older EPUB2 in new code. Change-Id: Ifdd547bfc7e8f097124ed3effe9053ee2e5f2163 Reviewed-on: https://gerrit.libreoffice.org/40975 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-09For Clang -fsanitize=vptr use -fvisibility-ms-compat in exernal/libepubgen tooStephan Bergmann
...similarly to how it is used for other external libraries since f0aa1a78fb209310e8baef53c02f365fca518d11 "For Clang -fsanitize=vptr use -fvisibility-ms-compat, not -fvisibility=hidden". This caused CppunitTest_writerperfect_writer to fail now with -fsanitize=vptr after 7915f35d7fca5d0720d96954beaa97c00a2c3821 "EPUB export: implement doc/para open/close and text in doc handler", where additions to writerperfect/source/writer/EPUBExportFilter.cxx caused Library_wpftwriter to import more stuff from the libepubgen archive, which happend to make it pick up the (erroneously hidden) definition of _ZTIN10librevenge17RVNGTextInterfaceE from that archive, instead of from some other object/archive as happened before. Change-Id: I2b56df38d7225505ff993321598ddd51812d9de4