Working on deleting anchored objects in Words

Pierre Stirnweiss pstirnweiss at googlemail.com
Wed Jan 4 08:49:27 GMT 2012


Indeed, the change tracking system needs to know about it. And secondly, if
you remove a character from the QTextDocument, Qt will create an undo/redo
command internally. If you do not have a corresponding  command on your
application undoStack, you'll be out of sync with QTextDocument internal
undoStack.
This is the reason the current show/hide changes create an undo/redo action
(because they add/remove the text from the QTextDocument).

PierreSt


On Wed, Jan 4, 2012 at 9:34 AM, Boudewijn Rempt <boud at valdyas.org> wrote:

> On Wednesday 04 January 2012 Jan, Thorsten Zachmann wrote:
>
> > When there is a anchor belonging to the shape, it also removes the
> anchor from
> > the document. This is done by circumventing the command generation of
> > KoTextEditor. I do this because there should be no additional commands
> > generated besides the DeleteShapeCommand. As the data to recovering the
> > deletion is stored in the application data it is not needed that a undo
> > command for the actual removal of the anchor is created.
>
> Well, in my kotext-inlinecommand-rempt I was close to solving the same
> bug, but the other way around: I put the creation of the command in
> KoTextEditor instead because the change tracking mechanism needs to know
> about it. Also, anchors aren't only created in the addFrameSet method,
> afaik.
>
> --
> Boudewijn Rempt
> http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl
> _______________________________________________
> calligra-devel mailing list
> calligra-devel at kde.org
> https://mail.kde.org/mailman/listinfo/calligra-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120104/48effbb9/attachment.htm>


More information about the calligra-devel mailing list