summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-12-01 10:54:51 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-12-01 16:30:04 +0100
commitab7bdd1f91a7e6e25854601cca712488554ab960 (patch)
tree110157779e7bf585c863f981a7095f6f0d3581e4
parent6af2cd34404ef6b19fb218931de0b42a2731c57f (diff)
EPUB export: initial fixed layout support
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>
-rw-r--r--external/libepubgen/libepubgen-epub3.patch.1304
-rw-r--r--writerperfect/qa/unit/EPUBExportTest.cxx16
-rw-r--r--writerperfect/source/writer/EPUBExportFilter.cxx15
-rw-r--r--writerperfect/source/writer/EPUBExportFilter.hxx2
4 files changed, 337 insertions, 0 deletions
diff --git a/external/libepubgen/libepubgen-epub3.patch.1 b/external/libepubgen/libepubgen-epub3.patch.1
index e2948c43bd34..da2b935ad816 100644
--- a/external/libepubgen/libepubgen-epub3.patch.1
+++ b/external/libepubgen/libepubgen-epub3.patch.1
@@ -5354,3 +5354,307 @@ index 11f20cb..3699179 100644
--
2.13.6
+From bd49e1672d0e914736824dadc8f89c26ae955088 Mon Sep 17 00:00:00 2001
+From: Miklos Vajna <vmiklos@collabora.co.uk>
+Date: Tue, 28 Nov 2017 14:50:34 +0100
+Subject: [PATCH] [ABI CHANGE] optionally support the EPUB3 fixed layout
+
+Default is still the reflowable method, of course.
+---
+ inc/libepubgen/EPUBTextGenerator.h | 1 +
+ inc/libepubgen/libepubgen-decls.h | 8 ++++++++
+ src/lib/EPUBGenerator.cpp | 17 +++++++++++++++-
+ src/lib/EPUBGenerator.h | 3 +++
+ src/lib/EPUBHTMLGenerator.cpp | 41 ++++++++++++++++++++++++++++++++++----
+ src/lib/EPUBHTMLGenerator.h | 2 +-
+ src/lib/EPUBHTMLManager.cpp | 4 ++--
+ src/lib/EPUBHTMLManager.h | 2 +-
+ src/lib/EPUBTextGenerator.cpp | 5 +++++
+ src/test/EPUBTextGeneratorTest.cpp | 27 +++++++++++++++++++++++++
+ 10 files changed, 101 insertions(+), 9 deletions(-)
+
+diff --git a/inc/libepubgen/EPUBTextGenerator.h b/inc/libepubgen/EPUBTextGenerator.h
+index cb2d9a6..beb05aa 100644
+--- a/inc/libepubgen/EPUBTextGenerator.h
++++ b/inc/libepubgen/EPUBTextGenerator.h
+@@ -43,6 +43,7 @@ public:
+ void setSplitHeadingLevel(unsigned level);
+ void setSplitSize(unsigned size);
+ void setStylesMethod(EPUBStylesMethod styles);
++ void setLayoutMethod(EPUBLayoutMethod layout);
+
+ /** Register a handler for embedded images.
+ *
+diff --git a/inc/libepubgen/libepubgen-decls.h b/inc/libepubgen/libepubgen-decls.h
+index 2657a2d..3eb206e 100644
+--- a/inc/libepubgen/libepubgen-decls.h
++++ b/inc/libepubgen/libepubgen-decls.h
+@@ -69,6 +69,14 @@ enum EPUBStylesMethod
+ EPUB_STYLES_METHOD_INLINE, //< The styles will be described inline.
+ };
+
++/** The possible ways to lay out HTML files.
++ */
++enum EPUBLayoutMethod
++{
++ EPUB_LAYOUT_METHOD_REFLOWABLE, //< Dynamic pagination.
++ EPUB_LAYOUT_METHOD_FIXED, //< Exactly one page per HTML file.
++};
++
+ }
+
+ #endif // INCLUDED_LIBEPUBGEN_LIBEPUBGEN_DECLS_H
+diff --git a/src/lib/EPUBGenerator.cpp b/src/lib/EPUBGenerator.cpp
+index 571f0eb..4a62d7f 100644
+--- a/src/lib/EPUBGenerator.cpp
++++ b/src/lib/EPUBGenerator.cpp
+@@ -47,6 +47,7 @@ EPUBGenerator::EPUBGenerator(EPUBPackage *const package, const EPUBSplitMethod s
+ , m_splitGuard(split)
+ , m_version(version)
+ , m_stylesMethod(EPUB_STYLES_METHOD_CSS)
++ , m_layoutMethod(EPUB_LAYOUT_METHOD_REFLOWABLE)
+ {
+ }
+
+@@ -117,7 +118,7 @@ void EPUBGenerator::startNewHtmlFile()
+
+ m_splitGuard.onSplit();
+
+- m_currentHtml = m_htmlManager.create(m_imageManager, m_fontManager, m_listStyleManager, m_paragraphStyleManager, m_spanStyleManager, m_tableStyleManager, m_stylesheetPath, m_stylesMethod, m_version);
++ m_currentHtml = m_htmlManager.create(m_imageManager, m_fontManager, m_listStyleManager, m_paragraphStyleManager, m_spanStyleManager, m_tableStyleManager, m_stylesheetPath, m_stylesMethod, m_layoutMethod, m_version);
+
+ // restore state in the new file
+ m_currentHtml->startDocument(m_documentProps);
+@@ -156,6 +157,11 @@ void EPUBGenerator::setStylesMethod(EPUBStylesMethod styles)
+ m_stylesMethod = styles;
+ }
+
++void EPUBGenerator::setLayoutMethod(EPUBLayoutMethod layout)
++{
++ m_layoutMethod = layout;
++}
++
+ void EPUBGenerator::writeContainer()
+ {
+ EPUBXMLSink sink;
+@@ -362,6 +368,15 @@ void EPUBGenerator::writeRoot()
+ metaAttrs.insert("content", generator.c_str());
+ sink.openElement("meta", metaAttrs);
+ sink.closeElement("meta");
++
++ if (m_layoutMethod == EPUB_LAYOUT_METHOD_FIXED)
++ {
++ metaAttrs.clear();
++ metaAttrs.insert("property", "rendition:layout");
++ sink.openElement("meta", metaAttrs);
++ sink.insertCharacters("pre-paginated");
++ sink.closeElement("meta");
++ }
+ }
+
+ sink.closeElement("metadata");
+diff --git a/src/lib/EPUBGenerator.h b/src/lib/EPUBGenerator.h
+index abc6a9a..5a0df86 100644
+--- a/src/lib/EPUBGenerator.h
++++ b/src/lib/EPUBGenerator.h
+@@ -53,6 +53,8 @@ public:
+
+ void setStylesMethod(EPUBStylesMethod stylesMethod);
+
++ void setLayoutMethod(EPUBLayoutMethod layoutMethod);
++
+ private:
+ virtual void startHtmlFile() = 0;
+ virtual void endHtmlFile() = 0;
+@@ -84,6 +86,7 @@ private:
+
+ int m_version;
+ EPUBStylesMethod m_stylesMethod;
++ EPUBLayoutMethod m_layoutMethod;
+ };
+
+ }
+diff --git a/src/lib/EPUBHTMLGenerator.cpp b/src/lib/EPUBHTMLGenerator.cpp
+index 5c6421c..4260858 100644
+--- a/src/lib/EPUBHTMLGenerator.cpp
++++ b/src/lib/EPUBHTMLGenerator.cpp
+@@ -7,6 +7,7 @@
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
++#include <cmath>
+ #include <memory>
+ #include <sstream>
+ #include <stack>
+@@ -107,6 +108,11 @@ bool ZoneSinkImpl::endsInLineBreak() const
+ ;
+ }
+
++/// Convers inches to CSS pixels.
++int inchToCSSPixel(const librevenge::RVNGProperty *property)
++{
++ return round(property->getDouble() * 96);
++}
+ }
+
+ namespace
+@@ -371,7 +377,7 @@ std::string EPUBHTMLTextZone::label(int id) const
+ struct EPUBHTMLGeneratorImpl
+ {
+ //! constructor
+- EPUBHTMLGeneratorImpl(EPUBXMLSink &document, EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &path, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, int version)
++ EPUBHTMLGeneratorImpl(EPUBXMLSink &document, EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &path, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, EPUBLayoutMethod layoutMethod, int version)
+ : m_document(document)
+ , m_imageManager(imageManager)
+ , m_fontManager(fontManager)
+@@ -382,6 +388,7 @@ struct EPUBHTMLGeneratorImpl
+ , m_path(path)
+ , m_stylesheetPath(stylesheetPath)
+ , m_actualPage(0)
++ , m_actualPageProperties()
+ , m_ignore(false)
+ , m_hasText(false)
+ , m_version(version)
+@@ -389,6 +396,7 @@ struct EPUBHTMLGeneratorImpl
+ , m_framePropertiesStack()
+ , m_linkPropertiesStack()
+ , m_stylesMethod(stylesMethod)
++ , m_layoutMethod(layoutMethod)
+ , m_actualSink()
+ , m_sinkStack()
+ {
+@@ -477,6 +485,7 @@ struct EPUBHTMLGeneratorImpl
+ const EPUBPath m_stylesheetPath;
+
+ int m_actualPage;
++ RVNGPropertyList m_actualPageProperties;
+ bool m_ignore;
+ /// Does the currently opened paragraph have some text?
+ bool m_hasText;
+@@ -488,6 +497,7 @@ struct EPUBHTMLGeneratorImpl
+ std::stack<RVNGPropertyList> m_linkPropertiesStack;
+
+ EPUBStylesMethod m_stylesMethod;
++ EPUBLayoutMethod m_layoutMethod;
+
+ protected:
+ std::unique_ptr<TextZoneSink> m_actualSink;
+@@ -499,8 +509,8 @@ private:
+ EPUBHTMLGeneratorImpl operator=(EPUBHTMLGeneratorImpl const &orig);
+ };
+
+-EPUBHTMLGenerator::EPUBHTMLGenerator(EPUBXMLSink &document, EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &path, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, int version)
+- : m_impl(new EPUBHTMLGeneratorImpl(document, imageManager, fontManager, listStyleManager, paragraphStyleManager, spanStyleManager, tableStyleManager, path, stylesheetPath, stylesMethod, version))
++EPUBHTMLGenerator::EPUBHTMLGenerator(EPUBXMLSink &document, EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &path, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, EPUBLayoutMethod layoutMethod, int version)
++ : m_impl(new EPUBHTMLGeneratorImpl(document, imageManager, fontManager, listStyleManager, paragraphStyleManager, spanStyleManager, tableStyleManager, path, stylesheetPath, stylesMethod, layoutMethod, version))
+ {
+ }
+
+@@ -560,6 +570,25 @@ void EPUBHTMLGenerator::endDocument()
+ metaAttrs.insert("content", "text/html; charset=UTF-8");
+ m_impl->m_document.openElement("meta", metaAttrs);
+ m_impl->m_document.closeElement("meta");
++ if (m_impl->m_version >= 30 && m_impl->m_layoutMethod == EPUB_LAYOUT_METHOD_FIXED)
++ {
++ metaAttrs.clear();
++ metaAttrs.insert("name", "viewport");
++ std::stringstream content;
++ if (const librevenge::RVNGProperty *pageWidth = m_impl->m_actualPageProperties["fo:page-width"])
++ {
++ content << "width=";
++ content << inchToCSSPixel(pageWidth);
++ }
++ if (const librevenge::RVNGProperty *pageHeight = m_impl->m_actualPageProperties["fo:page-height"])
++ {
++ content << ", height=";
++ content << inchToCSSPixel(pageHeight);
++ }
++ metaAttrs.insert("content", content.str().c_str());
++ m_impl->m_document.openElement("meta", metaAttrs);
++ m_impl->m_document.closeElement("meta");
++ }
+ if (m_impl->m_version < 30)
+ m_impl->sendMetaData(m_impl->m_document);
+ RVNGPropertyList linkAttrs;
+@@ -582,9 +611,13 @@ void EPUBHTMLGenerator::defineEmbeddedFont(const RVNGPropertyList &propList)
+ m_impl->m_fontManager.insert(propList, m_impl->m_path);
+ }
+
+-void EPUBHTMLGenerator::openPageSpan(const RVNGPropertyList & /* propList */)
++void EPUBHTMLGenerator::openPageSpan(const RVNGPropertyList &propList)
+ {
+ m_impl->m_actualPage++;
++
++ librevenge::RVNGPropertyList::Iter i(propList);
++ for (i.rewind(); i.next();)
++ m_impl->m_actualPageProperties.insert(i.key(), i()->clone());
+ }
+
+ void EPUBHTMLGenerator::closePageSpan()
+diff --git a/src/lib/EPUBHTMLGenerator.h b/src/lib/EPUBHTMLGenerator.h
+index 3699179..3c6577f 100644
+--- a/src/lib/EPUBHTMLGenerator.h
++++ b/src/lib/EPUBHTMLGenerator.h
+@@ -32,7 +32,7 @@ class EPUBXMLSink;
+ class EPUBHTMLGenerator : public librevenge::RVNGTextInterface
+ {
+ public:
+- EPUBHTMLGenerator(EPUBXMLSink &document, EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &path, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, int version);
++ EPUBHTMLGenerator(EPUBXMLSink &document, EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &path, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, EPUBLayoutMethod layoutMethod, int version);
+ ~EPUBHTMLGenerator() override;
+
+ void setDocumentMetaData(const librevenge::RVNGPropertyList &propList) override;
+diff --git a/src/lib/EPUBHTMLManager.cpp b/src/lib/EPUBHTMLManager.cpp
+index d2c21da..363b33e 100644
+--- a/src/lib/EPUBHTMLManager.cpp
++++ b/src/lib/EPUBHTMLManager.cpp
+@@ -41,7 +41,7 @@ EPUBHTMLManager::EPUBHTMLManager(EPUBManifest &manifest)
+ {
+ }
+
+-const EPUBHTMLGeneratorPtr_t EPUBHTMLManager::create(EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, int version)
++const EPUBHTMLGeneratorPtr_t EPUBHTMLManager::create(EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, EPUBLayoutMethod layoutMethod, int version)
+ {
+ std::ostringstream nameBuf;
+ nameBuf << "section" << std::setw(4) << std::setfill('0') << m_number.next();
+@@ -55,7 +55,7 @@ const EPUBHTMLGeneratorPtr_t EPUBHTMLManager::create(EPUBImageManager &imageMana
+ m_contents.push_back(EPUBXMLSink());
+
+ const EPUBHTMLGeneratorPtr_t gen(
+- new EPUBHTMLGenerator(m_contents.back(), imageManager, fontManager, listStyleManager, paragraphStyleManager, spanStyleManager, tableStyleManager, m_paths.back(), stylesheetPath, stylesMethod, version));
++ new EPUBHTMLGenerator(m_contents.back(), imageManager, fontManager, listStyleManager, paragraphStyleManager, spanStyleManager, tableStyleManager, m_paths.back(), stylesheetPath, stylesMethod, layoutMethod, version));
+
+ return gen;
+ }
+diff --git a/src/lib/EPUBHTMLManager.h b/src/lib/EPUBHTMLManager.h
+index e1205e6..31e6dfe 100644
+--- a/src/lib/EPUBHTMLManager.h
++++ b/src/lib/EPUBHTMLManager.h
+@@ -41,7 +41,7 @@ class EPUBHTMLManager
+ public:
+ explicit EPUBHTMLManager(EPUBManifest &manifest);
+
+- const EPUBHTMLGeneratorPtr_t create(EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, int version);
++ const EPUBHTMLGeneratorPtr_t create(EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, EPUBLayoutMethod layoutMethod, int version);
+
+ void writeTo(EPUBPackage &package);
+
+diff --git a/src/lib/EPUBTextGenerator.cpp b/src/lib/EPUBTextGenerator.cpp
+index 5d4e8f2..c3bc963 100644
+--- a/src/lib/EPUBTextGenerator.cpp
++++ b/src/lib/EPUBTextGenerator.cpp
+@@ -147,6 +147,11 @@ void EPUBTextGenerator::setStylesMethod(EPUBStylesMethod styles)
+ m_impl->setStylesMethod(styles);
+ }
+
++void EPUBTextGenerator::setLayoutMethod(EPUBLayoutMethod layout)
++{
++ m_impl->setLayoutMethod(layout);
++}
++
+ void EPUBTextGenerator::registerEmbeddedImageHandler(const librevenge::RVNGString &mimeType, EPUBEmbeddedImage imageHandler)
+ {
+ if (!mimeType.empty() && imageHandler)
+--
+2.13.6
+
diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx
index 335347de60ff..a9692bc2c293 100644
--- a/writerperfect/qa/unit/EPUBExportTest.cxx
+++ b/writerperfect/qa/unit/EPUBExportTest.cxx
@@ -57,6 +57,7 @@ public:
void testOutlineLevel();
void testMimetype();
void testEPUB2();
+ void testEPUBFixedLayout();
void testPageBreakSplit();
void testSpanAutostyle();
void testParaAutostyleCharProps();
@@ -96,6 +97,7 @@ public:
CPPUNIT_TEST(testOutlineLevel);
CPPUNIT_TEST(testMimetype);
CPPUNIT_TEST(testEPUB2);
+ CPPUNIT_TEST(testEPUBFixedLayout);
CPPUNIT_TEST(testPageBreakSplit);
CPPUNIT_TEST(testSpanAutostyle);
CPPUNIT_TEST(testParaAutostyleCharProps);
@@ -292,6 +294,20 @@ void EPUBExportTest::testEPUB2()
assertXPath(mpXmlDoc, "/opf:package", "version", "2.0");
}
+void EPUBExportTest::testEPUBFixedLayout()
+{
+ uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence(
+ {
+ // Explicitly request fixed layout.
+ {"EPUBLayoutMethod", uno::makeAny(static_cast<sal_Int32>(libepubgen::EPUB_LAYOUT_METHOD_FIXED))}
+ }));
+ createDoc("hello.fodt", aFilterData);
+
+ mpXmlDoc = parseExport("OEBPS/content.opf");
+ // This was missing, EPUBLayoutMethod filter option was ignored and we always emitted reflowable layout.
+ assertXPathContent(mpXmlDoc, "/opf:package/opf:metadata/opf:meta[@property='rendition:layout']", "pre-paginated");
+}
+
void EPUBExportTest::testPageBreakSplit()
{
uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence(
diff --git a/writerperfect/source/writer/EPUBExportFilter.cxx b/writerperfect/source/writer/EPUBExportFilter.cxx
index ba9e30d85df9..8ebf5994aedc 100644
--- a/writerperfect/source/writer/EPUBExportFilter.cxx
+++ b/writerperfect/source/writer/EPUBExportFilter.cxx
@@ -48,10 +48,20 @@ sal_Int32 EPUBExportFilter::GetDefaultSplitMethod()
return libepubgen::EPUB_SPLIT_METHOD_HEADING;
}
+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)
{
sal_Int32 nVersion = EPUBExportFilter::GetDefaultVersion();
sal_Int32 nSplitMethod = EPUBExportFilter::GetDefaultSplitMethod();
+ sal_Int32 nLayoutMethod = EPUBExportFilter::GetDefaultLayoutMethod();
uno::Sequence<beans::PropertyValue> aFilterData;
for (sal_Int32 i = 0; i < rDescriptor.getLength(); ++i)
{
@@ -68,6 +78,8 @@ sal_Bool EPUBExportFilter::filter(const uno::Sequence<beans::PropertyValue> &rDe
aFilterData[i].Value >>= nVersion;
else if (aFilterData[i].Name == "EPUBSplitMethod")
aFilterData[i].Value >>= nSplitMethod;
+ else if (aFilterData[i].Name == "EPUBLayoutMethod")
+ aFilterData[i].Value >>= nLayoutMethod;
}
// Build the export filter chain: the package has direct access to the ZIP
@@ -79,6 +91,9 @@ sal_Bool EPUBExportFilter::filter(const uno::Sequence<beans::PropertyValue> &rDe
, nVersion
#endif
);
+#if LIBEPUBGEN_VERSION_SUPPORT
+ aGenerator.setLayoutMethod(static_cast<libepubgen::EPUBLayoutMethod>(nLayoutMethod));
+#endif
OUString aSourceURL;
uno::Reference<frame::XModel> xSourceModel(mxSourceDocument, uno::UNO_QUERY);
if (xSourceModel.is())
diff --git a/writerperfect/source/writer/EPUBExportFilter.hxx b/writerperfect/source/writer/EPUBExportFilter.hxx
index b423f96175e7..e96b0a84b695 100644
--- a/writerperfect/source/writer/EPUBExportFilter.hxx
+++ b/writerperfect/source/writer/EPUBExportFilter.hxx
@@ -50,6 +50,8 @@ public:
static sal_Int32 GetDefaultVersion();
/// Gives the default split method.
static sal_Int32 GetDefaultSplitMethod();
+ /// Gives the default layout method.
+ static sal_Int32 GetDefaultLayoutMethod();
};
} // namespace writerperfect