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

List:       koffice-devel
Subject:    Re: Change Tracking of Inline Objects - Patch v1
From:       Pierre Stirnweiss <pstirnweiss () googlemail ! com>
Date:       2010-02-24 18:42:53
Message-ID: 201002241942.53484.pierre.stirnweiss_gen () gadz ! org
[Download RAW message or body]

Le Wednesday 24 February 2010 10:40:16, Ganesh Paramasivam a écrit :
> Pierre,
> 
> Pierre please find attached the first version of the patch for
> tracking changes of inline objects. This version is mainly for the
> visualization of inline object changes as well as for the Show/Hide
> changes. I'm aware of the fact that these will go away once the new
> approach is done. But I was not sure about how soon/late the new
> approach will take. Hence I decided to implement this as a stop-gap
> solution thinking that the effort would be minimal ( Turned out to be
> a bad idea. See below ). As a side-note, while implementing this, I
> was wondering how a deleted inline image would be displayed in the new
> solution.
> 
> I have a really *UGLY* hack in show changes. During show changes, if
> we find that an inserted fragment contains a KoTextAnchor, we need to
> insert the shape associated with the Anchor. However just calling
> KoShapeController::addShapeDirect results in a bizzare layout. On
> further debugging, I realized that the parent of this shape needs to
> be set before adding it. However, it is not possible to find the
> parent of this shape that easily ( Because shapeForPosition would
> return the right parent only once a layout is done ). So for now, I
> set the first shape in KoTextDocumentLayout as it's parent.
> 
> If you think that we need a complete and working solution for this
> problem please let me know. I can go back and solve this the right
> way.
> 
> Thanks,
> Ganesh

I think the hack is ok for now (but perhaps I have missed something). I 
haven't had the time to hack lately and it will probably be so until next 
week. I still hope to be able to implement the delete bubbles for 2.2. I have 
an almost finished solution now. I need to clean up a bit and come up with a 
cache system.

Regarding the patch, you are using the changeTracker in KoTextAnchor. Please 
test for it before using one of its method. Outside KWord, the changeTracker 
will be a null pointer.

Pierre
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel

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

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