diff --git a/0001-Related-tdf-106100-recover-mangled-svg-in-presentati.patch b/0001-Related-tdf-106100-recover-mangled-svg-in-presentati.patch new file mode 100644 index 0000000..518896e --- /dev/null +++ b/0001-Related-tdf-106100-recover-mangled-svg-in-presentati.patch @@ -0,0 +1,67 @@ +From a74837a0e7c7259e4396aa5f05cf1384e256db35 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Mon, 20 Feb 2017 16:04:58 +0000 +Subject: [PATCH] Related: tdf#106100 recover mangled svg in presentations + +Change-Id: I77b452aa69a8341aa30e1e93d0d5ee8160533095 +--- + svgio/Module_svgio.mk | 4 ---- + svgio/source/svgreader/svgsvgnode.cxx | 27 +++------------------------ + 2 files changed, 3 insertions(+), 28 deletions(-) + +diff --git a/svgio/Module_svgio.mk b/svgio/Module_svgio.mk +index 29ef97d..8b827fc 100644 +--- a/svgio/Module_svgio.mk ++++ b/svgio/Module_svgio.mk +@@ -22,8 +22,4 @@ $(eval $(call gb_Module_add_targets,svgio,\ + Library_svgio \ + )) + +-$(eval $(call gb_Module_add_check_targets,svgio,\ +- CppunitTest_svgio \ +-)) +- + # vim: set noet ts=4 sw=4: +diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx +index 7800666..087c621 100644 +--- a/svgio/source/svgreader/svgsvgnode.cxx ++++ b/svgio/source/svgreader/svgsvgnode.cxx +@@ -522,32 +522,11 @@ namespace svgio + } + else + { +- // There exists no parent to resolve relative width or height. +- // Use child size as fallback and expand to aspect ratio given +- // by the viewBox. No mapping. +- // We get viewport >= content, therefore no clipping. +- bNeedsMapping = false; +- const basegfx::B2DRange aChildRange( +- aSequence.getB2DRange( +- drawinglayer::geometry::ViewInformation2D())); +- const double fChildWidth(aChildRange.getWidth()); +- const double fChildHeight(aChildRange.getHeight()); +- const double fLeft(aChildRange.getMinX()); +- const double fTop(aChildRange.getMinY()); +- if ( fChildWidth / fViewBoxWidth > fChildHeight / fViewBoxHeight ) +- { // expand y +- fW = fChildWidth; +- fH = fChildWidth / fViewBoxRatio; +- } +- else +- { // expand x +- fH = fChildHeight; +- fW = fChildHeight * fViewBoxRatio; +- } +- aSvgCanvasRange = basegfx::B2DRange(fLeft, fTop, fLeft + fW, fTop + fH); ++ fW = fViewBoxWidth; ++ fH = fViewBoxHeight; ++ aSvgCanvasRange = basegfx::B2DRange(0.0, 0.0, fW, fH); + } + +- + if (bNeedsMapping) + { + // create mapping +-- +2.9.3 + diff --git a/libreoffice.spec b/libreoffice.spec index 2730ed5..f86a465 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -239,6 +239,7 @@ Patch6: 0001-lower-the-system-epoxy-requirement.patch Patch7: 0001-Resolves-tdf-105998-distort-hairline-borders-to-fall.patch Patch8: 0001-Related-rhbz-1422353-make-writer-behave-like-calc-an.patch Patch9: 0001-right-click-to-insert-image.patch +Patch10: 0001-Related-tdf-106100-recover-mangled-svg-in-presentati.patch %if 0%{?rhel} # not upstreamed