On Fri, Mar 16, 2007 at 10:46:57AM +0100, Abdelrazak Younes wrote:
> >It surely has. In the main inset go down to cell slice[0].cell, walk
> >down to paragraph slice[0].pit, go to pos slice[0].pos, Take the inset
> >there. Go to its cell slice[1].cell, paragraph slice[1].pit, position
> >slice[1].pos. And so on. Ordinary text insets have a single cell only,
> >tables and a lot of math insets may have more than one.
> 
> Am I the only one who think this is not simple?

Don't know. What would be the alternative?

> >Not really. We had the parent way for about ten years, yet no way to
> >iterate over the document. So implementing it was obviously not trivial
> >as having no way to iterate over a document hurt a lot...
> 
> Come on, look at DocIterator::forwardPos() and backwardPos(), I am 
> pretty sure this could be simplified by having access to the tree 
> information.

Could be. It is pretty well encapsulated, though, so I wonder why
saving a dozen lines of some implementation detail makes so much
of a difference in your eyes.

> >I am not saying the parent approach is wrong.  However, it has a lot of
> >implications. A whole lot.
> 
> As I said, I am not advocating a complete switch to the parent approach.

Anythiung inbetween doesn't make much sense maintanance-wise.

Andre'

Reply via email to