From: pjrm Date: Tue, 7 Apr 2009 05:34:05 +0000 (+0000) Subject: extension/internal/gdkpixbuf-input.cpp: Don't bother creating a sodipodi:absref attri... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0ed639d9e93e46b4a5cbee8906d7736b50706897;p=inkscape.git extension/internal/gdkpixbuf-input.cpp: Don't bother creating a sodipodi:absref attribute with the same value as an existing xlink:href attribute. --- diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index f28b017b4..773913ffc 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -54,9 +54,15 @@ GdkpixbufInput::open(Inkscape::Extension::Input */*mod*/, char const *uri) Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); // import as repr = xml_doc->createElement("svg:image"); - // both are the same, as we don't know our base dir here and cannot relativate href (importer will rebase_hrefs): + repr->setAttribute("xlink:href", uri); - repr->setAttribute("sodipodi:absref", uri); + /* impl: doc->base is currently NULL, so we can use uri for href whether it's absolute + * or relative. The href will get rewritten by rebase_hrefs if by chance uri is relative + * and doc gets saved to a different directory. + * + * We don't bother setting sodipodi:absref, as we assume it's never useful to have + * sodipodi:absref with the same value as xlink:href, and rebase_hrefs will provide + * sodipodi:absref values where necessary. */ sp_repr_set_svg_double(repr, "width", width); sp_repr_set_svg_double(repr, "height", height);