<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/105385/">http://git.reviewboard.kde.org/r/105385/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 1st, 2012, 4:42 a.m., <b>C. Boemann</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">No idea if there is a better solution either, but if it works then fine with me.

Little nag why an item is used. What happens if it's widget based, pr am i just not understanding the issues here.

Anyway no objection for me if it works. ok to backport too (I trust you have tested well)</pre>
 </blockquote>




 <p>On July 1st, 2012, 7:20 a.m., <b>Friedrich W. H. Kossebau</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Seemed to me like the only way to get a shapemanager. But after your nagging I researched a little more and now found what that canvasitem is. So I will change the patch to first look if there is any view to take the shapemanager from, and only then create the item.

And if you can nag Thorsten about https://git.reviewboard.kde.org/r/105390 to give it a final "Ship it!" (hopefully) I could improve this patch to reuse the KoPAUtil::setSizeAndZoom(...) I introduced there :)</pre>
 </blockquote>





 <p>On July 1st, 2012, 7:25 a.m., <b>C. Boemann</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Well sure I can nag Thorsten, but you can't use KoPAUtil in Words .. different framework</pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Oh, right. Was confused because KoPAUtil is also used in CSThumbProviderWords... Perhaps those utils could be moved up to KoDocument area...

Hm, is using the shapemanager of a view from views() a safe thing to do? Could that view and its canvas and the shapemanager be destroyed while KWDocument::generatePreview(...) is called? E.g. will be called during KoDocument::saveNativeFormatODF(...). And someone before me wrote that 
    foreach(KoShape* shape, shapeManager->shapes()) {
        shape->waitUntilReady(zoomHandler, false);
    }
in KWPage::thumbnail(...), so that can take a while. Hm. That one single canvasitem seems a more safe thing to do, or? At least it worked for me (did not try Calligra Active though).
Okay, will commit now as I have no better idea. And if someone then can tell Calligra Active has no issues as well, I will backport.</pre>
<br />








<p>- Friedrich W. H.</p>


<br />
<p>On June 29th, 2012, 4:42 p.m., Friedrich W. H. Kossebau 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 C. Boemann.</div>
<div>By Friedrich W. H. Kossebau.</div>


<p style="color: grey;"><i>Updated June 29, 2012, 4:42 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;">Currently the thumbnailing for documents saved with Words is broken. Attached patch makes it at least working again, no idea if there are better solutions to get the result, I relied on the existing code in KWPage::thumbnail(...)

Okay to also backport to 2.5?</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;">Created a few new files and looked at the thumbnails stored in the saved odf.</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>words/part/KWDocument.h <span style="color: grey">(a8d8ae4)</span></li>

 <li>words/part/KWDocument.cpp <span style="color: grey">(d5c4c2e)</span></li>

 <li>words/part/KWPage.cpp <span style="color: grey">(8ce9554)</span></li>

</ul>

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




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








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