[patch] bug 2003

2005-08-27 Thread Juergen Spitzmueller
http://bugzilla.lyx.org/show_bug.cgi?id=2003 Do not indent optarg insets. The fix is trivial. For the future, we might consider a bool neverindent in InsetBase rather than putting each inset to the if-clause. OK to apply? Jürgen Index: src/text.C ===

Re: [patch] bug 2003

2005-08-28 Thread Andre Poenitz
On Sat, Aug 27, 2005 at 02:56:57PM +0200, Juergen Spitzmueller wrote: > http://bugzilla.lyx.org/show_bug.cgi?id=2003 > > Do not indent optarg insets. The fix is trivial. For the future, we might > consider a bool neverindent in InsetBase rather than putting each inset to > the if-clause. No, th

Re: [patch] bug 2003

2005-08-30 Thread Jean-Marc Lasgouttes
> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes: Juergen> http://bugzilla.lyx.org/show_bug.cgi?id=2003 Do not indent Juergen> optarg insets. The fix is trivial. For the future, we might Juergen> consider a bool neverindent in InsetBase rather than putting Juergen> each inset to

Re: [patch] bug 2003

2005-08-30 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote: > Juergen> OK to apply? > > As Andre pointed out, adding a virtual method to InsetBase looks like > a better (and safe) solution, if Lars agrees with this. So I'm awaiting Lars' comment before going further. Jürgen

Re: [patch] bug 2003

2005-09-03 Thread Lars Gullik Bjønnes
Juergen Spitzmueller <[EMAIL PROTECTED]> writes: | Jean-Marc Lasgouttes wrote: >> Juergen> OK to apply? >> >> As Andre pointed out, adding a virtual method to InsetBase looks like >> a better (and safe) solution, if Lars agrees with this. > | So I'm awaiting Lars' comment before going further. Is

Re: [patch] bug 2003

2005-09-04 Thread Juergen Spitzmueller
Lars Gullik Bjønnes wrote: > | So I'm awaiting Lars' comment before going further. > > Is this a regression or not? No, not as far as the indendation of optargs is concerned. On the other hand it might be that bug 1952 (which is a regression) can be fixed by the "sane" approach. > Andre is afra

Re: [patch] bug 2003

2005-09-07 Thread Juergen Spitzmueller
Juergen Spitzmueller wrote: > > But I might be in favour. > > I'll have a look. Here is the patch. Works like a charme, except for insettabular. I did not find a way to let the tabular cell's (or their insettexts, for that matter) return neverIndent() true, so I left the (par.ownerCode() != Ins

Re: [patch] bug 2003

2005-09-08 Thread Jean-Marc Lasgouttes
> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes: Juergen> Juergen Spitzmueller wrote: >> > But I might be in favour. >> >> I'll have a look. Juergen> Here is the patch. Works like a charme, except for Juergen> insettabular. I did not find a way to let the tabular cell's Juerge

Re: [patch] bug 2003

2005-09-08 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote: > Concerning this > > +       // there's obviously no better way to omit indendation in > tabular cells :-( +       && (par.ownerCode() != InsetBase::TEXT_CODE > || isMainText()) > > Do you mean "there is no obvious better way"? Read: *I* did not find any other

Re: [patch] bug 2003

2005-09-08 Thread Angus Leeming
Juergen Spitzmueller wrote: >> // there's obviously no better way to omit indendation >> // in tabular cells :-( >> Do you mean "there is no obvious better way"? > Read: I did not find any other way. Your original statement reads as: Obviously, you complete idiot, this is the best possible way t

Re: [patch] bug 2003

2005-09-08 Thread Juergen Spitzmueller
Angus Leeming wrote: > > Read: I did not find any other way. > > Your original statement reads as: Obviously, you complete idiot, this > is the best possible way to omit indentation in tabular cells. > > Jean-Marc's suggestion reads as: There may be a better way to do this, > but I couldn't find it

Re: [patch] bug 2003

2005-09-08 Thread Jean-Marc Lasgouttes
> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes: Juergen> Jean-Marc Lasgouttes wrote: >> Concerning this >> >> +       // there's obviously no better way to omit indendation >> in tabular cells :-( +       && (par.ownerCode() != >> InsetBase::TEXT_CODE || isMainText())

Re: [patch] bug 2003

2005-09-08 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote: > So the test only works by chance, because a tabular cell is the only > insettext that is not subclassed, right? Let's say the test "sort of" works. I think the reason for bug 1952 is that isMainText() returns true _inside_ a tabular cell after undo. I don't know wh

Re: [patch] bug 2003

2005-09-09 Thread Jean-Marc Lasgouttes
> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes: Juergen> Yes, but then I'd prefer the attached (which works as well). Excellent! I missed the fact that text_ is available in an insettext (although I read this header file several times, looking for a useful entry). Please comm

Re: [patch] bug 2003

2005-09-09 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote: > > "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes: > > Juergen> Yes, but then I'd prefer the attached (which works as well). > > Excellent! I missed the fact that text_ is available in an insettext > (although I read this header file several times, loo

Re: [patch] bug 2003

2005-09-10 Thread Georg Baum
Am Samstag, 10. September 2005 09:06 schrieb Juergen Spitzmueller: > Jean-Marc Lasgouttes wrote: > > Please commit, but with a stronger comment (with a FIXME or a > > #warning) in InsetText::neverIndent explaining that this is a hack and > > that cells should have their own InsetCell type. > > Don

Re: [patch] bug 2003

2005-09-10 Thread Juergen Spitzmueller
Georg Baum wrote: > Unfortunately I get a segmentation fault now. The problem is that > Paragraph::inInset() may return 0. > The attached patch fixes that. It is going in right now because it is > obviously the right fix. Thanks, Jürgen (actually I originally had the check for inInset())

Re: [patch] bug 2003

2005-09-12 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Unfortunately I get a segmentation fault now. The problem is Georg> that Paragraph::inInset() may return 0. The attached patch Georg> fixes that. It is going in right now because it is obviously Georg> the right fix. Do you know when

Re: [patch] bug 2003

2005-09-12 Thread Georg Baum
Jean-Marc Lasgouttes wrote: > Do you know when this can happen? For example with the attached document. > I also thought it was not necessary. If inInset is supposed to return always a valid pointer we should assert in inInset and remove checks at other places. But then I wonder what is wrong

Re: [patch] bug 2003

2005-09-12 Thread Angus Leeming
Georg Baum wrote: > If inInset is supposed to return always a valid pointer we should > assert in inInset and remove checks at other places. But then I > wonder what is wrong with the current code? If inInset is supposed to return always a valid pointer, it should return a reference... -- Angus

Re: [patch] bug 2003

2005-09-12 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Jean-Marc Lasgouttes wrote: >> Do you know when this can happen? Georg> For example with the attached document. >> I also thought it was not necessary. Georg> If inInset is supposed to return always a valid pointer we Georg> should

Re: [patch] bug 2003

2005-09-12 Thread Alfredo Braunstein
Jean-Marc Lasgouttes wrote: > So, what would be the best solution? Remove inInset altogether of course! ;-) I tried to do that once and failed miserably... Alfredo