summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-03-11 21:54:37 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-03-11 21:54:37 +0000
commitaa45918885462b4d210791b090645cf3acd57315 (patch)
treea683ad719eca2085484fae4da63ba498fee70009 /src
parentargh, missed selection-chemistry somehow (diff)
downloadinkscape-aa45918885462b4d210791b090645cf3acd57315.tar.gz
inkscape-aa45918885462b4d210791b090645cf3acd57315.zip
don't try to relativate hrefs here - it never works anyway, because we don't have the document's base dir (the temporary doc created here has docbase == NULL)
(bzr r2608)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/gdkpixbuf-input.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp
index b9fde9350..4a46b146d 100644
--- a/src/extension/internal/gdkpixbuf-input.cpp
+++ b/src/extension/internal/gdkpixbuf-input.cpp
@@ -24,9 +24,6 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri)
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;
@@ -58,8 +55,9 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri)
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);
@@ -76,7 +74,7 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri)
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);