<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/103017/">http://git.reviewboard.kde.org/r/103017/</a>
     </td>
    </tr>
   </table>
   <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/103017/diff/1/?file=40042#file40042line796" style="color: black; font-weight: bold; text-decoration: underline;">libs/kotext/KoTextEditor.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 KoTextEditor::setStyle(KoParagraphStyle *style)</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">796</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">default<span class="hl">Char</span>Style</span><span class="o">-></span><span class="n">applyStyle</span><span class="p">(</span><span class="n">format</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">795</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="p"><span class="hl">((</span></span><span class="n"><span class="hl">KoCharacterStyle</span></span><span class="hl"> </span><span class="o"><span class="hl">*</span></span><span class="p"><span class="hl">)</span></span><span class="n"><span class="hl">styleManager</span></span><span class="o"><span class="hl">-></span></span><span class="n">default<span class="hl">Paragraph</span>Style</span><span class="p"><span class="hl">())</span></span><span class="o">-></span><span class="n">applyStyle</span><span class="p">(</span><span class="n">format</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;">KoParagraphStyle inherits from KoCharacterStyle so c-style cast not needed or?
</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/103017/diff/1/?file=40044#file40044line521" style="color: black; font-weight: bold; text-decoration: underline;">libs/kotext/opendocument/KoTextWriter_p.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; ">QString KoTextWriter::Private::saveParagraphStyle(const QTextBlockFormat &blockFormat, const QTextCharFormat &charFormat)</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">521</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">KoCharacterStyle</span> <span class="o">*</span><span class="n">defaultCharStyle</span> <span class="o">=</span> <span class="n">styleManager</span><span class="o">-></span><span class="n">defaultParagraphStyle</span><span class="p">()</span><span class="o">-></span><span class="n">characterStyle</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">521</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">KoCharacterStyle</span> <span class="o">*</span><span class="n">defaultCharStyle</span> <span class="o">=</span> <span class="mi"><span class="hl">0</span></span><span class="p"><span class="hl">;</span></span><span class="c1"><span class="hl">//</span>styleManager->defaultParagraphStyle()->characterStyle();</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;">hmmm... this means that if styleManager->characterStyle(charFormat.intProperty(KoCharacterStyle::StyleId)) returns NULL we are crashing now.</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/103017/diff/1/?file=40046#file40046line406" style="color: black; font-weight: bold; text-decoration: underline;">libs/kotext/styles/KoCharacterStyle.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 KoCharacterStyle::clearBackground()</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">406</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">d</span><span class="o">-></span><span class="n">parentStyle</span><span class="p">)</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;">hmmm... does this mean we are applying the format way more often now?

Consider;
<p format=1>Some<p format=2>Thing</p></p>
then we are apply at "Thing" do we unnecessary set format=1 twice now on the QTextCharFormat. First when apply the QTextCharFormat to the first paragraph and then again when applying the QTextCharFormat at the second (sub-/child-)paragraph?

Can this have a performance impact? Should be easy to check with valgrind/vtunes.
</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/103017/diff/1/?file=40048#file40048line1200" style="color: black; font-weight: bold; text-decoration: underline;">libs/kotext/styles/KoParagraphStyle.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 KoParagraphStyle::loadOdf(const KoXmlElement *element, KoShapeLoadingContext &scontext)</pre></td>

  </tr>
 </tbody>





 
 


 <tbody>

  <tr>
    <th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1179</font></th>
    <td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="c1">//1.6: KoTextFormat::load</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;">KoCharacterStyle::loadOdf(context);
