<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/104032/">http://git.reviewboard.kde.org/r/104032/</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;">This review has been submitted with commit d09e90b5163a5193f11d8edc50e9617efaa98cc5 by Elvis Stansvik to branch master.</pre>
 <br />







<p>- Commit</p>


<br />
<p>On February 24th, 2012, 2:22 p.m., Elvis Stansvik 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 and C. Boemann.</div>
<div>By Elvis Stansvik.</div>


<p style="color: grey;"><i>Updated Feb. 24, 2012, 2:22 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;">State of things before the patch:

Changing properties of a paragraph style does not update
paragraphs with the corresponding style. The problem was
that in libs/kotext/styles/ChangeFollower.cpp, the block
format was simply not set.

This patch:

- Adds frameBlockFormat()/setFrameBlockFormat() to
  KoTextDocument (analog to the existing
  frameCharFormat()/setFrameCharFormat()). The setter is
  called from KoTextLoader.

- Changes ChangeFollower::collectNeededInfo(...) to also
  collect

    blockParentFormat
      The block format of the frame.
    blockDirectFormat
      The block format that was due to direct
      paragraph formatting.
    blockParentCharFormat
      The char format of the frame.
    blockDirectCharFormat
      The char format that was due to direct
      paragraph formatting.

  into its Memento instance.

- Changes ChangeFollower::processUpdates to apply the
  aggregation of parent (frame) format + paragraph style
  + direct formatting to the block (likewise for char
  formatting properties).

State of things after the patch:

Changing properties of a paragraph style in the Style
Manager will now update paragraphs in the document. If
local paragraph formatting has been added, it is left
alone.

Things that were broken before and still are:

o The character properties in the Paragraph Format
  dialog (direct formatting) have no effect.

o The Line Spacing combo in the Paragraph Format
  dialog (direct formatting) has no effect (Use
  Font Metrics checkbox and Minimum spinbox works
  though).

I believe these two are bugs elsewhere. I'll take a
look at it.</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;">- Typed in two paragraphs of text with the style Standard.
- Changed things such as Left Indent, Alignment et.c. in
  the Standard style and made sure the paragraphs updated.
- Opened the Paragraph Format dialog for direct formatting
  and overrided some properties.
- Opened the Standard style again and made sure changing
  the style properties wouldn't override the direct
  formatting.</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/KoTextDocument.h <span style="color: grey">(56f55e6)</span></li>

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

 <li>libs/kotext/commands/ChangeStylesCommand.cpp <span style="color: grey">(b9fa725)</span></li>

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

 <li>libs/kotext/styles/ChangeFollower.h <span style="color: grey">(8551801)</span></li>

 <li>libs/kotext/styles/ChangeFollower.cpp <span style="color: grey">(38aaf8d)</span></li>

</ul>

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




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








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