Review Request 110432: Fix relative paths in saved kvtml documents

Peter Hedlund peter at peterandlinda.com
Tue May 14 23:04:23 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110432/#review32535
-----------------------------------------------------------

Ship it!


Exactly the change I had in mind. See my comment in https://git.reviewboard.kde.org/r/110379/. Thank you!

- Peter Hedlund


On May 14, 2013, 10:31 p.m., Christoph Feck wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110432/
> -----------------------------------------------------------
> 
> (Updated May 14, 2013, 10:31 p.m.)
> 
> 
> 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/20130514/3694097f/attachment-0001.html>


More information about the kde-edu mailing list