<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/105873/">http://git.reviewboard.kde.org/r/105873/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On August 5th, 2012, 11:03 a.m., <b>Friedrich W. H. Kossebau</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="http://git.reviewboard.kde.org/r/105873/diff/2/?file=76072#file76072line79" style="color: black; font-weight: bold; text-decoration: underline;">plugins/vectorshape/VectorShapeFactory.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</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; ">bool VectorShapeFactory::supports(const KoXmlElement & e, KoShapeLoadingContext &context) const</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">79</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="c1">// seems like MSO does not always write a mimetype</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">80</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="c1">// see jeffcoweb.jeffco.k12.co.us%2Fhigh%2Fchatfield%2Fdepartments%2Fbusiness%2Fbanking_finance%2Funit_Plan_Budget.odp</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">81</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">mimetype</span><span class="p">.</span><span class="n">isEmpty</span><span class="p">()</span> <span class="o">||</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;">From ODF 1.2 Part 3 ยง4.8.10:
"A manifest:media-type attribute should be present for all files and directories where a MIME media type exists for the content of the file, or the document or sub document contained in a directory."
So if there is no (registered) mimetype it seems spec-compliant to not write a mimetype. And for WMF/EMF/SVM there is no IANA-registered mimetype.
So perhaps Calligra should follow MSO here (and so should LO, if they do not already).</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;">The problem is not that the media-type attribute is missing in the given file. The problem here is that the full file is missing in the manifest and therefore no mimetype is returned.</pre>
<br />
<p>- Thorsten</p>
<br />
<p>On August 5th, 2012, 10:14 a.m., Thorsten Zachmann 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 Thorsten Zachmann.</div>
<p style="color: grey;"><i>Updated Aug. 5, 2012, 10:14 a.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;">In the commit 9efb4e33f2729080b1f1f24bb18970499a21f2b9 unfortunately a regression was introduced so that loading of vector shapes generated by OO/LO/MSO and our filters no longer work. Unfortunately this commit is also in the 2.5 release. This can be seen e.g. with the following documents:
sundaram.fedorapeople.org%2Fpresentations%2Ffedora-fail-learn.odp
jeffcoweb.jeffco.k12.co.us%2Fhigh%2Fchatfield%2Fdepartments%2Fbusiness%2Fbanking_finance%2Funit_Plan_Budget.odp
drwho.virtadpt.net%2Ffiles%2FNOVALUG-Tor.odp
but much much more of our test documents are effected. There is also a crash in the last document due to which I noticed the problem and started investigating.
The problem is that our filters and the other apps create mimetypes that se no longer load with the above mentioned commit.
This patch fixes the filter to use the new mimetypes when converting files and adding other mimetypes that are written be e.g. OO or guessed by the mimetype guesser of some of the files.
Additionally fixed by this patch is to not load the first child element twice as when the first loading failed it makes no sense to try it a second time.
It also fixes a problem that the formula shape and the chart shape tried to load every embedded document even if it had the wrong mimetype.
I think this should be backported to 2.5 and put into the release as it is quite a big regressions since the RC
</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;">Run cstester and now the vector shapes are back and additionally some additional vector shapes are now loaded correctly.</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>filters/libmso/pictures.cpp <span style="color: grey">(26158df)</span></li>
<li>libs/flake/KoShapeRegistry.cpp <span style="color: grey">(9a3712f)</span></li>
<li>libs/odf/KoOdfLoadingContext.cpp <span style="color: grey">(8b0d44e)</span></li>
<li>plugins/chartshape/ChartShapeFactory.cpp <span style="color: grey">(b3a5014)</span></li>
<li>plugins/formulashape/KoFormulaShapeFactory.cpp <span style="color: grey">(7ce11fd)</span></li>
<li>plugins/vectorshape/VectorShapeFactory.cpp <span style="color: grey">(f9ce5af)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/105873/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>