Blame SOURCES/0001-Related-tdf-106100-recover-mangled-svg-in-presentati.patch

91334d
From a74837a0e7c7259e4396aa5f05cf1384e256db35 Mon Sep 17 00:00:00 2001
91334d
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
91334d
Date: Mon, 20 Feb 2017 16:04:58 +0000
91334d
Subject: [PATCH] Related: tdf#106100 recover mangled svg in presentations
91334d
91334d
Change-Id: I77b452aa69a8341aa30e1e93d0d5ee8160533095
91334d
---
91334d
 svgio/Module_svgio.mk                 |  4 ----
91334d
 svgio/source/svgreader/svgsvgnode.cxx | 27 +++------------------------
91334d
 2 files changed, 3 insertions(+), 28 deletions(-)
91334d
91334d
diff --git a/svgio/Module_svgio.mk b/svgio/Module_svgio.mk
91334d
index 29ef97d..8b827fc 100644
91334d
--- a/svgio/Module_svgio.mk
91334d
+++ b/svgio/Module_svgio.mk
91334d
@@ -22,8 +22,4 @@ $(eval $(call gb_Module_add_targets,svgio,\
91334d
     Library_svgio \
91334d
 ))
91334d
 
91334d
-$(eval $(call gb_Module_add_check_targets,svgio,\
91334d
-    CppunitTest_svgio \
91334d
-))
91334d
-
91334d
 # vim: set noet ts=4 sw=4:
91334d
diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx
91334d
index 7800666..087c621 100644
91334d
--- a/svgio/source/svgreader/svgsvgnode.cxx
91334d
+++ b/svgio/source/svgreader/svgsvgnode.cxx
91334d
@@ -522,32 +522,11 @@ namespace svgio
91334d
                                 }
91334d
                                 else
91334d
                                 {
91334d
-                                    // There exists no parent to resolve relative width or height.
91334d
-                                    // Use child size as fallback and expand to aspect ratio given
91334d
-                                    // by the viewBox. No mapping.
91334d
-                                    // We get viewport >= content, therefore no clipping.
91334d
-                                    bNeedsMapping = false;
91334d
-                                    const basegfx::B2DRange aChildRange(
91334d
-                                        aSequence.getB2DRange(
91334d
-                                            drawinglayer::geometry::ViewInformation2D()));
91334d
-                                    const double fChildWidth(aChildRange.getWidth());
91334d
-                                    const double fChildHeight(aChildRange.getHeight());
91334d
-                                    const double fLeft(aChildRange.getMinX());
91334d
-                                    const double fTop(aChildRange.getMinY());
91334d
-                                    if ( fChildWidth / fViewBoxWidth > fChildHeight / fViewBoxHeight )
91334d
-                                    {  // expand y
91334d
-                                        fW = fChildWidth;
91334d
-                                        fH = fChildWidth / fViewBoxRatio;
91334d
-                                    }
91334d
-                                    else
91334d
-                                    {  // expand x
91334d
-                                        fH = fChildHeight;
91334d
-                                        fW = fChildHeight * fViewBoxRatio;
91334d
-                                    }
91334d
-                                    aSvgCanvasRange = basegfx::B2DRange(fLeft, fTop, fLeft + fW, fTop + fH);
91334d
+                                    fW = fViewBoxWidth;
91334d
+                                    fH = fViewBoxHeight;
91334d
+                                    aSvgCanvasRange = basegfx::B2DRange(0.0, 0.0, fW, fH);
91334d
                                 }
91334d
 
91334d
-
91334d
                                 if (bNeedsMapping)
91334d
                                 {
91334d
                                     // create mapping
91334d
-- 
91334d
2.9.3
91334d