summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-08-11 18:38:51 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-08-11 21:54:50 +0200
commita4eddfffaa1d2fd76a4c8a1013c11d80ccd8f1b2 (patch)
tree2ec0174a4b588e4429f54aa99a09f4685af59d4d /external
parent7634b279a53e7212925566e0de25d721fa7598ac (diff)
EPUB export: add initial metadata support, document title
librevenge also uses librevenge:descriptive-name next to dc:title for this purpose, but the later seems to be recommended in new code. Change-Id: I3c3887911945ad14960c7cbbccfa66716e519893 Reviewed-on: https://gerrit.libreoffice.org/41044 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'external')
-rw-r--r--external/libepubgen/libepubgen-epub3.patch.129
1 files changed, 29 insertions, 0 deletions
diff --git a/external/libepubgen/libepubgen-epub3.patch.1 b/external/libepubgen/libepubgen-epub3.patch.1
index a41fce29acef..5739f189a6dc 100644
--- a/external/libepubgen/libepubgen-epub3.patch.1
+++ b/external/libepubgen/libepubgen-epub3.patch.1
@@ -942,3 +942,32 @@ index ca05ea7..8017ffe 100644
--
2.12.3
+From d855721de6b4e55fb0b2a02a6a1132802dba5f63 Mon Sep 17 00:00:00 2001
+From: Miklos Vajna <vmiklos@collabora.co.uk>
+Date: Fri, 11 Aug 2017 15:40:49 +0200
+Subject: [PATCH] EPUBGenerator: write title into content.opf
+
+---
+ src/lib/EPUBGenerator.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/EPUBGenerator.cpp b/src/lib/EPUBGenerator.cpp
+index 8017ffe..056c48c 100644
+--- a/src/lib/EPUBGenerator.cpp
++++ b/src/lib/EPUBGenerator.cpp
+@@ -253,8 +253,11 @@ void EPUBGenerator::writeRoot()
+
+ // Zero-width space as it must be at least one character in length after
+ // white space has been trimmed.
++ RVNGString title("\u200b");
++ if (m_metadata["dc:title"] && !m_metadata["dc:title"]->getStr().empty())
++ title = m_metadata["dc:title"]->getStr();
+ sink.openElement("dc:title");
+- sink.insertCharacters("\u200b");
++ sink.insertCharacters(title);
+ sink.closeElement("dc:title");
+
+ sink.openElement("dc:language");
+--
+2.12.3
+