summaryrefslogtreecommitdiff
path: root/writerperfect/source/writer
AgeCommit message (Collapse)Author
2018-05-18Fix some IWYU warningsMiklos Vajna
Change-Id: I11d874caad9174fb1a70121f1772e117753ee519 Reviewed-on: https://gerrit.libreoffice.org/54503 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-15weld WPFTEncodingDialogCaolán McNamara
and pass in parent window for dialog Change-Id: Ibe9f576a74dfbbee3e568c8d3454440700cb0405 Reviewed-on: https://gerrit.libreoffice.org/54328 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-10writerfilter, writerperfect: various small cleanupsMiklos Vajna
Change-Id: Iea26b73bd91ed178cc4f2279c23246d79f48a6be Reviewed-on: https://gerrit.libreoffice.org/54063 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-04-27replace a series of if/else if/ by a switchDavid Tardon
Change-Id: I6319971e1a2a4bffa0466fa37a31beff5a349fd1 Reviewed-on: https://gerrit.libreoffice.org/53535 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2018-04-26tdf#116822 export ruby text and base text to epub.Mark Hung
Backport aa254c9e6f2d1ecfa2512111746a77c05ba9717f from libepubgen, implement XMLRubyContext, XMLRubyTextContext, XMLRubyBaseContext. Character formats of ruby text, ruby alignment, and ruby position are not implemented yet. Change-Id: I6c3708e6bc8e9e36a68171a037fd393f45d8d34f Reviewed-on: https://gerrit.libreoffice.org/53408 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-20writerperfect: astyle -> clang-formatMiklos Vajna
< vmiklos> dtardon: are you strongly attached to astyle usage in core.git writerperfect/? my problem is that 1) when less regular contributors touch it, they don't run astyle 2) core.git has git hooks in place to enforce consistent style for selected files, but that uses clang-format. i wonder if switching to the standard core.git clang-format would be an option to stop this reformat game <@dtardon> vmiklos, clang-format is okay. we started to use astyle years ago, before there were even any serious talk about automatic formatting for the whole libreoffice Change-Id: I844fc9c2e8560e54a49f26064cc0b3c55a5f034c Reviewed-on: https://gerrit.libreoffice.org/53184 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-04-18weld EPUBExportDialog and add parentCaolán McNamara
Change-Id: Iec4fa3afb1e90ec36f792ea65b8c57b11cff98b3 Reviewed-on: https://gerrit.libreoffice.org/53094 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-11writerperfect: fix whitespaceMiklos Vajna
Be consistent with surrounding code. Change-Id: I86eb3a663a54a63c850ada229ea24d9c770365df Reviewed-on: https://gerrit.libreoffice.org/52708 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-04-10tdf#115623: invoke openPageSpan / closePageSpanMark Hung
* For paragraphs or tables whose styles specify style:master-page-name, it indicate starting a new page style and should invoke openPageSpan / closePageSapn properly. * closePageSpan at the end of text body is invoked. Change-Id: Ic85157c9b1a43c94a027b464ad9105e9072afcf7 Reviewed-on: https://gerrit.libreoffice.org/52082 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-09use more DBG_UNHANDLED_EXCEPTIONNoel Grandin
so we get nice logs of the exception dynamic type for UNO exceptions. Change-Id: Ic0b10dc14d354a2c9a0591b3a51d2f1640d54bdb Reviewed-on: https://gerrit.libreoffice.org/52465 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-08tdf#115623: EPUB export: support style:master-pageMark Hung
Change-Id: I12d04c2e346c5202274a01b1f8950e3412dc9081 Reviewed-on: https://gerrit.libreoffice.org/52081 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-06weld linkeditdialogCaolán McNamara
which enables changing FileDialogHelper over to welded Change-Id: I988342a6574cb7ed09b2724929e8c7117474a56c Reviewed-on: https://gerrit.libreoffice.org/52388 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-05tdf#115623: EPUB export: handle style:page-layoutMark Hung
handle style:page-layout XMLPageLayoutPropertiesContext, store style:writing-mode so that it can be processed in libepubgen. Change-Id: Id997ef84a39bd3321d678ea23c5d1b9101297b34 Reviewed-on: https://gerrit.libreoffice.org/52080 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-09inherit welded dialogs from a common ancestorCaolán McNamara
Change-Id: Ifa6c871a134cf89bfba71b1049a115cf7c953c42 Reviewed-on: https://gerrit.libreoffice.org/50936 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-09loplugin:redundantfcast look for unnecessary temporariesNoel Grandin
when calling methods that take a const& Change-Id: Idf45dfd9fea0de6fae0b1f89550f2f7fc302aa15 Reviewed-on: https://gerrit.libreoffice.org/50970 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05weld SfxPasswordDialog DialogCaolán McNamara
Change-Id: If8c9757986f4af7b7927717221860e65c8c7285e Reviewed-on: https://gerrit.libreoffice.org/50755 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-27astyleDavid Tardon
Change-Id: I3ea599f491a464458865ce42930be4728ede5dc9
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-02-01EPUB export: can use std::move() hereMiklos Vajna
And get rid of an easy to avoid include if we are at it. Change-Id: I63cb4628a3a7038aab91c66f592920923a31d7a6 Reviewed-on: https://gerrit.libreoffice.org/49060 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-20EPUB export UI: show remaining metadata from the doc modelMiklos Vajna
Title is not special in any way, showing author/language/date has the same benefits. Change-Id: Ie05071b88d7fa53ad0e39927904ea5e122a66c9a Reviewed-on: https://gerrit.libreoffice.org/48183 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-01-19EPUB export UI: show title from the doc modelMiklos Vajna
It was a bit confusing that the doc model had a title set, it was written to the EPUB file but the UI did not show it. Change-Id: Ife408e0dabd3fe48e8acc1f09be0c86f78ed4b80 Reviewed-on: https://gerrit.libreoffice.org/48150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
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-17EPUB export: various small cleanupsMiklos Vajna
Change-Id: Iaa921257720adc6a65c8598b1105a4d7249778e6 Reviewed-on: https://gerrit.libreoffice.org/48021 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
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-14...and anotherStephan Bergmann
Change-Id: I833350b5c193223d24550e58f7ec99ae081afe8b
2017-12-14Blind fix for recently removed config_host/config_libepubgen.h.inStephan Bergmann
Change-Id: If91cfdce97f4f3868c2b09013220d27ceaffdfbe
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-12tdf#113183 DOCX import: fix not independent text box alignmentsMiklos Vajna
The alternative would be to clear them in writerfilter::dmapper::DomainMapper::getPositionOffset(), but that runs before writerfilter::dmapper::PositionHandler::lcl_sprm(), so it would be too early. Change-Id: I287b9a4025c4b1844ae467c48815b5d7ffe3f98e Reviewed-on: https://gerrit.libreoffice.org/46279 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07loplugin:constparamsNoel Grandin
Change-Id: Ia322ecf8f80b28c58ec33d17ca9607401a92534b Reviewed-on: https://gerrit.libreoffice.org/45959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin
first, since those are safer to change than virtual methods Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe Reviewed-on: https://gerrit.libreoffice.org/45798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-04EPUB export, fixed layout always means "split at the end of the page"Miklos Vajna
So disable split type on the UI, as it has no effect. Change-Id: Ia16e8050a732fce2f7881eee1b64e4487e843574 Reviewed-on: https://gerrit.libreoffice.org/45691 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: remove old non-metafile-based page size approachMiklos Vajna
This was unused code. Change-Id: I7f728544127dc283cd74e4425e699d598caeae1a Reviewed-on: https://gerrit.libreoffice.org/45649 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
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-01-Werror,-Wunused-private-fieldStephan Bergmann
Change-Id: Ia265d565bbc6b9e4c03aa9be66916b926b54bed8
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