Review Request 110432: Fix relative paths in saved kvtml documents
Commit Hook
null at kde.org
Tue May 21 20:51:39 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110432/
-----------------------------------------------------------
(Updated May 21, 2013, 8:51 p.m.)
Status
------
This change has been marked as submitted.
Review request for KDE Edu, Albert Astals Cid, Frederik Gladhorn, Peter Hedlund, and Jeremy Paul Whiting.
Description
-------
When e.g. KWordQuiz writes a document with images, the XML writer tries to use relative paths. This fails, because the URL of the document to be saved is set _after_ writing the document.
Attached patch fixes this issue by changing m_Url before calling the writer. In case of an error, it is set back to the old (previous) value.
Somewhat related is the change in the writer. Initially I had the impression the "is URL A relative of URL B" check using "startsWith" string compares was the culprit. Since KUrl offers an own function, I kept this change.
This addresses bug 318787.
http://bugs.kde.org/show_bug.cgi?id=318787
Diffs
-----
keduvocdocument/keduvocdocument.cpp 2ee6541
keduvocdocument/keduvockvtml2writer.cpp 99ad94d
Diff: http://git.reviewboard.kde.org/r/110432/diff/
Testing
-------
Tested with KWordQuiz using the steps from bug 318787. Images that are not outside the document directory are stored relative.
Thanks,
Christoph Feck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20130521/2b49e958/attachment.html>
More information about the kde-edu
mailing list