Re: [Patch] non-existent CharStyle crash

2005-05-03 Thread Martin Vermeer
On Tue, May 03, 2005 at 06:50:21PM +0200, Georg Baum wrote: > Martin Vermeer wrote: > > > It would be possible, at the cost of a little spaghetti, to allow the > > "Undef: CharStyle" insets to revert to "CharStyle" if the textclass is > > reset to one that contains its definition. Just chop off th

Re: [Patch] non-existent CharStyle crash

2005-05-03 Thread Georg Baum
Martin Vermeer wrote: > It would be possible, at the cost of a little spaghetti, to allow the > "Undef: CharStyle" insets to revert to "CharStyle" if the textclass is > reset to one that contains its definition. Just chop off the "Undef: " > prefix inside LyXTextClass::charstyle(). But would it be

Re: [Patch] non-existent CharStyle crash

2005-05-03 Thread Martin Vermeer
On Mon, May 02, 2005 at 07:00:05PM +0200, Georg Baum wrote: > Martin Vermeer wrote: > > > On Mon, May 02, 2005 at 03:25:39PM +0200, Juergen Spitzmueller wrote: > >> I kind of like the idea (untested), but I think you should trigger an > >> Alert which tells the user that some charstyle insets have

Re: [Patch] non-existent CharStyle crash

2005-05-02 Thread Martin Vermeer
On Mon, May 02, 2005 at 07:00:05PM +0200, Georg Baum wrote: > Martin Vermeer wrote: > > > On Mon, May 02, 2005 at 03:25:39PM +0200, Juergen Spitzmueller wrote: > >> I kind of like the idea (untested), but I think you should trigger an > >> Alert which tells the user that some charstyle insets have

Re: [Patch] non-existent CharStyle crash

2005-05-02 Thread Georg Baum
Martin Vermeer wrote: > On Mon, May 02, 2005 at 03:25:39PM +0200, Juergen Spitzmueller wrote: >> I kind of like the idea (untested), but I think you should trigger an >> Alert which tells the user that some charstyle insets haven't been found >> etc. > > Unfortunately that's not easy to do under

Re: [Patch] Re: [Patch] non-existent CharStyle crash

2005-05-02 Thread Martin Vermeer
On Mon, May 02, 2005 at 03:25:39PM +0200, Juergen Spitzmueller wrote: > Martin Vermeer wrote: > > Ehh, the _proper_ patch is this... > > I kind of like the idea (untested), but I think you should trigger an Alert > which tells the user that some charstyle insets haven't been found etc. Unfortuna

Re: [Patch] Re: [Patch] non-existent CharStyle crash

2005-05-02 Thread Martin Vermeer
On Mon, May 02, 2005 at 03:23:46PM +0200, Georg Baum wrote: > Martin Vermeer wrote: > > > Not if I have to do it... and shouldn't it be called > > SwitchCharStylesBetweenClasses then? (And would you call the adding of > > more warts upon warts 'fixing'?) > > While CutAndPaste.C is messy I think t

Re: [Patch] Re: [Patch] non-existent CharStyle crash

2005-05-02 Thread Georg Baum
Martin Vermeer wrote: > Not if I have to do it... and shouldn't it be called > SwitchCharStylesBetweenClasses then? (And would you call the adding of > more warts upon warts 'fixing'?) While CutAndPaste.C is messy I think that SwitchLayoutsBetweenClasses is quite readable. > Here is a solution t

Re: [Patch] Re: [Patch] non-existent CharStyle crash

2005-05-02 Thread Juergen Spitzmueller
Martin Vermeer wrote: > Ehh, the _proper_ patch is this... I kind of like the idea (untested), but I think you should trigger an Alert which tells the user that some charstyle insets haven't been found etc. Jürgen

Re: [Patch] Re: [Patch] non-existent CharStyle crash

2005-05-02 Thread Martin Vermeer
On Mon, May 02, 2005 at 12:00:34PM +0300, Martin Vermeer wrote: ... > Here is a solution that is nearly as good. What it does is that upon > re-load, it turns it into an "Undef:" type charstyle inset, red for > attention. Yes, the lack of warning at the time of conversion is > unpleasant, but th

Re: [Patch] non-existent CharStyle crash

2005-05-02 Thread Juergen Spitzmueller
Georg Baum wrote: > >> What does it do with the contents of such charstyles? Transform it to > >> containing layout? Also, shouldn't the warning be the same as for > >> missing layouts? (cf. the recent discussion on bug 1591). > > IMO it should be transformed to standard layout with a warning (as i

[Patch] Re: [Patch] non-existent CharStyle crash

2005-05-02 Thread Martin Vermeer
On Mon, May 02, 2005 at 09:16:40AM +0200, Georg Baum wrote: > Martin Vermeer wrote: > > > On Sat, Apr 30, 2005 at 03:25:09PM +0200, Juergen Spitzmueller wrote: > >> What does it do with the contents of such charstyles? Transform it to > >> containing layout? Also, shouldn't the warning be the same

Re: [Patch] non-existent CharStyle crash

2005-05-02 Thread Georg Baum
Martin Vermeer wrote: > On Sat, Apr 30, 2005 at 03:25:09PM +0200, Juergen Spitzmueller wrote: >> What does it do with the contents of such charstyles? Transform it to >> containing layout? Also, shouldn't the warning be the same as for missing >> layouts? (cf. the recent discussion on bug 1591).

Re: [Patch] non-existent CharStyle crash

2005-05-01 Thread Juergen Spitzmueller
Martin Vermeer wrote: > I could of course convert the inset to a Note inset... easy to do I > think. Would that be an acceptable compromise for 1.4? I'm not sure. But I think dataloss is a no-no. Jürgen

Re: [Patch] non-existent CharStyle crash

2005-05-01 Thread Martin Vermeer
On Sat, Apr 30, 2005 at 03:25:09PM +0200, Juergen Spitzmueller wrote: > Martin Vermeer wrote: > > Fix attached. This happens, e.g., when switching to a textclass not > > containing a charstyle contained in the document. > > What does it do with the contents of such charstyles? Transform it to > c

Re: [Patch] non-existent CharStyle crash

2005-04-30 Thread Juergen Spitzmueller
Martin Vermeer wrote: > Fix attached. This happens, e.g., when switching to a textclass not > containing a charstyle contained in the document. What does it do with the contents of such charstyles? Transform it to containing layout? Also, shouldn't the warning be the same as for missing layouts?

[Patch] non-existent CharStyle crash

2005-04-29 Thread Martin Vermeer
Fix attached. This happens, e.g., when switching to a textclass not containing a charstyle contained in the document. - Martin Index: factory.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/factory.C,v retrieving revision 1.95