summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b47bbb9)
raw | patch | inline | side by side (parent: b47bbb9)
author | pjrm <pjrm@users.sourceforge.net> | |
Tue, 7 Apr 2009 08:25:43 +0000 (08:25 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Tue, 7 Apr 2009 08:25:43 +0000 (08:25 +0000) |
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.
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.
src/extension/implementation/script.cpp | patch | blob | history | |
src/extension/system.cpp | patch | blob | history |
index 70b006d310265ba5afd69fd274e2b0a69bc0e7a2..eabf147f64980afa2acbb18027dc682c961da6a3 100644 (file)
} // data_read
if (mydoc != NULL) {
- sp_document_set_uri(mydoc, filenameArg);
+ g_free(mydoc->base);
+ mydoc->base = NULL;
+ sp_document_change_uri_and_hrefs(mydoc, filenameArg);
}
// make sure we don't leak file descriptors from g_file_open_tmp
index 37b70fec8325269104d58eb95541f77fa40b5b22..fdebd7b227ded8eaa9c1a5714e521aafbc05b1ef 100644 (file)
--- 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: