From f088739690c43d4a75b75dba022e4f21366bfd91 Mon Sep 17 00:00:00 2001 From: Peter Moulder Date: Tue, 7 Apr 2009 08:25:43 +0000 Subject: Use the new sp_document_change_uri_and_hrefs function. The change to extension/system.cpp is a functional noop. The change to extension/implementation/script.cpp should fix importing of .ai files that contain images (or whatever ill2svg.pl creates png files for). The effect on any other scripts that create SVG files with relative hrefs is unknown. (bzr r7656) --- src/extension/system.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/extension/system.cpp') diff --git a/src/extension/system.cpp b/src/extension/system.cpp index 37b70fec8..fdebd7b22 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -257,14 +257,7 @@ save(Extension *key, SPDocument *doc, gchar const *filename, bool setextension, saved_dataloss = g_strdup(repr->attribute("inkscape:dataloss")); } else { /* The document is changing name/uri. */ - - /* TODO: Don't treat URIs and filenames interchangeably. - * So call g_filename_to_uri when passing to sp_document_set_uri, - * and change rebase_hrefs to accept a base URI/LEIRI instead of dir name. */ - gchar *const new_base = g_path_get_dirname(fileName); - Inkscape::XML::rebase_hrefs(doc, new_base, true); - sp_document_set_uri(doc, fileName); - g_free(new_base); + sp_document_change_uri_and_hrefs(doc, fileName); } // Update attributes: -- cgit v1.2.3