summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Moulder <peter.moulder@monash.edu>2009-04-07 05:34:05 +0000
committerpjrm <pjrm@users.sourceforge.net>2009-04-07 05:34:05 +0000
commit8c353a7119da439d1c0258e22cc8156ddb6ad695 (patch)
tree533d35375143f805eff2631c960b00f00d76c288 /src
parentMove Inkscape::IO::fixupHrefs to Inkscape::XML::rebase_hrefs in new file xml/... (diff)
downloadinkscape-8c353a7119da439d1c0258e22cc8156ddb6ad695.tar.gz
inkscape-8c353a7119da439d1c0258e22cc8156ddb6ad695.zip
extension/internal/gdkpixbuf-input.cpp: Don't bother creating a sodipodi:absref attribute with the same value as an existing xlink:href attribute.
(bzr r7644)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/gdkpixbuf-input.cpp10
1 files changed, 8 insertions, 2 deletions
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 <image>
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);