Re: [patch] fix bug 2060

2005-10-05 Thread Jean-Marc Lasgouttes
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg It looks like the attached, then. The asserts (if we add any) Georg belong in MathNestInset::cell, MathGridInset::col and Georg MathGridInset::row, because bad indices would harm there. I do not really see why the asserts in MathGridInset are

Re: [patch] fix bug 2060

2005-10-05 Thread Georg Baum
Am Mittwoch, 5. Oktober 2005 18:06 schrieb Jean-Marc Lasgouttes: Georg == Georg Baum [EMAIL PROTECTED] writes: Georg It looks like the attached, then. The asserts (if we add any) Georg belong in MathNestInset::cell, MathGridInset::col and Georg MathGridInset::row, because bad indices would

Re: [patch] fix bug 2060

2005-10-05 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> It looks like the attached, then. The asserts (if we add any) Georg> belong in MathNestInset::cell, MathGridInset::col and Georg> MathGridInset::row, because bad indices would harm there. I do not really see why the asserts in

Re: [patch] fix bug 2060

2005-10-05 Thread Georg Baum
Am Mittwoch, 5. Oktober 2005 18:06 schrieb Jean-Marc Lasgouttes: > > "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: > > Georg> It looks like the attached, then. The asserts (if we add any) > Georg> belong in MathNestInset::cell, MathGridInset::col and > Georg> MathGridInset::row, because

Re: [patch] fix bug 2060

2005-10-04 Thread Georg Baum
Georg Baum wrote: Am Montag, 3. Oktober 2005 15:04 schrieb Jean-Marc Lasgouttes: But if you think it is not possible to do better, apply this and also the other one you just posted. I am going to do so unless somebody has a better idea. AFAICS Andre' is right and MathMacroInset is the

Re: [patch] fix bug 2060

2005-10-04 Thread Jean-Marc Lasgouttes
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Georg Baum wrote: Am Montag, 3. Oktober 2005 15:04 schrieb Jean-Marc Lasgouttes: But if you think it is not possible to do better, apply this and also the other one you just posted. I am going to do so unless somebody has a better idea.

Re: [patch] fix bug 2060

2005-10-04 Thread Georg Baum
Am Dienstag, 4. Oktober 2005 19:15 schrieb Jean-Marc Lasgouttes: Georg == Georg Baum [EMAIL PROTECTED] writes: Georg AFAICS Andre' is right and MathMacroInset is the only Georg MathNestInset with 0 cells, so we could put the checks in Georg MathMacroInset. We would then avoid the checks when

Re: [patch] fix bug 2060

2005-10-04 Thread Georg Baum
Georg Baum wrote: > Am Montag, 3. Oktober 2005 15:04 schrieb Jean-Marc Lasgouttes: > >> But if you think it is not possible to do better, apply this and also >> the other one you just posted. > > I am going to do so unless somebody has a better idea. AFAICS Andre' is right and MathMacroInset

Re: [patch] fix bug 2060

2005-10-04 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Georg Baum wrote: >> Am Montag, 3. Oktober 2005 15:04 schrieb Jean-Marc Lasgouttes: >> >>> But if you think it is not possible to do better, apply this and >>> also the other one you just posted. >> I am going to do so unless

Re: [patch] fix bug 2060

2005-10-04 Thread Georg Baum
Am Dienstag, 4. Oktober 2005 19:15 schrieb Jean-Marc Lasgouttes: > > "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: > Georg> AFAICS Andre' is right and MathMacroInset is the only > Georg> MathNestInset with 0 cells, so we could put the checks in > Georg> MathMacroInset. We would then avoid

Re: [patch] fix bug 2060

2005-10-03 Thread Georg Baum
Am Sonntag, 2. Oktober 2005 23:58 schrieb Angus Leeming: I can confirm the crash but can also supply some debug info. Thanks. The reason for the crash is the same as # 2060: MathNestInsets may have 0 cells. Fix attached. OK to commit? And the fix for # 2060? Georg PS: Daniel, many thanks

Re: [patch] fix bug 2060

2005-10-03 Thread Jean-Marc Lasgouttes
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg See http://bugzilla.lyx.org/show_bug.cgi?id=2060. The problem Georg is that macros with no arguments are stored as a MathNestInset Georg with 0 cells, and that MathNestInset::editXY() assumes at least Georg one cell. I fixed that and added two

Re: [patch] fix bug 2060

2005-10-03 Thread Georg Baum
Am Montag, 3. Oktober 2005 14:22 schrieb Jean-Marc Lasgouttes: Should some of these tests be asserts? If you can assure me that drawSelection() and cursorPos() don't get called for macros with 0 arguments and macros with 0 arguments are the only case of a MathNestInset, then yes. Otherwise we

Re: [patch] fix bug 2060

2005-10-03 Thread Juergen Spitzmueller
Georg Baum wrote: PS: Daniel, many thanks for the bug reports. They are really useful. I have to second that. Jürgen

Re: [patch] fix bug 2060

2005-10-03 Thread Jean-Marc Lasgouttes
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Am Montag, 3. Oktober 2005 14:22 schrieb Jean-Marc Lasgouttes: Should some of these tests be asserts? Georg If you can assure me that drawSelection() and cursorPos() don't Georg get called for macros with 0 arguments and macros with 0 Georg

Re: [patch] fix bug 2060

2005-10-03 Thread Georg Baum
Am Montag, 3. Oktober 2005 15:04 schrieb Jean-Marc Lasgouttes: What I wondering is whether MathNestInset should tell the world that it is not editable when size() == 0. It is always strange to have to add these tests all over the place. I agree, but after trying to implement that I found out

Re: [patch] fix bug 2060

