<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/104956/">http://git.reviewboard.kde.org/r/104956/</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 1087cdb8dae04e350adbacda6f68dd3710fbc4d0 by Friedrich W. H. Kossebau to branch master.</pre>
 <br />







<p>- Commit</p>


<br />
<p>On May 15th, 2012, 4:32 p.m., Friedrich W. H. Kossebau 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 Friedrich W. H. Kossebau.</div>


<p style="color: grey;"><i>Updated May 15, 2012, 4:32 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;">Initially found for calligratests/odf/odt/portrait_landscape.odt:
INVALIDSTYLESXML (unknown file):62: error: element "style:style" missing required attribute "style:family"
(see http://158.36.191.251:8080/viewLog.html?buildId=6567&tab=buildResultsDiv&buildTypeId=bt7#testId2825 )

Reason here was the missing  "style:family="table"", coming from the not passed argument "table" in line 250 of KoStyleManager.cpp

And looking at the rest of the code it seems there are more places where the family name needs to be passed, so I added the family name there as well. But that part is not explicitely tested by me, needs input from someone with knowledge here.

Having done this patch I wonder why the API asks at all to get the family name explicitely passed. Isn't it always the same family name (or none in some cases) for a given KoGenStyle::Type? At least for what grepping the sources gave me that impression. So a proper fix would be to remove this parameter from the construcor and instead have the family name selected automatically. Should prevent such mistakes, slightly limit the number of strings in the .data section (and source code).</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;">validation passes for odf/odt/portrait_landscape.odt</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/styles/KoStyleManager.cpp <span style="color: grey">(d769f52)</span></li>

</ul>

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




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








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