<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/111043/">http://git.reviewboard.kde.org/r/111043/</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;">Since you asked: I like the idea of private classes. I added some comments inside.</pre>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/111043/diff/1/?file=150601#file150601line800" style="color: black; font-weight: bold; text-decoration: underline;">filters/sheets/excel/sidewinder/excel.h</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">public:</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">800</font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QSharedPointer</span><span class="o"><</span><span class="n">QTextDocument</span><span class="o">></span> <span class="n">m_doc</span><span class="p">;</span> <span class="c1">// NULL if plainText else it defines the richText</span></pre></td>
<th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This may just be a personal reference, but in the context of calligra I prefer if we don't use "doc", "document" or similar in any other context than an ODF document.
Especially in Words and the text classes in the libraries it has given me much confusion when a "document" is mentioned and it actually means a QTextDocument which is a container for some rich text. Can we use names like "textContents" or (in this case) "richText" or just "text" instead?</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/111043/diff/1/?file=150601#file150601line811" style="color: black; font-weight: bold; text-decoration: underline;">filters/sheets/excel/sidewinder/excel.h</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">public:</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">808</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">virtual</span> <span class="kt">unsigned</span> <span class="n">rtti</span><span class="p">()</span> <span class="k">const</span> <span class="p">{</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">805</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">virtual</span> <span class="kt">unsigned</span> <span class="n">rtti</span><span class="p">()</span> <span class="k">const</span> <span class="p">{</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I like the private class method that you suggested, but in that case we shouldn't have any inline functions either.</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/111043/diff/1/?file=150602#file150602line1683" style="color: black; font-weight: bold; text-decoration: underline;">filters/sheets/excel/sidewinder/excel.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void ObjRecord::setData(unsigned size, const unsigned char* data, const unsigned* /* continuePositions */)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1648</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">halign</span> <span class="o">=</span> <span class="k">static_cast</span><span class="o"><</span><span class="n">HorizontalAlignment</span><span class="o">></span><span class="p">((</span><span class="n">opts1</span> <span class="o">&</span> <span class="mh">0x000e</span><span class="p">)</span> <span class="o">>></span> <span class="mi">1</span><span class="p">);</span> <span class="c1">// 3 bits</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1683</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n"><span class="hl">d</span></span><span class="o"><span class="hl">-></span></span><span class="n">halign</span> <span class="o">=</span> <span class="k">static_cast</span><span class="o"><</span><span class="n">HorizontalAlignment</span><span class="o">></span><span class="p">((</span><span class="n">opts1</span> <span class="o">&</span> <span class="mh">0x000e</span><span class="p">)</span> <span class="o">>></span> <span class="mi">1</span><span class="p">);</span> <span class="c1">// 3 bits</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Urk! Magic numbers!</pre>
</div>
<br />
<p>- Inge</p>
<br />
<p>On June 15th, 2013, 5:38 p.m. UTC, Friedrich W. H. Kossebau wrote:</p>
<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, Marijn Kruisselbrink and Sebastian Sauer.</div>
<div>By Friedrich W. H. Kossebau.</div>
<p style="color: grey;"><i>Updated June 15, 2013, 5:38 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;">TxORecord is deconstructed in places where QTextDocument is not a completely defined type (because that is only forward declared in the header with the declaration of TxORecord, excel.h. Delete on objects of incomplete type is just undefined, so not an error usually, thus the compiler will not stop on it, see e.g. http://en.wikibooks.org/wiki/More_C++_Idioms/Checked_delete for the background.
Which means all QTextDocument members of TxORecord are currently leaked.
The most simple fix would have been to just remove the forward declaration of <QTextDocument> with a #include <QTextDocument> in excel.h, so that QTextDocument is completely defined.
But somehow I was tempted to instead move the members to a private class, like all/most of the other record classes have, that way also moving the deletion of the QTextDocument member to records.cpp, where the type is completely defined.
Whatever you prefer, your choice, just tell.
Okay to backport to 2.7?</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>filters/sheets/excel/import/ODrawClient.cpp <span style="color: grey">(c558d73)</span></li>
<li>filters/sheets/excel/sidewinder/excel.h <span style="color: grey">(5b0076c)</span></li>
<li>filters/sheets/excel/sidewinder/excel.cpp <span style="color: grey">(50f54c0)</span></li>
<li>filters/sheets/excel/sidewinder/worksheetsubstreamhandler.cpp <span style="color: grey">(bd66048)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/111043/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>