You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
3.2 KiB
68 lines
3.2 KiB
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
|
|
|