<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/102100/">http://git.reviewboard.kde.org/r/102100/</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 d85d4aef446c9f8c3eb5b4ba9a6dd96c6e74ea55 by Sebastian Sauer to branch master.</pre>
 <br />







<p>- Commit</p>


<br />
<p>On July 27th, 2011, 5:16 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, 5:16 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;">A while ago Hanzes tried to fix https://bugs.kde.org/show_bug.cgi?id=273177 with commit 0568afff328a7b1d1f471d8b62f5e82f559bcc93 but back then the patch had side-effects and therefore was reverted. To the bugreport I attached a ODP document that demonstrates the problem.

This patch solves the problem with the particular ODP document by also adjusting the m_blockRects if we are moving the QTextLine cause of line-spacing.

Now this isn't a 100% fix as demonstrated with the ODT I attached to the bugreport. The problem is that we still draw over text-lines if a paragraph defines a background-color what is so cause now QRect's in m_blockRects can overlap and if we are calling 

    QBrush bg = paintStrategy->background(block.blockFormat().background());
    if (bg != Qt::NoBrush) {
        painter->fillRect(br, bg);
    }

in KoTextLayoutArea_paint.cpp:203 which then draws over the content another line may have drawn before. But then the patch at least improves the situation in that we don't clip the text away any longer. For the remaining problem we would need to either allow and deal with overlapping m_blockRects during drawing or proper shrink the m_blockRects (e.g. remove margins) if they overlap till they not overlap any longer...
</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">(0fb69f3)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/102100/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>