<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/110719/">http://git.reviewboard.kde.org/r/110719/</a>
</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 Calligra.</div>
<div>By Friedrich W. H. Kossebau.</div>
<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;">Words currently will hang with hot wheels on loading the file http://heap.kogmbh.net/vandenoever/tmp/yo.odt
Reason is that the condition to break the parsing is only testing if the end is officially reached. But as the API Dox of QXmlStreamReader::readNext() ( http://qt-project.org/doc/qt-4.8/qxmlstreamreader.html#readNext) tells "The exception is when error() returns PrematureEndOfDocumentError. This error is reported when the end of an otherwise well-formed chunk of XML is reached, but the chunk doesn't represent a complete XML document."
So also checking for !xml.hasError() seems needed.
Okay to backport to 2.7?
Now this bug was just uncovered because of another problem:
for some reason the file meta.xml seems to be not properly extracted from the odt, so this can be seen in the log (with this patch applied):
words(17718)/koffice (lib komain): Parsing error in "meta.xml" ! Aborting!
In line: 1 , column: 0
Error message: "Premature end of document."
Unzipping yo.odt with unzip shows that meta.xml has some proper looking content. So possibly our zip reading code has a bug. Needs to be investigated separately.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>libs/odf/KoXmlReader.cpp <span style="color: grey">(b5fe9f8)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/110719/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>