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

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