Review Request: adds a VectorShapeConfigWidget which gets shown on shape creation (like with PictureShape)

Friedrich W. H. Kossebau kossebau at kde.org
Fri Jul 20 14:34:58 BST 2012



> On July 20, 2012, 10:31 a.m., Inge Wallin wrote:
> > plugins/vectorshape/VectorShapeFactory.cpp, line 42
> > <http://git.reviewboard.kde.org/r/105624/diff/2/?file=73724#file73724line42>
> >
> >     ...and SVM (Starview metafile).
> >     
> >     SVG should be really simple to add, considering the SVG renderer in Qt.
> 
> Friedrich W. H. Kossebau wrote:
>     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"));
>     ?
> 
> Inge Wallin wrote:
>     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.

Good idea with the s/shape/image/, will also bring more consistency.

Okay, so those three strings will be:
"A shape that shows a vector image (EMF/WMF/SVM)"
"Vector Image (EMF/WMF/SVM) tool"
"Open Vector Image (EMF/WMF/SVM)"

Commit to master will follow in half an hour, so shout quickly if there is any issue left.

Backport will be without any strings changes.


WRT the mimetype of SVM, seems there is none (none registered at IANA, and anywhere else it seems just guess work). Also, SVM seem just intended as an internal format inside the staroffice format. So let's use the mimetype id which staroffice/OOo used for it. Which is? Or was there none set?


- Friedrich W. H.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105624/#review16148
-----------------------------------------------------------


On July 20, 2012, 2:59 a.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105624/
> -----------------------------------------------------------
> 
> (Updated July 20, 2012, 2:59 a.m.)
> 
> 
> Review request for Calligra and Inge Wallin.
> 
> 
> Description
> -------
> 
> 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?
> 
> 
> Diffs
> -----
> 
>   plugins/vectorshape/CMakeLists.txt da25dbb 
>   plugins/vectorshape/ChangeVectorDataCommand.h 349e630 
>   plugins/vectorshape/ChangeVectorDataCommand.cpp b9424eb 
>   plugins/vectorshape/VectorShape.h dc98d80 
>   plugins/vectorshape/VectorShape.cpp 44bfd1a 
>   plugins/vectorshape/VectorShapeConfigWidget.h PRE-CREATION 
>   plugins/vectorshape/VectorShapeConfigWidget.cpp PRE-CREATION 
>   plugins/vectorshape/VectorShapeFactory.cpp 07e02ae 
>   plugins/vectorshape/VectorTool.cpp f2a131f 
>   plugins/vectorshape/VectorToolFactory.cpp 04212c6 
> 
> Diff: http://git.reviewboard.kde.org/r/105624/diff/
> 
> 
> Testing
> -------
> 
> Edited ODT files with WMF files (adding, removing, changing) and did roundtrips with LO 3.5.3
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120720/94576f44/attachment.htm>


More information about the calligra-devel mailing list