summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4e7296f)
raw | patch | inline | side by side (parent: 4e7296f)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 11 Mar 2007 21:54:37 +0000 (21:54 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 11 Mar 2007 21:54:37 +0000 (21:54 +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 b9fde9350f6b705cde69c5c487fdf9126ac26c58..4a46b146df2979da59dfac0b752d79fc9e723c6f 100644 (file)
bool saved = sp_document_get_undo_sensitive(doc);
sp_document_set_undo_sensitive(doc, false); // no need to undo in this temporary document
GdkPixbuf *pb = Inkscape::IO::pixbuf_new_from_file( uri, NULL );
- Inkscape::XML::Node *rdoc = sp_document_repr_root(doc);
- gchar const *docbase = rdoc->attribute("sodipodi:docbase");
- gchar const *relname = sp_relative_path_from_path(uri, docbase);
if (pb) { /* We are readable */
Inkscape::XML::Node *repr = NULL;
if (prefs_get_int_attribute("options.importbitmapsasimages", "value", 1) == 1) {
// import as <image>
repr = xml_doc->createElement("svg:image");
- repr->setAttribute("xlink:href", relname);
- repr->setAttribute("sodipodi:absref", uri);
+ // both are the same, as we don't know our base dir here and cannot relativate href (importer will fixupHrefs):
+ repr->setAttribute("xlink:href", uri);
+ repr->setAttribute("sodipodi:absref", uri);
sp_repr_set_svg_double(repr, "width", width);
sp_repr_set_svg_double(repr, "height", height);
SPObject *pat_object = doc->getObjectById(pat_id);
Inkscape::XML::Node *im = xml_doc->createElement("svg:image");
- im->setAttribute("xlink:href", relname);
+ im->setAttribute("xlink:href", uri);
im->setAttribute("sodipodi:absref", uri);
sp_repr_set_svg_double(im, "width", width);
sp_repr_set_svg_double(im, "height", height);