[Libreoffice-commits] core.git: external/libepubgen

Miklos Vajna vmiklos at collabora.co.uk
Fri Jan 19 08:10:43 UTC 2018


 external/libepubgen/libepubgen-epub3.patch.1 |   30 +++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

New commits:
commit d5d4166df8ad189761387146966c91d58c28076f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jan 18 15:05:55 2018 +0100

    EPUB export: handle text frame and image width
    
    So that an image and its caption in a text frame always go to separate
    lines.
    
    Change-Id: I439e370ad3bc8628f80a8db45499f8bffd84ef2b
    Reviewed-on: https://gerrit.libreoffice.org/48148
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/external/libepubgen/libepubgen-epub3.patch.1 b/external/libepubgen/libepubgen-epub3.patch.1
index 7ea3a365737f..4b7fe5215f05 100644
--- a/external/libepubgen/libepubgen-epub3.patch.1
+++ b/external/libepubgen/libepubgen-epub3.patch.1
@@ -167,3 +167,33 @@ index bc9c1b7..59ded90 100644
 -- 
 2.13.6
 
+From 51e17dc87d85f1dc71b380906f9260de4cd0371c Mon Sep 17 00:00:00 2001
+From: Miklos Vajna <vmiklos at collabora.co.uk>
+Date: Thu, 18 Jan 2018 14:54:06 +0100
+Subject: [PATCH] EPUBImageManager: handle relative and absolute width
+
+---
+ src/lib/EPUBImageManager.cpp       |  6 +++++
+ src/test/EPUBTextGeneratorTest.cpp | 54 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 60 insertions(+)
+
+diff --git a/src/lib/EPUBImageManager.cpp b/src/lib/EPUBImageManager.cpp
+index bdf3bf0..cb4efee 100644
+--- a/src/lib/EPUBImageManager.cpp
++++ b/src/lib/EPUBImageManager.cpp
+@@ -171,6 +171,12 @@ void EPUBImageManager::extractImageProperties(librevenge::RVNGPropertyList const
+       continue;
+     cssProps[type[i]] =  pList[field.c_str()]->getStr().cstr();
+   }
++
++  // Extract size.
++  if (auto pRelWidth = pList["style:rel-width"])
++    cssProps["width"] = pRelWidth->getStr().cstr();
++  else if (auto pWidth = pList["svg:width"])
++    cssProps["width"] = pWidth->getStr().cstr();
+ }
+ 
+ std::string EPUBImageManager::getWrapStyle(librevenge::RVNGPropertyList const &pList)
+-- 
+2.13.6
+


More information about the Libreoffice-commits mailing list