summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ec35142)
raw | patch | inline | side by side (parent: ec35142)
author | pjrm <pjrm@users.sourceforge.net> | |
Tue, 7 Apr 2009 05:34:05 +0000 (05:34 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Tue, 7 Apr 2009 05:34:05 +0000 (05:34 +0000) |
src/extension/internal/gdkpixbuf-input.cpp | patch | blob | history |
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp
index f28b017b47cec8a29fcb5faec66780348c1504fd..773913ffc33eed62d2cc14cabf854dfc859f59f3 100644 (file)
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);