<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/105624/">http://git.reviewboard.kde.org/r/105624/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On July 20th, 2012, 10:31 a.m., <b>Inge Wallin</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/105624/diff/2/?file=73724#file73724line42" 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; "></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">41</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">setToolTip</span><span class="p">(</span><span class="n">i18n</span><span class="p">(</span><span class="s">"A shape that shows a vector image"</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">42</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">setToolTip</span><span class="p">(</span><span class="n">i18n</span><span class="p">(</span><span class="s">"A shape that shows a vector image<span class="hl"> (EMF/WMF)</span>"</span><span class="p">));</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;">...and SVM (Starview metafile).
SVG should be really simple to add, considering the SVG renderer in Qt.</pre>
</blockquote>
<p>On July 20th, 2012, 12:50 p.m., <b>Friedrich W. H. Kossebau</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">So the new text should be "A shape that shows a vector image (EMF/WMF/SVM)", you mean?
For consistency that would need a change in the tool's text as well:
setToolTip( i18n( "EMF/WMF/SVM Vector Shape tool" ) );
Can we expect SVM as files? So would the tooltip of the tool's optionwidget also need to be changed to
button->setToolTip(i18n( "Open EMF/WMF/SVM Shape"));
?</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;">Yeah, I think SVM should be mentioned. I agree it's far less likely to encounter them in the wild. They are mostly just part of ODF files saved by old versions of OOo. They are quite rare as stand-alone files. Yet, why not? At some point the list is going to be unwieldy when we add SVG and other formats but let's handle that then.
I haven't been able to find an official mime type for SVM. If you could dig one up that would be awesome.
Btw, maybe "Vector Image tool" is better than "Vector Shape tool". A vector image is a well known thing, the name vector shape is just for internal use in the calligra code.</pre>
<br />
<p>- Inge</p>
<br />
<p>On July 20th, 2012, 2:59 a.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 Inge Wallin.</div>
<div>By Friedrich W. H. Kossebau.</div>
<p style="color: grey;"><i>Updated July 20, 2012, 2:59 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;">Other than with the picture shape, after adding a new vector shape one first has to activate the vector tool, then click the open button.
Not very user-friendly and also inconsistent -> isn't that a bug from your, Inge's, POV? :) (\me thinks of zooming behaviour in Stage).
Attached patch fixes this by adding a configwidget also to the vector shape, copied from the picture shape and adapted.
The patch also fixes the icon for the shape and the tool to an existing one.
And adds "(EMF/WMF)" to the tooltip of the shape, to make it more obvious what this shape is about (especially in Karbon).
Q1: Is that vector shape just for EMF, WMF officially? What about SVG (not only as in SVM from OOo)?
Q2: Seems there is no official mimetype for WMF and EMF. Wikipedia say image/x-wmf and image/x-emf, and so does the XDG database (that's why these are used for the filedialog, while Oxygen icons use application-x-wmf, like the code in VectorShape.cpp with application/x-wmf and application/x-emf. Is the code correct here?
The updated patch turned to use image/x-wmf and image/x-emf for the manifest file mimetypes, at least LO seems to not care.
It also sets the flag estimateByContent for context.odfLoadingContext().mimeTypeForPath(...), like recently added for the SVG loading, because at least LO 3.5.3 does not write any mimetype for WMF as well.
And makes the code avoid some unneeded compression roundtrips, by
* remembering the type in the ChangeVectorDataCommand
* for rendering using a separate uncompressed copy of the content
Okay to backport to 2.5, without the tooltip string change?</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;">Edited ODT files with WMF files (adding, removing, changing) and did roundtrips with LO 3.5.3</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>plugins/vectorshape/CMakeLists.txt <span style="color: grey">(da25dbb)</span></li>
<li>plugins/vectorshape/ChangeVectorDataCommand.h <span style="color: grey">(349e630)</span></li>
<li>plugins/vectorshape/ChangeVectorDataCommand.cpp <span style="color: grey">(b9424eb)</span></li>
<li>plugins/vectorshape/VectorShape.h <span style="color: grey">(dc98d80)</span></li>
<li>plugins/vectorshape/VectorShape.cpp <span style="color: grey">(44bfd1a)</span></li>
<li>plugins/vectorshape/VectorShapeConfigWidget.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/vectorshape/VectorShapeConfigWidget.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>plugins/vectorshape/VectorShapeFactory.cpp <span style="color: grey">(07e02ae)</span></li>
<li>plugins/vectorshape/VectorTool.cpp <span style="color: grey">(f2a131f)</span></li>
<li>plugins/vectorshape/VectorToolFactory.cpp <span style="color: grey">(04212c6)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/105624/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>