From d61e166a900e32e6f1640c7c26b1a8a66826e51d Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Thu, 25 Jan 2018 00:10:14 +0100 Subject: Fix handling of filenames of linked images in .odg export - export of .odg files was completely broken on Windows as "documentUri = Inkscape::URI(filename);" always failed (Windows paths are never valid URIs because of '\') - Linked images did not seem to be working on any OS (probably regression in 6f844ef457690c841b0be91d70b1e54b61c04812) I assume support for linked images is still sketchy but seems to work in the most common cases; support for embedded images seems to be non-existent, though. Fixed bug: - https://bugs.launchpad.net/inkscape/+bug/1654034 --- src/extension/internal/odf.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/extension/internal/odf.cpp') diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index db18dd2ca..091be8c7d 100644 --- a/src/extension/internal/odf.cpp +++ b/src/extension/internal/odf.cpp @@ -1079,8 +1079,7 @@ void OdfOutput::preprocess(ZipFile &zf, Inkscape::XML::Node *node) Glib::ustring comment = "old name was: "; comment.append(oldName); Inkscape::URI oldUri(oldName.c_str()); - //# if relative to the documentURI, get proper path - std::string pathName = documentUri.getFullPath(oldUri.getFullPath("")); + std::string pathName = oldUri.toNativeFilename(); ZipEntry *ze = zf.addFile(pathName, comment); if (ze) { @@ -2096,8 +2095,6 @@ void OdfOutput::save(Inkscape::Extension::Output */*mod*/, SPDocument *doc, gcha { reset(); - documentUri = Inkscape::URI(filename); - ZipFile zf; preprocess(zf, doc->rroot); -- cgit v1.2.3