On 13-Dec-2001 Jean-Marc Lasgouttes wrote:

> OK, but it is right for 1.1.6, isn't it?

I don't really know, but I guess the code is not that different!

> Juergen> We have to release the paragraphs only at the end
> Juergen> of the function! I think we could save the Paragraph * in a
> Juergen> vector and then delete them at the end. That would be clean
> Juergen> enough IMO.
> 
> Why do we have to do that?

To free the unused paragraphs?

> OK, this LyXText::ownerParagraph starts with
> 
> void LyXText::ownerParagraph(int id, Paragraph * p) const
> {
>       Paragraph * op = bv_owner->buffer()->getParFromID(id);
>       if (op && op->inInset()) {
>               static_cast<InsetText *>(op->inInset())->paragraph(p);
> 
> So you are looking for tmppar3 inside the buffer, right? But how can
> it be there already, since you have not linked it in at this point?

No I'm looking for it's ID! Heed that undo-paragraphs have the same ID
as used paragraphs otherwise how would I find the paragraph I have to
substitute?

> I know that. Actually I figured this out after looking at the code
> long enough.

Good so it seems to be good code!

> So we are looking for information in these freed paragraphs although
> we know they are not quite right?

No but we have to free the rows which where used by the substitued paragraphs
and we probably access next/previous pointers.

           Jug

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen Vigna        E-Mail:  [EMAIL PROTECTED]
Italienallee 13/N       Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen           Web:     http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

Twenty years of romance make a woman look like a ruin; but twenty years of
marriage make her something like a public building.
                -- Oscar Wilde

Reply via email to