diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-01 10:57:35 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-01 16:31:20 +0100 |
commit | 01283fe86cc523f1bed38bdfc5fbcb1694972169 (patch) | |
tree | b4b75f7cd02f619c99bdf5892d0bd96e51db2041 /writerperfect/source | |
parent | 89e7a00080aadeba08ee649877b2507dc312f9f8 (diff) |
EPUB export allow requesting fixed layout from cmdline
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>
Diffstat (limited to 'writerperfect/source')
-rw-r--r-- | writerperfect/source/writer/EPUBExportFilter.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/writerperfect/source/writer/EPUBExportFilter.cxx b/writerperfect/source/writer/EPUBExportFilter.cxx index 8ebf5994aedc..627d5a4af18f 100644 --- a/writerperfect/source/writer/EPUBExportFilter.cxx +++ b/writerperfect/source/writer/EPUBExportFilter.cxx @@ -63,15 +63,20 @@ sal_Bool EPUBExportFilter::filter(const uno::Sequence<beans::PropertyValue> &rDe sal_Int32 nSplitMethod = EPUBExportFilter::GetDefaultSplitMethod(); sal_Int32 nLayoutMethod = EPUBExportFilter::GetDefaultLayoutMethod(); uno::Sequence<beans::PropertyValue> aFilterData; + OUString aFilterOptions; for (sal_Int32 i = 0; i < rDescriptor.getLength(); ++i) { if (rDescriptor[i].Name == "FilterData") - { rDescriptor[i].Value >>= aFilterData; - break; - } + else if (rDescriptor[i].Name == "FilterOptions") + rDescriptor[i].Value >>= aFilterOptions; } +#if LIBEPUBGEN_VERSION_SUPPORT + if (aFilterOptions == "layout=fixed") + nLayoutMethod = libepubgen::EPUB_LAYOUT_METHOD_FIXED; +#endif + for (sal_Int32 i = 0; i < aFilterData.getLength(); ++i) { if (aFilterData[i].Name == "EPUBVersion") |