diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-13 10:54:27 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-14 09:09:35 +0100 |
commit | b2b1debf06589bd91e437df47a2904574aaae316 (patch) | |
tree | e23a119ed85efdc88d430e1ca94052b57db32638 /writerperfect/source | |
parent | f988c1b36454445a503f6d2c1d8dd52f902fcf0e (diff) |
external: upload libepubgen-0.1.0
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>
Diffstat (limited to 'writerperfect/source')
-rw-r--r-- | writerperfect/source/writer/EPUBExportDialog.cxx | 2 | ||||
-rw-r--r-- | writerperfect/source/writer/EPUBExportFilter.cxx | 16 |
2 files changed, 1 insertions, 17 deletions
diff --git a/writerperfect/source/writer/EPUBExportDialog.cxx b/writerperfect/source/writer/EPUBExportDialog.cxx index 2d429abf657c..918d9eb9a198 100644 --- a/writerperfect/source/writer/EPUBExportDialog.cxx +++ b/writerperfect/source/writer/EPUBExportDialog.cxx @@ -150,9 +150,7 @@ IMPL_LINK_NOARG(EPUBExportDialog, LayoutSelectHdl, ListBox &, void) // No conversion, 1:1 mapping between entry positions and // libepubgen::EPUBLayoutMethod. mrFilterData["EPUBLayoutMethod"] <<= m_pLayout->GetSelectedEntryPos(); -#if LIBEPUBGEN_VERSION_SUPPORT m_pSplit->Enable(m_pLayout->GetSelectedEntryPos() != libepubgen::EPUB_LAYOUT_METHOD_FIXED); -#endif } IMPL_LINK_NOARG(EPUBExportDialog, CoverClickHdl, Button *, void) diff --git a/writerperfect/source/writer/EPUBExportFilter.cxx b/writerperfect/source/writer/EPUBExportFilter.cxx index 0e0a72dbe015..7b7654c8097e 100644 --- a/writerperfect/source/writer/EPUBExportFilter.cxx +++ b/writerperfect/source/writer/EPUBExportFilter.cxx @@ -54,11 +54,7 @@ sal_Int32 EPUBExportFilter::GetDefaultSplitMethod() sal_Int32 EPUBExportFilter::GetDefaultLayoutMethod() { -#if LIBEPUBGEN_VERSION_SUPPORT return libepubgen::EPUB_LAYOUT_METHOD_REFLOWABLE; -#else - return 0; -#endif } sal_Bool EPUBExportFilter::filter(const uno::Sequence<beans::PropertyValue> &rDescriptor) @@ -76,10 +72,8 @@ sal_Bool EPUBExportFilter::filter(const uno::Sequence<beans::PropertyValue> &rDe 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) { @@ -95,25 +89,17 @@ sal_Bool EPUBExportFilter::filter(const uno::Sequence<beans::PropertyValue> &rDe // file, the flat ODF filter has access to the doc model, everything else // is in-between. EPUBPackage aPackage(mxContext, rDescriptor); - libepubgen::EPUBTextGenerator aGenerator(&aPackage -#if LIBEPUBGEN_VERSION_SUPPORT - , nVersion -#endif - ); -#if LIBEPUBGEN_VERSION_SUPPORT + libepubgen::EPUBTextGenerator aGenerator(&aPackage, nVersion); aGenerator.setOption(libepubgen::EPUB_GENERATOR_OPTION_SPLIT, nSplitMethod); aGenerator.setOption(libepubgen::EPUB_GENERATOR_OPTION_LAYOUT, nLayoutMethod); -#endif OUString aSourceURL; uno::Reference<frame::XModel> xSourceModel(mxSourceDocument, uno::UNO_QUERY); if (xSourceModel.is()) aSourceURL = xSourceModel->getURL(); std::vector<std::pair<uno::Sequence<sal_Int8>, Size>> aPageMetafiles; -#if LIBEPUBGEN_VERSION_SUPPORT if (nLayoutMethod == libepubgen::EPUB_LAYOUT_METHOD_FIXED) CreateMetafiles(aPageMetafiles); -#endif uno::Reference<xml::sax::XDocumentHandler> xExportHandler(new exp::XMLImport(mxContext, aGenerator, aSourceURL, rDescriptor, aPageMetafiles)); |