diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-11-27 08:18:09 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-11-27 12:13:05 +0100 |
commit | 9fc84943503be2433b7ec6ddb8487be80d155f24 (patch) | |
tree | 75f83dea9923825a4b34e17ca3e3c512a4c09a22 /external/libepubgen | |
parent | d43aa095b47bfb7e82a3c5a7b3b5149550716640 (diff) |
EPUB export: switch back to using an external CSS
And fix the root of the problem in libepubgen. Also clean up related
test code, so asserting CSS markup is as simple as asserting XML markup
now.
Change-Id: Iebe20be07e604b864e65a3376609a44a35bfa491
Reviewed-on: https://gerrit.libreoffice.org/45306
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'external/libepubgen')
-rw-r--r-- | external/libepubgen/libepubgen-epub3.patch.1 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/external/libepubgen/libepubgen-epub3.patch.1 b/external/libepubgen/libepubgen-epub3.patch.1 index c28f1b49a633..c226c51d4388 100644 --- a/external/libepubgen/libepubgen-epub3.patch.1 +++ b/external/libepubgen/libepubgen-epub3.patch.1 @@ -3548,3 +3548,32 @@ index 21a1b37..c9f4236 100644 -- 2.13.6 +From 094db625e36b91b57e152296a1f7db1bdcc682c5 Mon Sep 17 00:00:00 2001 +From: Miklos Vajna <vmiklos@collabora.co.uk> +Date: Wed, 8 Nov 2017 14:10:26 +0100 +Subject: [PATCH] EPUBHTMLGenerator: add missing rel attribute for CSS + reference + +Turns out a number of readers (checked Calibre and Aldiko on Android) do +support taking formatting from an external CSS, but only in case this +attribute is present. +--- + src/lib/EPUBHTMLGenerator.cpp | 1 + + src/test/EPUBTextGeneratorTest.cpp | 24 ++++++++++++++++++++++++ + 2 files changed, 25 insertions(+) + +diff --git a/src/lib/EPUBHTMLGenerator.cpp b/src/lib/EPUBHTMLGenerator.cpp +index 4ffa55d..d81a905 100644 +--- a/src/lib/EPUBHTMLGenerator.cpp ++++ b/src/lib/EPUBHTMLGenerator.cpp +@@ -531,6 +531,7 @@ void EPUBHTMLGenerator::endDocument() + RVNGPropertyList linkAttrs; + linkAttrs.insert("href", m_impl->m_stylesheetPath.relativeTo(m_impl->m_path).str().c_str()); + linkAttrs.insert("type", "text/css"); ++ linkAttrs.insert("rel", "stylesheet"); + m_impl->m_document.insertEmptyElement("link", linkAttrs); + m_impl->m_document.closeElement("head"); + m_impl->m_document.openElement("body", RVNGPropertyList()); +-- +2.13.6 + |