diff options
| author | Peter Moulder <peter.moulder@monash.edu> | 2009-04-07 05:31:32 +0000 |
|---|---|---|
| committer | pjrm <pjrm@users.sourceforge.net> | 2009-04-07 05:31:32 +0000 |
| commit | c2d8810625892a8bedcaa192df9b4165e46609ee (patch) | |
| tree | 86bf3792eb9043b59435c17ae9415138d2e81a21 /src/extension/internal/gdkpixbuf-input.cpp | |
| parent | functional noop: Clarify g_strcanon behaviour by not redundantly reassigning ... (diff) | |
| download | inkscape-c2d8810625892a8bedcaa192df9b4165e46609ee.tar.gz inkscape-c2d8810625892a8bedcaa192df9b4165e46609ee.zip | |
Move Inkscape::IO::fixupHrefs to Inkscape::XML::rebase_hrefs in new file xml/rebase-hrefs.*. Give it the old and new base directory, so that it can change hrefs without relying on sodipodi:absref.
Also create a new function sp_repr_save_rebased_file that changes all xlink:href attributes as it writes them, so that we don't need to modify the owning document. (Especially useful for "Save a copy" or exporting.)
extension/system.cpp: (Inkscape::Extension::save): Don't call sp_document_set_uri even temporarily other than at the same time as calling rebase_hrefs. (Otherwise, existing relative hrefs will point nowhere.)
When exporting plain SVG, change the relative hrefs according to the destination filename.
(bzr r7643)
Diffstat (limited to 'src/extension/internal/gdkpixbuf-input.cpp')
| -rw-r--r-- | src/extension/internal/gdkpixbuf-input.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index e8af0ec9d..f28b017b4 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -54,7 +54,7 @@ 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 fixupHrefs): + // 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); |
