summaryrefslogtreecommitdiff
path: root/writerperfect/qa
AgeCommit message (Collapse)Author
2018-02-12EPUB export, fixed layout: fix validation error with imagesMiklos Vajna
The "xlink" prefix for the "xlink:href" attribute on the "image" element was not bound. Change-Id: I473a0b1612b4842cf84a264960bb28a9f19600e5 Reviewed-on: https://gerrit.libreoffice.org/49612 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-02-12EPUB export: pick up XMP metadata from 'metadata.xmp'Miklos Vajna
This used to be <filename>.xmp, but that's inconsistent with how cover image is not <filename>.jpg but cover.jpg (or .png, etc). Also it was redundant, since these files are in the media directory, for which the default is the <filename> directory. Change-Id: Iadfebf2f9c336f443537759b1e58409a93e1c51d Reviewed-on: https://gerrit.libreoffice.org/49604 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
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: accept relative links for image popup from default media dirMiklos Vajna
Previously: - the user had to copy the linked image to the same dir as the doc - set a relative link on the image (in ODF, it resulted in "../foo.png") - copy the image to the media dir ("test" by default for "test.odt") - export to EPUB to have the image popup Now, additionally: - relative link may point to the default media dir (in ODF, it results in "../test/foo.png") - no need to copy the image - export to EPUB creates the popup So one less step is necessary. The downside is that this way the relative URL contain the base name of the document, so renaming the document breaks these relative links. Change-Id: I93894a28393d36a33dcec7bfe7c4a54fd83768da
2018-01-19EPUB export: fix validation error on invalid relative linksMiklos Vajna
It's valid to have a relative link that points nowhere in ODF, but the same is not true for EPUB. Change-Id: I7884032e277a0c53d0c513cea70dd2ee29ccd85c
2018-01-04tdf#42949 Fix some more Include What You Use warningsMiklos Vajna
Change-Id: I2040315707674dc99a37aedb96ac61dca274c13a Reviewed-on: https://gerrit.libreoffice.org/47348 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-19EPUB export, fixed layout: fix mm size of SVG pagesMiklos Vajna
The preferred map unit was pixel, but SVGExport::writeMtf() expects the map unit is always a logical one, given that it calls OutputDevice::LogicToLogic() for it. Change-Id: Id1f311eb14423a76a82886ca848c90ab48c6eb49 Reviewed-on: https://gerrit.libreoffice.org/46733 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-04EPUB export, fixed layout: disable DTD string in SVG headerMiklos Vajna
epubcheck complains: ERROR(HTM-003): test.epub/OEBPS/images/image0001.svg(5675,37): External entities are not allowed in EPUB v3 documents. External entity declaration found: %svg-extensibility.mod. and similar ones. Just not writing the DTD header is enough to address the error. Change-Id: I5307e932a0f07585297cce734aceae77e43cc7a6 Reviewed-on: https://gerrit.libreoffice.org/45648 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 allow requesting fixed layout from cmdlineMiklos Vajna
FilterData is a typed map of options, suitable for UNO API clients, also that's what the UI uses. OTOH the --convert-to cmdline option can only set a FilterOptions string, so support that way as well. --convert-to epub:EPUB:layout=fixed can be used to trigger this. Change-Id: I9f429107ae1db3dc4b6ab3b2b75665f096a1a33a Reviewed-on: https://gerrit.libreoffice.org/45646 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: add UI to request fixed layoutMiklos Vajna
Sets the EPUBLayoutMethod filter data key at UNO level. Change-Id: Ia07029bd83fec02e98cb6a3cc2bfea2ab742d769 Reviewed-on: https://gerrit.libreoffice.org/45644 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: handle custom media dir in cover image / XMP metadataMiklos Vajna
By changing the default to <media dir>/cover.<extension> and <media dir>/<basename>.xmp. Change-Id: I736aefafba5aa5208917d9ed40119ca7721cdde3 Reviewed-on: https://gerrit.libreoffice.org/45604 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-01EPUB export: add UI to test custom media directoryMiklos Vajna
Sets the RVNGMediaDir filter data key at UNO level. Change-Id: I9919e5ca39c9f4f126d1d67946c8bec99ce0381d Reviewed-on: https://gerrit.libreoffice.org/45603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-01EPUB export: allow setting custom media dir explicitlyMiklos Vajna
The default is the same <base directory>/<base name>/ as before. Change-Id: Idb500193a7f6bd901d861e857147832a3ada91d3 Reviewed-on: https://gerrit.libreoffice.org/45602 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-12-01EPUB export: don't loose images with linksMiklos Vajna
And actually handle the link around the image. Change-Id: Ic9b7b9497becf677dbf550c67074c5c588ef8922
2017-11-30EPUB export: add UI to set custom metadataMiklos Vajna
The motivation here is that when it comes to date or author, the typical metata for the Writer document won't match the metadata of the book the file represents, so allowing a custom override as part of EPUB export makes sense. Change-Id: I19aaed83ae0e69bc0dfa3084e1c9dc9cc534328f Reviewed-on: https://gerrit.libreoffice.org/45553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-30EPUB export: allow setting custom metadata explicitlyMiklos Vajna
If not set, fall back to the existing auto-find. The testcase now asserts that the priority is: - api - if that is not set, then xmp - if that is not set, then doc (And at the end libepubgen itself has some defaults as well.) Change-Id: Ie8fc646b81c4a287690fd2eeed43f4786b7938bf Reviewed-on: https://gerrit.libreoffice.org/45552 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 UI to set a custom cover imageMiklos Vajna
Sets the EPUBCoverImage filter data key at UNO level. Change-Id: I46eb3c0df1e6c34af0be070c32f9f37666dc718e Reviewed-on: https://gerrit.libreoffice.org/45485 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-29EPUB export: allow setting a custom cover image explicitlyMiklos Vajna
If not set, fall back to the existing auto-find. Change-Id: I5df7a535e4132a18a803c10fa0e06352d9b6b533
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-28drop executable bit from test filesDavid Tardon
Change-Id: I72329d6ce5aac146a3e7014ad4a8bf7c20472b2f
2017-11-28upload libwps 0.4.8David Tardon
Change-Id: Ib285c227cd935987311be40df3745316943a54e0 Reviewed-on: https://gerrit.libreoffice.org/45331 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2017-11-27EPUB export: fix char props of <text:sequence> charactersMiklos Vajna
These are typically inherited from parent, <text:sequence> is similar to e.g. <text:span> in this regard. Change-Id: Ic84f6e2e4fc6866ffca23eef2c932ee63e6978ca Reviewed-on: https://gerrit.libreoffice.org/45314 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-27EPUB export: handle sequence fieldsMiklos Vajna
Just emit their expanded content for now. Change-Id: Ibca40d201dde9c8d6ef920b5213f786f64d7c027 Reviewed-on: https://gerrit.libreoffice.org/45313 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 images outside spansMiklos Vajna
CreateParagraphOrSpanChildContext() is already a factory for paragraph-or-span parents, just move image handling there. Change-Id: Ieeb57dc0913a17e92fdc57d79c26326f9cecb6a4 Reviewed-on: https://gerrit.libreoffice.org/45307 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 row heightMiklos Vajna
By handling row styles. Change-Id: Ie845cf9abfb4f6260d9401e81acc6864964b67bb Reviewed-on: https://gerrit.libreoffice.org/45203 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: handle cell border size/style/colorMiklos Vajna
By adding support for automatic cell styles. Change-Id: I31ff2bb6fed3391f571705505ccbbd89087e5972 Reviewed-on: https://gerrit.libreoffice.org/45201 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-24EPUB export: implement character properties of links from named stylesMiklos Vajna
ODF allows text properties on hyperlinks directly, librevenge wants an inner span instead. Change-Id: I903045a688bf318e7ac7f8cac83bb4d537259969 Reviewed-on: https://gerrit.libreoffice.org/45161 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-22drop duplicate methodCaolán McNamara
Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12 Reviewed-on: https://gerrit.libreoffice.org/45075 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-23loplugin:includeform: writerperfectStephan Bergmann
Change-Id: I714c131996efb0a85b9391a2b2bb7fc76bb2eae2
2017-10-23overload std::hash for OUString and OStringNoel Grandin
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-17EPUB export: handle char format of hyperlinksMiklos Vajna
<text:a> child elements were not handled. Change-Id: I7db9c005869934456ffbe5c36347b01cc76645b6 Reviewed-on: https://gerrit.libreoffice.org/43462 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-30EPUB export dialog: test VersionToPosition()Miklos Vajna
Fails when the stub version always returned 0. Change-Id: I2df952d0b7fc1a6171074e6da91584b851ace358 Reviewed-on: https://gerrit.libreoffice.org/42945 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-09-27EPUB export: improve metadata testsMiklos Vajna
This was the last uncovered piece in the ODF -> librevenge converter part. Change-Id: Ie9482f30c873deb3ddd601e1183b66706e913f14 Reviewed-on: https://gerrit.libreoffice.org/42848 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-26EPUB export: test link handlingMiklos Vajna
Fails without commit 9480ff6a2b6057410940ff5c40828d5746898a0e (EPUB export: implement link support, 2017-08-17). Change-Id: Icee6ac04ff77d0e9ff66ca1f925d6973b4b342a2 Reviewed-on: https://gerrit.libreoffice.org/42786 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-09-26EPUB export: test not loosing nested list contentMiklos Vajna
Just focus on the content, no formatting yet. Change-Id: I109f049bafae6a20d6b617f3be6a9c4f237e782b Reviewed-on: https://gerrit.libreoffice.org/42785 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-09-26EPUB export: add testcase for EPUBExportUIComponent::setPropertyValues()Miklos Vajna
Making sure python produces sequence<PropertyValue> and not sequence<any> is a bit tricky. Change-Id: I1f3ee4664202576ab6777b719b3712b164c5002d Reviewed-on: https://gerrit.libreoffice.org/42759 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>