Re: Crash: Document Class Conversion

2006-05-29 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: >> What would happen if this one was declared as taking a InsetText & >> as argument? Georg> I don't know, but I don't want to try since I think that this Georg> is wrong: the doc iterator does not need any InsetText Georg> properties, doc_i

Re: Crash: Document Class Conversion

2006-05-25 Thread Georg Baum
Am Montag, 22. Mai 2006 16:02 schrieb Jean-Marc Lasgouttes: > > "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: > > Georg> Jean-Marc Lasgouttes wrote: > >>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: > >> > PS: when I see things like this + static_cast &>(buffer->inset()

Re: Crash: Document Class Conversion

2006-05-22 Thread Andre Poenitz
On Mon, May 22, 2006 at 11:15:37AM +0200, Jean-Marc Lasgouttes wrote: > PS: when I see things like this > + static_cast(buffer->inset()), el); > it makes me wonder why Buffer::inset() is an InsetBase and not an > InsetText... Good question. I think it could be changed to return an Ins

Re: Crash: Document Class Conversion

2006-05-22 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Jean-Marc Lasgouttes wrote: >> Would there be a way to avoid this problem? I tried to think about >> how to make std::swap fail, for example, but I do not know. Georg> Inheriting from boost::noncopyable should work, but will of Georg>

Re: Crash: Document Class Conversion

2006-05-22 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Jean-Marc Lasgouttes wrote: >>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: >> PS: when I see things like this + static_cast>>> &>(buffer->inset()), el); it makes me wonder why Buffer::inset() is an InsetBase and no

Re: Crash: Document Class Conversion

2006-05-22 Thread Georg Baum
Jean-Marc Lasgouttes wrote: >> "Georg" == Georg Baum >> <[EMAIL PROTECTED]> >> writes: > >>> PS: when I see things like this + static_cast>> &>(buffer->inset()), el); it makes me wonder why Buffer::inset() is >>> an InsetBase and not an InsetText... > > Georg> Indeed. Shall we change

Re: Crash: Document Class Conversion

2006-05-22 Thread Abdelrazak Younes
Georg Baum a écrit : Abdelrazak Younes wrote: Yes, one that will use list::splice. I have proposed that many times but no one heard me... Why list::splice()? splice just moves data, no copy at all, no creation => very fast. I send a patch a while ago that introduced a new splice method in

Re: Crash: Document Class Conversion

2006-05-22 Thread Georg Baum
Abdelrazak Younes wrote: > Yes, one that will use list::splice. I have proposed that many times but > no one heard me... Why list::splice()? And if that has some advantage, why not use it in the current swap() method? Georg

Re: Crash: Document Class Conversion

2006-05-22 Thread Georg Baum
Jean-Marc Lasgouttes wrote: > Would there be a way to avoid this problem? I tried to think about how > to make std::swap fail, for example, but I do not know. Inheriting from boost::noncopyable should work, but will of course prevent copying at other places, too. > Or we could > have a std::swa

Re: Crash: Document Class Conversion

2006-05-22 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> std::swap copies the two ParagraphLists and therefore also each Georg> paragraph. That triggers exactly the problem we had with the Georg> old implementation: par ids are invalidated, and some inset Georg> p

Re: Crash: Document Class Conversion

2006-05-22 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> std::swap copies the two ParagraphLists and therefore also each Georg> paragraph. That triggers exactly the problem we had with the Georg> old implementation: par ids are invalidated, and some inset Georg> pointers in CursorSlices. I d

Re: Crash: Document Class Conversion

2006-05-22 Thread Georg Baum
Jean-Marc Lasgouttes wrote: >> "Georg" == Georg Baum >> <[EMAIL PROTECTED]> >> writes: > > Georg> I got one after a bit of debugging. The problem is not the > Georg> BufferView cache, but the use of std::swap() instead of the > Georg> specialized pars.swap() in CutAndPaste.C. It inval

Re: Crash: Document Class Conversion

2006-05-22 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> I got one after a bit of debugging. The problem is not the Georg> BufferView cache, but the use of std::swap() instead of the Georg> specialized pars.swap() in CutAndPaste.C. It invalidates some Georg> inset pointers in CursorSlice.

Re: Crash: Document Class Conversion

2006-05-21 Thread Georg Baum
Am Sonntag, 21. Mai 2006 16:14 schrieb Juergen Spitzmueller: > It might be another consequence of the problematic BufferView cache situation > in tabulars. Georg, do you have an idea? I got one after a bit of debugging. The problem is not the BufferView cache, but the use of std::swap() instead

Re: Crash: Document Class Conversion

2006-05-21 Thread Joost Verburg
Juergen Spitzmueller wrote: Something seems to be seriously wrong with tables. I'm working on quite some tables today and I get more crashes. Maybe it's all related to the same issue. Please report all of them. When I can reproduce one I'll report it, but it's not always easy to find the cau

Re: Crash: Document Class Conversion

2006-05-21 Thread Juergen Spitzmueller
Also sprach Joost Verburg: > Something seems to be seriously wrong with tables. I'm working on quite > some tables today and I get more crashes. Maybe it's all related to the > same issue. Please report all of them. Jürgen

Re: Crash: Document Class Conversion

2006-05-21 Thread Joost Verburg
Juergen Spitzmueller wrote: It might be another consequence of the problematic BufferView cache situation in tabulars. Georg, do you have an idea? Something seems to be seriously wrong with tables. I'm working on quite some tables today and I get more crashes. Maybe it's all related to the sa

Re: Crash: Document Class Conversion

2006-05-21 Thread Juergen Spitzmueller
Joost Verburg wrote: > I'm trying to convert a document with tables to another document class. > LyX 1.4.2svn however crashes. > > To reproduce: > > * Start a new document > * Insert a table > * Insert some text (a single character is enough) to one of the cells > * Go to Document > Settings and se