<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/102097/">http://git.reviewboard.kde.org/r/102097/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This review has been submitted with commit 4104ab4dc622b2390b22072dcc49d9c3596f23f1 by Sebastian Sauer to branch master.</pre>
<br />
<p>- Commit</p>
<br />
<p>On July 27th, 2011, 2:04 p.m., Sebastian Sauer wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Calligra and Casper Boemann.</div>
<div>By Sebastian Sauer.</div>
<p style="color: grey;"><i>Updated July 27, 2011, 2:04 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;">Attached patch fixes the case that in KoTextLayoutArea.cpp we could end in an infinite loop by trying to restart layouting the same line from text-position 0 again and again if at position 0 we had a soft-page-break and if the line itself had a textLength of zero (means the soft-page-break was the only character at the line).
The problem is that in the previous code we did;
line = layout->createLine();
cursor->lineTextStart = line.isValid() ? line.textStart() : 0;
if (softBreak) {
return false;
}
what resulted in us trying to continue layouting the same line with soft-page-break again and again from position 0 The patch changes that to
line = layout->createLine();
if (!line.isValid()) {
break;
}
cursor->lineTextStart = line.textStart();
if (softBreak) {
return false;
}
Now the question is if its save to assume that if we cannot create one more line then we are done (with that block)? Is that true or would it be better to add a condition somewhere that checks if cursor->lineTextStart < line.textStart() + line.textLength() (e.g. in restartLayout)?
</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/textlayout/KoTextLayoutArea.cpp <span style="color: grey">(05bf300)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/102097/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>