[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-edu-devel
Subject: Re: Review Request 110432: Fix relative paths in saved kvtml documents
From: "Commit Hook" <null () kde ! org>
Date: 2013-05-21 20:51:39
Message-ID: 20130521205139.26514.90774 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
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
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/110432/">http://git.reviewboard.kde.org/r/110432/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray solid;">
<tr>
<td>
<h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been marked as \
submitted.</h1> </td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black solid;"> <tr>
<td>
<div>Review request for KDE Edu, Albert Astals Cid, Frederik Gladhorn, Peter Hedlund, and \
Jeremy Paul Whiting.</div> <div>By Christoph Feck.</div>
<p style="color: grey;"><i>Updated May 21, 2013, 8:51 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px \
solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid \
#b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Tested with KWordQuiz \
using the steps from bug 318787. Images that are not outside the document directory are stored \
relative.</pre> </td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=318787">318787</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>keduvocdocument/keduvocdocument.cpp <span style="color: grey">(2ee6541)</span></li>
<li>keduvocdocument/keduvockvtml2writer.cpp <span style="color: grey">(99ad94d)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/110432/diff/" style="margin-left: 3em;">View \
Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kde-edu mailing list
kde-edu@mail.kde.org
https://mail.kde.org/mailman/listinfo/kde-edu
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic