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










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On June 4th, 2014, 5:03 p.m. UTC, <b>Inge Wallin</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="https://git.reviewboard.kde.org/r/118532/diff/1/?file=278722#file278722line464" style="color: black; font-weight: bold; text-decoration: underline;">libs/kotext/KoTextEditor_format.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; ">public:</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">462</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">cursor</span><span class="p">.</span><span class="n">setBlockFormat</span><span class="p">(</span><span class="n">QTextBlockFormat</span><span class="p">());</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">464</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">QVariant</span> <span class="n">sectionStartings</span> <span class="o">=</span> <span class="n">cursor</span><span class="p">.</span><span class="n">blockFormat</span><span class="p">().</span><span class="n">property</span><span class="p">(</span><span class="n">KoParagraphStyle</span><span class="o">::</span><span class="n">SectionStartings</span><span class="p">);</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">465</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">QVariant</span> <span class="n">sectionEndings</span> <span class="o">=</span> <span class="n">cursor</span><span class="p">.</span><span class="n">blockFormat</span><span class="p">().</span><span class="n">property</span><span class="p">(</span><span class="n">KoParagraphStyle</span><span class="o">::</span><span class="n">SectionEndings</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;">Language and naming issue: Are these two really plurals? </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;">Yes, because really it is a QList< KoSection * > and QList< KoSectionEnd* ></pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On June 4th, 2014, 5:03 p.m. UTC, <b>Inge Wallin</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="https://git.reviewboard.kde.org/r/118532/diff/1/?file=278725#file278725line180" style="color: black; font-weight: bold; text-decoration: underline;">libs/kotext/commands/DeleteCommand.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 DeleteCommand::doDelete()</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">178</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="kt">bool</span> <span class="n">hasEntirelyInsideBlock</span> <span class="o">=</span> <span class="nb">false</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;">Is there an ownership here?  Unless I misunderstood something a better name would be isEntirelyInsideBlock(), right?</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;">It shows have we block in selection that is contained fully in selection. So I think it's good name.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On June 4th, 2014, 5:03 p.m. UTC, <b>Inge Wallin</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="https://git.reviewboard.kde.org/r/118532/diff/1/?file=278725#file278725line296" style="color: black; font-weight: bold; text-decoration: underline;">libs/kotext/commands/DeleteCommand.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 DeleteCommand::doDelete()</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">294</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="c1">//             cur.setPosition(caret->selectionStart());</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">295</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="c1">//             if (cur.movePosition(QTextCursor::Left)) {</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;">Why all these comments?  Will this code be removed before the merge or is there some other reason?</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 will remove all this things if appropriate assert will never rise up.</pre>
<br />




<p>- Denis</p>


<br />
<p>On June 4th, 2014, 4:30 p.m. UTC, Denis Kuplyakov wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://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, Camilla Boemann, Inge Wallin, and Dan Leinir Turthra Jensen.</div>
<div>By Denis Kuplyakov.</div>


<p style="color: grey;"><i>Updated June 4, 2014, 4:30 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
calligra
</div>


<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;">This adds proper section handling to code. It concentrates on managing to not break section structure during editing of text.
Patch fixes many things:
1) Insertion of text into sections
2) Deletion of text with sections
3) Cut, paste of text with sections
4) Applying style doesn't remove section info
5) WORDS product set added for fast building of Words and Author
6) Sections visual indication (need improvements)

Future TODOS:
1) improving section indication
2) ability to insert section
3) adding unittests</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;">I have tested all functionality with emphasis on deletion. It has the most complicated code and need very good testing.
You can use LibreOffice Writer to create document with sections and then test editing it in words. And I will attach one I've used.</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>cmake/productsets/words.cmake <span style="color: grey">(PRE-CREATION)</span></li>

 <li>libs/kotext/KoSection.h <span style="color: grey">(ac3fdd8)</span></li>

 <li>libs/kotext/KoSection.cpp <span style="color: grey">(ca414b0)</span></li>

 <li>libs/kotext/KoTextEditor.cpp <span style="color: grey">(efc9dd0)</span></li>

 <li>libs/kotext/KoTextEditor_format.cpp <span style="color: grey">(dacc19a)</span></li>

 <li>libs/kotext/KoTextPaste.cpp <span style="color: grey">(de89bd8)</span></li>

 <li>libs/kotext/commands/DeleteCommand.h <span style="color: grey">(f9dd2ef)</span></li>

 <li>libs/kotext/commands/DeleteCommand.cpp <span style="color: grey">(5cb92527)</span></li>

 <li>libs/kotext/opendocument/KoTextLoader.h <span style="color: grey">(ca92573)</span></li>

 <li>libs/kotext/opendocument/KoTextLoader.cpp <span style="color: grey">(bf3044e)</span></li>

 <li>libs/kotext/opendocument/KoTextWriter_p.cpp <span style="color: grey">(c03cebb)</span></li>

 <li>libs/odf/KoOdfPaste.cpp <span style="color: grey">(1e46546)</span></li>

 <li>libs/textlayout/KoTextLayoutArea.h <span style="color: grey">(f1b900a)</span></li>

 <li>libs/textlayout/KoTextLayoutArea_paint.cpp <span style="color: grey">(2982c60)</span></li>

 <li>words/part/CMakeLists.txt <span style="color: grey">(2bf1b0b)</span></li>

 <li>words/part/KWFactory.cpp <span style="color: grey">(9894f40)</span></li>

 <li>words/part/dockers/KWDebugDocker.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>words/part/dockers/KWDebugDocker.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>words/part/dockers/KWDebugDockerFactory.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>words/part/dockers/KWDebugDockerFactory.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>words/part/dockers/KWDebugWidget.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>words/part/dockers/KWDebugWidget.cpp <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

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



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>

<ul>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/06/04/f87d4ce2-3ab9-48a4-a880-4caa586790fc__Test-orig.odt">File for testing</a></li>

</ul>





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








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