From aa5ee7d5a885df6cb4a31b1edaf1a35cf32b686e Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 6 Apr 2014 23:54:56 +0200 Subject: temporary fix for bug in 2geom, the bug manifests itself in LPE Construct grid (bzr r13273) --- src/2geom/path.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/2geom/path.cpp b/src/2geom/path.cpp index 5797f475c..fc4d72028 100644 --- a/src/2geom/path.cpp +++ b/src/2geom/path.cpp @@ -104,12 +104,14 @@ Path &Path::operator*=(Affine const &m) { } Path &Path::operator*=(Translate const &m) { +/* Somehow there is something wrong here, LPE Construct grid fails with this code unshare(); Sequence::iterator last = get_curves().end() - 1; Sequence::iterator it; Point prev; for (it = get_curves().begin() ; it != last ; ++it) { - *(const_cast(&**it)) *= m; + //*(const_cast(&**it)) *= m; + const_cast(it->get())->operator*=(m); if ( it != get_curves().begin() && (*it)->initialPoint() != prev ) { THROW_CONTINUITYERROR(); } @@ -124,6 +126,8 @@ Path &Path::operator*=(Translate const &m) { } } return *this; +*/ + return this->operator*=(static_cast(m)); } std::vector -- cgit v1.2.3 From bbb268a4e678aa5caa932a1bea115c31097973eb Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Tue, 8 Apr 2014 22:18:19 +0200 Subject: Make extension tests compatible with VPATH builds. Fixes distcheck not being able to find the test script. (bzr r13276) --- src/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index d3f8794ee..d5439f0ea 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -250,7 +250,9 @@ check_PROGRAMS = cxxtests # "make distcheck". # List of all tests to be run. -TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests +TESTS = $(check_PROGRAMS) +check-local: + $(top_srcdir)/share/extensions/test/run-all-extension-tests # FIXME: Currently, a number of cxxtest tests fail. These should be fixed and # the XFAIL_TESTS build target should be removed. -- cgit v1.2.3 From 2b1a0283357fec95109b67f9379ebec4bf56338e Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Thu, 10 Apr 2014 07:43:01 +0200 Subject: Fix for Bug #1302987 (Importing a PNG image with unittype field undefined fails). Fixed bugs: - https://launchpad.net/bugs/1302987 (bzr r13279) --- src/extension/internal/image-resolution.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/extension/internal/image-resolution.cpp b/src/extension/internal/image-resolution.cpp index 18eb97f80..f092b21ef 100644 --- a/src/extension/internal/image-resolution.cpp +++ b/src/extension/internal/image-resolution.cpp @@ -353,18 +353,13 @@ void ImageResolution::readmagick(char const *fn) { g_warning("ImageResolution::readmagick: Unknown error"); return; } - Magick::Geometry geo = image.density(); - std::string type = image.magick(); - - if (type == "PNG") { // PNG only supports pixelspercentimeter - x_ = Inkscape::Util::Quantity::convert((double)geo.width(), "in", "cm"); - y_ = Inkscape::Util::Quantity::convert((double)geo.height(), "in", "cm"); - } else { - x_ = (double)geo.width(); - y_ = (double)geo.height(); - } - ok_ = true; + x_ = image.xResolution(); + y_ = image.yResolution(); + + if (x_ != 0 && y_ != 0) { + ok_ = true; + } } #else -- cgit v1.2.3