[prev in list] [next in list] [prev in thread] [next in thread] 

List:       calligra-devel
Subject:    words: images with anchoring enabled will be saved twice to odf.
From:       Silvio Heinrich <plassy () web ! de>
Date:       2011-12-16 9:54:22
Message-ID: 4EEB154E.5050206 () web ! de
[Download RAW message or body]

There is a problem when saving a text document that contains anchored 
images.
In the saving process the saveOdf method of the shape (the pictureshape 
in this case) is called twice because the shape itself exists twice in 
the document.
The shape is added to the KWDocument and if it is anchored it is also 
passed to a KoTextAnchor instance that is added as an inline object.
Now when saving it seems as if first all the shapes and then all the 
inline objects will be saved.
That leads to an odf output like this:

// 1. pictureshape is saves
<frame ...><image .../></frame>
// 2. inline object (the KoTextAnchor) is saved
// it puts a paragraph tag around the image and calls the safeOdf method 
of the imageshape again
<p ...><frame ...><image .../></frame></p>

So for me it seems when the shape is anchored it should be removed from 
the KWDocument
but on the other hand it needs to be present in the KWDocument to render 
and interact with the shape.

Does anyone have a guess how to solve this problem?
_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic