Related: tdf#106100 recover mangled svg in presentations
This commit is contained in:
parent
9f7489ed1d
commit
84fd1dc87b
@ -0,0 +1,67 @@
|
||||
From a74837a0e7c7259e4396aa5f05cf1384e256db35 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user