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







<p>- Commit</p>


<br />
<p>On July 8th, 2012, 8:58 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 and Jan Hambrecht.</div>
<div>By Friedrich W. H. Kossebau.</div>


<p style="color: grey;"><i>Updated July 8, 2012, 8:58 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;">calligratests/interoperability/spreadsheets/oocalc/oos_auto_shapes.ods showed that EnhancedPathShape writes non-integer values to svg:viewBox. The reason is that in that class and other places the viewbox is stored and handled as a QRectF.

Attached patch fixes that by storing any viewBox as QRect and thus having EnhancedPathShape also writing viewbox as integer data again.

Okay to backport to 2.5 as well?

The patch does not fix the issue that graph data is slightly changed on a few loading/saving roundtrips, due to KoShape::saveOdfAttributes(...) calculating the viewbox on the fly and storing it with
        const QSizeF s(size());
        QString viewBox = QString("0 0 %1 %2").arg(qRound(s.width())).arg(qRound(s.height()));
        context.xmlWriter().addAttribute("svg:viewBox", viewBox);
That needs some bigger patch, storing the viewbox in the shape as loaded, so deep patching into all path shapes. I am working on this, but that will need some more time and good review/testing. This patch here only fixes writing of invalid data.
Also adds a comment to KoMarker currently ignoring the <min-x>, <min-y> properties of viewbox. Separate issue, so separate fix/patch IMHO.</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;">Loaded and saved a few files with graph shapes. And ran validateODF.py oos_auto_shapes.ods, with no more error.</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/flake/KoMarker.cpp <span style="color: grey">(55421d5)</span></li>

 <li>libs/flake/KoPathShape.h <span style="color: grey">(587ebdf)</span></li>

 <li>libs/flake/KoPathShape.cpp <span style="color: grey">(3d9f6b7)</span></li>

 <li>plugins/pathshapes/enhancedpath/EnhancedPathParameter.cpp <span style="color: grey">(30e2925)</span></li>

 <li>plugins/pathshapes/enhancedpath/EnhancedPathShape.h <span style="color: grey">(1919bb1)</span></li>

 <li>plugins/pathshapes/enhancedpath/EnhancedPathShape.cpp <span style="color: grey">(a57fbea)</span></li>

 <li>plugins/pathshapes/enhancedpath/EnhancedPathShapeFactory.cpp <span style="color: grey">(d820c43)</span></li>

</ul>

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




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








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