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


<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, Boudewijn Rempt and C. Boemann.</div>
<div>By Friedrich W. H. Kossebau.</div>


<p style="color: grey;"><i>Updated Nov. 20, 2012, 9:22 a.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Add a detailed explanation for the workaround as comment</pre>
  </td>
 </tr>
</table>




<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 exporting to non-native formats (File/Export...) fails on Windows, because the temporary files are empty on disk.

    The fix follows approach of bf47fed5ead06f2128abf042897f86bab39cf333 ,
    by destructing the KTemporaryFile object used to get a unique temporary
    file name right after its creation again, to avoid having two file handlers
    on the same file, which seems somehow to prevent synching the bytes written
    by the filter, which ATM opens its own new file handler, by the name of
    the temporary file (as KoFilterChain can be only queried for filenames,
    KoDocuments or KoStores).
    
    Real fix might be to use the KTemporaryFile objects also by the filters,
    instead of having them open the same file on their own again.
    Another fix might be to find out which flags have to be used in Windows on
    opening the files, to prevent this behaviour (unless these details are hidden
    away by the Qt abstraction).
    
    Also fixes a possible crash on Windows in KoFilterChain::outputFileHelper(...):
    m_outputTempFile was accessed even when it might be set to 0 a few lines before
</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;">Run a build with this patch and exported a few files from Calligra Words to HTML, no longer empty output.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>libs/main/KoFilterChain.cpp <span style="color: grey">(b952588)</span></li>

</ul>

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




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




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