author | pjrm <pjrm@users.sourceforge.net> | |
Tue, 7 Apr 2009 05:31:32 +0000 (05:31 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Tue, 7 Apr 2009 05:31:32 +0000 (05:31 +0000) | ||
commit | ec35142cad8ce4f534989cacd6cc98e276263548 | |
tree | 86bf3792eb9043b59435c17ae9415138d2e81a21 | tree | snapshot |
parent | 403701fecda3ae3813c8bdb2748d9291c70bf5d0 | commit | diff |
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.
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.
12 files changed:
src/extension/implementation/xslt.cpp | diff | blob | history | |
src/extension/internal/gdkpixbuf-input.cpp | diff | blob | history | |
src/extension/internal/svg.cpp | diff | blob | history | |
src/extension/system.cpp | diff | blob | history | |
src/file.cpp | diff | blob | history | |
src/file.h | diff | blob | history | |
src/main.cpp | diff | blob | history | |
src/xml/Makefile_insert | diff | blob | history | |
src/xml/rebase-hrefs.cpp | [new file with mode: 0644] | blob |
src/xml/rebase-hrefs.h | [new file with mode: 0644] | blob |
src/xml/repr-io.cpp | diff | blob | history | |
src/xml/repr.h | diff | blob | history |