2005-10-03 Thread Andre Poenitz
On Mon, Oct 03, 2005 at 02:30:10PM +0200, Georg Baum wrote: Am Montag, 3. Oktober 2005 14:22 schrieb Jean-Marc Lasgouttes: Should some of these tests be asserts? If you can assure me that drawSelection() and cursorPos() don't get called for macros with 0 arguments and macros with 0

Re: [patch] fix bug 2060

2005-10-03 Thread Georg Baum
Am Sonntag, 2. Oktober 2005 23:58 schrieb Angus Leeming: > I can confirm the crash but can also supply some debug info. Thanks. The reason for the crash is the same as # 2060: MathNestInsets may have 0 cells. Fix attached. OK to commit? And the fix for # 2060? Georg PS: Daniel, many thanks

Re: [patch] fix bug 2060

2005-10-03 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> See http://bugzilla.lyx.org/show_bug.cgi?id=2060. The problem Georg> is that macros with no arguments are stored as a MathNestInset Georg> with 0 cells, and that MathNestInset::editXY() assumes at least Georg> one cell. I fixed that

Re: [patch] fix bug 2060

2005-10-03 Thread Georg Baum
Am Montag, 3. Oktober 2005 14:22 schrieb Jean-Marc Lasgouttes: > Should some of these tests be asserts? If you can assure me that drawSelection() and cursorPos() don't get called for macros with 0 arguments and macros with 0 arguments are the only case of a MathNestInset, then yes. Otherwise

Re: [patch] fix bug 2060

2005-10-03 Thread Juergen Spitzmueller
Georg Baum wrote: > PS: Daniel, many thanks for the bug reports. They are really useful. I have to second that. Jürgen

Re: [patch] fix bug 2060

2005-10-03 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Am Montag, 3. Oktober 2005 14:22 schrieb Jean-Marc Lasgouttes: >> Should some of these tests be asserts? Georg> If you can assure me that drawSelection() and cursorPos() don't Georg> get called for macros with 0 arguments and macros

Re: [patch] fix bug 2060

2005-10-03 Thread Georg Baum
Am Montag, 3. Oktober 2005 15:04 schrieb Jean-Marc Lasgouttes: > What I wondering is whether MathNestInset should tell the world that > it is not editable when size() == 0. It is always strange to have to > add these tests all over the place. I agree, but after trying to implement that I found

Re: [patch] fix bug 2060

2005-10-03 Thread Andre Poenitz
On Mon, Oct 03, 2005 at 02:30:10PM +0200, Georg Baum wrote: > Am Montag, 3. Oktober 2005 14:22 schrieb Jean-Marc Lasgouttes: > > > Should some of these tests be asserts? > > If you can assure me that drawSelection() and cursorPos() don't get called > for macros with 0 arguments and macros with

Re: [patch] fix bug 2060

2005-10-02 Thread Andre Poenitz
On Sat, Oct 01, 2005 at 07:58:00PM +0200, Georg Baum wrote: See http://bugzilla.lyx.org/show_bug.cgi?id=2060. The problem is that macros with no arguments are stored as a MathNestInset with 0 cells, and that MathNestInset::editXY() assumes at least one cell. I fixed that and added two more

Re: [patch] fix bug 2060

2005-10-02 Thread Daniel Watkins
On Sat, 2005-10-01 at 18:58 +0100, Georg Baum wrote: See http://bugzilla.lyx.org/show_bug.cgi?id=2060. The problem is that macros with no arguments are stored as a MathNestInset with 0 cells, and that MathNestInset::editXY() assumes at least one cell. I fixed that and added two more checks

Re: [patch] fix bug 2060

2005-10-02 Thread Angus Leeming
Daniel Watkins wrote: I can't tell whether this is to do with 2050 or 2060 (I can't get any useful CLI output, no matter how hard I try (but that's probably me)), but I can still get a crash. I was hesitant to add it on Bugzilla, because I'm not sure if it is part of either or a bug in itself.

Re: [patch] fix bug 2060

2005-10-02 Thread Andre Poenitz
On Sat, Oct 01, 2005 at 07:58:00PM +0200, Georg Baum wrote: > See http://bugzilla.lyx.org/show_bug.cgi?id=2060. The problem is that > macros with no arguments are stored as a MathNestInset with 0 cells, and > that MathNestInset::editXY() assumes at least one cell. > I fixed that and added two

Re: [patch] fix bug 2060

2005-10-02 Thread Daniel Watkins
On Sat, 2005-10-01 at 18:58 +0100, Georg Baum wrote: > See http://bugzilla.lyx.org/show_bug.cgi?id=2060. The problem is that > macros with no arguments are stored as a MathNestInset with 0 cells, > and > that MathNestInset::editXY() assumes at least one cell. > I fixed that and added two more

Re: [patch] fix bug 2060

2005-10-02 Thread Angus Leeming
Daniel Watkins wrote: > I can't tell whether this is to do with 2050 or 2060 (I can't get any > useful CLI output, no matter how hard I try (but that's probably me)), > but I can still get a crash. I was hesitant to add it on Bugzilla, > because I'm not sure if it is part of either or a bug in

[patch] fix bug 2060

2005-10-01 Thread Georg Baum
See http://bugzilla.lyx.org/show_bug.cgi?id=2060. The problem is that macros with no arguments are stored as a MathNestInset with 0 cells, and that MathNestInset::editXY() assumes at least one cell. I fixed that and added two more checks for 0 cells which I think are necessary. OK to commit?

[patch] fix bug 2060

2005-10-01 Thread Georg Baum
See http://bugzilla.lyx.org/show_bug.cgi?id=2060. The problem is that macros with no arguments are stored as a MathNestInset with 0 cells, and that MathNestInset::editXY() assumes at least one cell. I fixed that and added two more checks for 0 cells which I think are necessary. OK to commit?