How to use a shape without using its tools?

Inge Wallin inge at lysator.liu.se
Thu Jul 7 08:34:55 BST 2011


I have just added a patch to the reviewboard: 
http://git.reviewboard.kde.org/r/101871/  This mail is about an issue with 
this patch.

Here is the description of (one of) the issues that it solves:

> 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.

I chatted with Zagge about this, and he said that he didn't like the fact that 
with this patch, showing a preview image is only possible with svg and bitmap 
formats.  All preview of other vector formats like WMF, EMF and SVM is lost.  
This is true, and indeed serious.

When preparing this patch, Dan and I tried to integrate the picture shape and 
if that had gone well also the vector shape. However, that failed because we 
couldn't find a way to disable the picture tool. We do not want the user to be 
able to replace the preview image with something else.

So, as it is now the patch is important (it fixes a dataloss problem) but it 
also removes some nice preview features.  We would be able to solve this 
problem if we could find a way to use the image or vector shapes but with 
their tools disabled.  Any ideas on how to do that?

	-Inge



More information about the calligra-devel mailing list