?
</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/103017/diff/1/?file=40048#file40048line1865" style="color: black; font-weight: bold; text-decoration: underline;">libs/kotext/styles/KoParagraphStyle.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 KoParagraphStyle::removeDuplicates(const KoParagraphStyle &other)</pre></td>

  </tr>
 </tbody>






 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1844</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">compareCharacterProperties</span><span class="p">(</span><span class="n">other</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">1817</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">compareCharacterProperties</span><span class="p">(</span><span class="n">other</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;">Wasn't that method just removed 10 lines above? I don't see that it was added to the KoCharacterStyle or anywhere else... hmmm?</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/103017/diff/1/?file=40049#file40049line168" style="color: black; font-weight: bold; text-decoration: underline;">libs/kotext/styles/KoStyleManager.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 KoStyleManager::saveOdf(KoShapeSavingContext &context)</pre></td>

  </tr>
 </tbody>





 
 


 <tbody>

  <tr>
    <th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">168</font></th>
    <td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="k">if</span> <span class="p">(</span><span class="n">characterStyle</span> <span class="o">==</span> <span class="n">d</span><span class="o">-></span><span class="n">defaultParagraphStyle</span><span class="o">-></span><span class="n">characterStyle</span><span class="p">()</span> <span class="o">||</span> <span class="n">characterParagraphStyles</span><span class="p">.</span><span class="n">contains</span><span class="p">(</span><span class="n">characterStyle</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="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;">so, something like
Q_ASSERT(!dynamic_cast<KoParagraphStyle*>(characterStyle) || dynamic_cast<KoParagraphStyle*>(characterStyle) != d->defaultParagraphStyle);
would not assert here?
Means it cannot happen that the default KoParagraphStyle is in the d->charStyles list?</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/103017/diff/1/?file=40054#file40054line224" style="color: black; font-weight: bold; text-decoration: underline;">plugins/textshape/dialogs/StylesModel.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 StylesModel::addParagraphStyle(KoParagraphStyle *style)</pre></td>

  </tr>
 </tbody>





 
 


 <tbody>

  <tr>
    <th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">224</font></th>
    <td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">foreach</span><span class="p">(</span><span class="n">KoParagraphStyle</span> <span class="o">*</span><span class="n">ps</span><span class="p">,</span> <span class="n">m_styleManager</span><span class="o">-></span><span class="n">paragraphStyles</span><span class="p">())</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="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;">same question as above</pre>
</div>
<br />



<p>- Sebastian</p>


<br />
<p>On November 1st, 2011, 5:41 p.m., C. Boemann 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 C. Boemann.</div>


<p style="color: grey;"><i>Updated Nov. 1, 2011, 5:41 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;">Fix inheritance in paragraph styles
introduce inheritance in character styles</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;">cstester, show some improvements and some regressions</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/KoTextEditor.cpp <span style="color: grey">(91dc334)</span></li>

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

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

 <li>libs/kotext/styles/KoCharacterStyle.h <span style="color: grey">(53e98a1)</span></li>

 <li>libs/kotext/styles/KoCharacterStyle.cpp <span style="color: grey">(665e066)</span></li>

 <li>libs/kotext/styles/KoParagraphStyle.h <span style="color: grey">(3f9f40c)</span></li>

 <li>libs/kotext/styles/KoParagraphStyle.cpp <span style="color: grey">(cdf16a4)</span></li>

 <li>libs/kotext/styles/KoStyleManager.cpp <span style="color: grey">(fbbc4ee)</span></li>

 <li>libs/kotext/styles/tests/TestStyles.cpp <span style="color: grey">(ea7a434)</span></li>

 <li>libs/textlayout/KoTextLayoutArea.cpp <span style="color: grey">(28e4141)</span></li>

 <li>plugins/textshape/TextTool.cpp <span style="color: grey">(e699319)</span></li>

 <li>plugins/textshape/dialogs/StyleManager.cpp <span style="color: grey">(6110044)</span></li>

 <li>plugins/textshape/dialogs/StylesModel.cpp <span style="color: grey">(168ef715)</span></li>

 <li>tables/Cell.cpp <span style="color: grey">(0a74d9f)</span></li>

 <li>tables/Map.cpp <span style="color: grey">(956b3e1)</span></li>

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

</ul>

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




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








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