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

C. Boemann cbr at boemann.dk
Sun Oct 2 10:39:44 BST 2011


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


shouldn't this be closed ?

- C. Boemann


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.
> 
> 
> Description
> -------
> 
> 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/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 Wallin
> 
>

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


More information about the calligra-devel mailing list