From 3b42c3d705f97584d1cf614240aa1da7ce01a94b Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 12 May 2018 02:26:49 +0200 Subject: Fixes bugs: #1770760, #1770761, #1770763, #1770769 related to linked SVG --- src/object/sp-image.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/object/sp-image.cpp') diff --git a/src/object/sp-image.cpp b/src/object/sp-image.cpp index 8d3a15f0b..6fd9e5c1e 100644 --- a/src/object/sp-image.cpp +++ b/src/object/sp-image.cpp @@ -509,6 +509,26 @@ gchar* SPImage::description() const { this->pixbuf->width(), this->pixbuf->height(), href_desc) ); + + if (this->pixbuf == NULL && + this->document) + { + Inkscape::Pixbuf * pb = NULL; + pb = sp_image_repr_read_image ( + this->getRepr()->attribute("xlink:href"), + this->getRepr()->attribute("sodipodi:absref"), + this->document->getBase()); + + if (pb) { + ret = ( pb == NULL ? g_strdup_printf(_("[bad reference]: %s"), href_desc) + : g_strdup_printf(_("%d × %d: %s"), + pb->width(), + pb->height(), + href_desc)); + delete pb; + } + } + g_free(href_desc); return ret; } -- cgit v1.2.3