Review Request: Fix issue with loading unknown frame shapes and give the Unavail shape the ability to show preview pictures

Thorsten Zachmann t.zachmann at zagge.de
Thu Jul 7 08:39:48 BST 2011


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


If I understood correctly this removes showing of backup images like .svm .emf .wfm as that is not supported at the moment. Therefore I think that should be added first to the patch before it should be applied as we will loose quite a lot of visible stuff we can show now.

- Thorsten


On July 7, 2011, 6:59 a.m., Inge Wallin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101871/
> -----------------------------------------------------------
> 
> (Updated July 7, 2011, 6:59 a.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Summary
> -------
> 
> This patch does two things:
> 
> 1. It fixes a serious issue with loading frame shapes with unknown contents.  Previously, when a frame with unrecognized contents, such as an embedded spreadsheet, was loaded, it went through all the objects in the frame. If even one of the objects were recognized, such as a preview image, then a shape was created for that object. This means that the real contents of the frame got lost and only the preview image could be saved back.  This is not how it's supposed to be.  The new logic is to create an Unavail shape as soon as the payload of the frame, i.e. the first object in it, is unrecognized. It is then up to the unavail shape to load and store any preview images. It is also up to the unavail shape to save everything back.  This patch does this.
> 
> 2. It gives the Unavail shape the ability to show preview images. Actually it gives the shape the ability to show both vector images using SVG and bitmap images using any format that QImage supports. We have not integrated this with the picture shape since we couldn't find a way to disable the picture tool for this shape alone.
> 
> Note: Much of the code was written by Dan Leinir.
> 
> 
> Diffs
> -----
> 
>   libs/flake/KoUnavailShape.cpp c9bfc77 
>   libs/flake/KoUnavailShape.h fb346f7 
>   libs/flake/KoShapeRegistry.cpp 06e4c7c 
> 
> Diff: http://git.reviewboard.kde.org/r/101871/diff
> 
> 
> Testing
> -------
> 
> You can test this patch by creating a document with a music shape in it.  The music shape already creates preview images in svg and png formats. To test the creation of the unavail shape and the preview of the svg image, you have to remove musicshape.desktop in the install directory and rerun kbuildsysoca4. Then the contents of the frame with the music in it won't be recognized and the unavail shape will be created instead. You will notice that the preview image looks a bit distorted.  This is a bug with the music shape that creates a preview svg with the wrong size.  That bug is not in the scope of this patch but has to be fixed separately.
> 
> There is also a saving bug with the unavail shape that is also not within the scope of this patch.  I will fix that in a separate patch.
> 
> 
> Thanks,
> 
> Inge
> 
>

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


More information about the calligra-devel mailing list