<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/102552/">http://git.reviewboard.kde.org/r/102552/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 8th, 2011, 4:58 a.m., <b>Thorsten Zachmann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<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/102552/diff/2/?file=35543#file35543line164" style="color: black; font-weight: bold; text-decoration: underline;">libs/kotext/KoInlineNote.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</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 KoInlineNote::paint(QPainter &painter, QPaintDevice *pd, const QTextDocument *document, const QRectF &rect, QTextInlineObject object, int posInDocument, const QTextCharFormat &format)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">156</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">163</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="c1">//if footnotes count changes make sure we renumber the notes</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">164</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span> <span class="p">(</span><span class="n">KoTextDocument</span><span class="p">(</span><span class="n">d</span><span class="o">-></span><span class="n">textFrame</span><span class="o">-></span><span class="n">document</span><span class="p">()).</span><span class="n">inlineTextObjectManager</span><span class="p">()</span><span class="o">-></span><span class="n">visibleAutoNumberedNotes</span><span class="p">(</span><span class="n">d</span><span class="o">-></span><span class="n">textFrame</span><span class="o">-></span><span class="n">document</span><span class="p">()</span><span class="o">-></span><span class="n">begin</span><span class="p">())</span> <span class="o">!=</span> <span class="n">KoInlineNote</span><span class="o">::</span><span class="n">count</span><span class="p">)</span> <span class="p">{</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Maybe you can remove the count variable and do the renumbering where a new footnote is added to the inline object manager. Then you will be sure it works correctly also when there are more then one document.</pre>
</blockquote>
<p>On September 8th, 2011, 1:36 p.m., <b>Brijesh Patel</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;">that poses a problem when the footnotes are deleted...</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I had a look at the KoInlineTextObjectManager and I think this code belongs to be in there. There is also a function that gets called when an inline object gets deleted so I think that should work. Doing the whole stuff at painting time is not the right thing to do</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 8th, 2011, 4:58 a.m., <b>Thorsten Zachmann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<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/102552/diff/2/?file=35543#file35543line233" style="color: black; font-weight: bold; text-decoration: underline;">libs/kotext/KoInlineNote.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</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; ">bool KoInlineNote::loadOdf(const KoXmlElement & element, KoShapeLoadingContext &context)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">198</font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">setAutoNumbering</span><span class="p">(</span><span class="kc">false</span><span class="p">);</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="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Is there a reason to remove this line here. I think it only makes sure that the initial value of the variable is set correctly.</pre>
</blockquote>
<p>On September 8th, 2011, 3:07 p.m., <b>Brijesh Patel</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;">I dont remember the reason exactly why i removed,
but it was something like this
the notes which are inserted in this session only get the autonumbering tag while loading,but previously inserted notes don't.
so counting begins from 1 in each session.
</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Can you please check if the line is realy needed.</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 8th, 2011, 4:58 a.m., <b>Thorsten Zachmann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<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/102552/diff/2/?file=35543#file35543line286" style="color: black; font-weight: bold; text-decoration: underline;">libs/kotext/KoInlineNote.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</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; ">bool KoInlineNote::loadOdf(const KoXmlElement & element, KoShapeLoadingContext &context)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">284</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">context</span><span class="p">.</span><span class="n">mainStyles</span><span class="p">().</span><span class="n">insertRawOdfStyles</span><span class="p">(</span><span class="n">KoGenStyles</span><span class="o">::</span><span class="n">DocumentStyles</span><span class="p">,</span><span class="n">xmlBufferFootNote</span><span class="p">.</span><span class="n">data</span><span class="p">());</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">285</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">286</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">xmlWriter</span> <span class="o">=</span> <span class="k">new</span> <span class="n">KoXmlWriter</span><span class="p">(</span><span class="o">&</span><span class="n">xmlBufferEndNote</span><span class="p">);</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">287</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">KoTextDocument</span><span class="p">(</span><span class="n">d</span><span class="o">-></span><span class="n">textFrame</span><span class="o">-></span><span class="n">document</span><span class="p">()).</span><span class="n">notesConfiguration</span><span class="p">(</span><span class="n">KoOdfNotesConfiguration</span><span class="o">::</span><span class="n">Endnote</span><span class="p">)</span><span class="o">-></span><span class="n">saveOdf</span><span class="p">(</span><span class="n">xmlWriter</span><span class="p">);</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">288</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">context</span><span class="p">.</span><span class="n">mainStyles</span><span class="p">().</span><span class="n">insertRawOdfStyles</span><span class="p">(</span><span class="n">KoGenStyles</span><span class="o">::</span><span class="n">DocumentStyles</span><span class="p">,</span><span class="n">xmlBufferEndNote</span><span class="p">.</span><span class="n">data</span><span class="p">());</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The notes configuration should be saved only once and not with each footnote. Please ping me on IRC if you have a question on how that can be done.</pre>
</blockquote>
<p>On September 8th, 2011, 2:59 p.m., <b>Brijesh Patel</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;">I am doing a check for that only,
see line 283: if (KoTextDocument(d->textFrame->document()).inlineTextObjectManager()->getFirstNote(d->textFrame->document()->begin())->id() == this-
>id()) {
it will go inside "if" only if it is the first visible note of the document otherwise it wont go</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">As the KoOdfNotesConfiguration is used as a style and handled like that in loading I think it would be better if the KoStyleManager would be resposible about it. But maybe others see it differently. If it would be part of the KoStyleManager it could be loaded and saved like all othere styles in one.</pre>
<br />
<p>- Thorsten</p>
<br />
<p>On September 8th, 2011, 3:28 p.m., Brijesh Patel 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.</div>
<div>By Brijesh Patel.</div>
<p style="color: grey;"><i>Updated Sept. 8, 2011, 3:28 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;">I worked on implementation of Footnotes and Endnotes in Calligra Words as part of my SoK project.
Footnotes/Endnotes can now be inserted,saved,loaded and also be configured too.
Can somebody review my work and notify me about bugs/crashes?</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/kotext/KoInlineNote.h <span style="color: grey">(515a2f3)</span></li>
<li>libs/kotext/KoInlineNote.cpp <span style="color: grey">(89200fd)</span></li>
<li>libs/kotext/KoInlineTextObjectManager.h <span style="color: grey">(44990e9)</span></li>
<li>libs/kotext/KoInlineTextObjectManager.cpp <span style="color: grey">(da8d9ca)</span></li>
<li>libs/kotext/KoTextEditor.h <span style="color: grey">(ba28354)</span></li>
<li>libs/kotext/KoTextEditor.cpp <span style="color: grey">(4d3e5b18)</span></li>
<li>libs/kotext/opendocument/KoTextLoader.cpp <span style="color: grey">(e9d47da)</span></li>
<li>libs/kotext/styles/KoSectionStyle.cpp <span style="color: grey">(2f3a1ad)</span></li>
<li>libs/odf/KoOdfNotesConfiguration.cpp <span style="color: grey">(bc26e31)</span></li>
<li>libs/odf/KoOdfNumberDefinition.cpp <span style="color: grey">(d35a07f)</span></li>
<li>libs/odf/KoOdfStylesReader.cpp <span style="color: grey">(5a8324e)</span></li>
<li>libs/textlayout/KoTextLayoutArea.h <span style="color: grey">(ea7fd8e)</span></li>
<li>libs/textlayout/KoTextLayoutArea.cpp <span style="color: grey">(504de0c)</span></li>
<li>libs/textlayout/KoTextLayoutEndNotesArea.h <span style="color: grey">(7b0c732)</span></li>
<li>libs/textlayout/KoTextLayoutEndNotesArea.cpp <span style="color: grey">(bb746db)</span></li>
<li>plugins/textshape/CMakeLists.txt <span style="color: grey">(3df7aa5)</span></li>
<li>plugins/textshape/ReferencesTool.h <span style="color: grey">(40676b2)</span></li>
<li>plugins/textshape/ReferencesTool.cpp <span style="color: grey">(0bbd38d)</span></li>
<li>plugins/textshape/dialogs/NotesConfigurationDialog.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/textshape/dialogs/NotesConfigurationDialog.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/textshape/dialogs/NotesConfigurationDialog.ui <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/textshape/dialogs/SimpleFootEndNotesWidget.h <span style="color: grey">(1af35a8)</span></li>
<li>plugins/textshape/dialogs/SimpleFootEndNotesWidget.cpp <span style="color: grey">(374b266)</span></li>
<li>plugins/textshape/dialogs/SimpleFootEndNotesWidget.ui <span style="color: grey">(77f33e7)</span></li>
<li>plugins/textshape/pics/settings-icon1_1.png <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/102552/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>