Re: [patch] fix setDefaultParagraph in insettabular

2005-11-28 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> Inset Cell Paragraph Chars or Insets Cell Paragraph ... Andre> is the target structureo of IU. It's pretty much the thing Andre> that's currently used (with an 'implicit' single paragraph per Andre> cell in mathed and an 'implicit'

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-27 Thread Andre Poenitz
On Mon, Nov 14, 2005 at 11:00:08AM +0100, Georg Baum wrote: > Juergen Spitzmueller wrote: > > > Jean-Marc Lasgouttes wrote: > >> The problem is probably (as in bugs 1952/53) that there is no way when > >> the cursor is in a tabular (top.inset() is the insettabular) to access > >> the insettext its

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-18 Thread Georg Baum
Juergen Spitzmueller wrote: > Georg Baum wrote: >> Do you have a test case where this is a problem? At the moment I can't >> see one. > > - Make a fixed width tabular cell > - chose a non-standard layout (e.g. itemize) > - reset tabular cell to non-fixed width > - (the layout combo is correctly g

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-18 Thread Juergen Spitzmueller
Georg Baum wrote: > > Yes, that's true. The old code was broken as well. And that seems to be > > the > > > reason why forceDefaultParagraph does not force Standard paragraphs in > > the > > > output of tabulars (this is triggered by the Paragraph code and seems to > > work for ERT). > > Do you hav

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-17 Thread Georg Baum
Am Dienstag, 15. November 2005 16:34 schrieb Juergen Spitzmueller: > Yes, that's true. The old code was broken as well. And that seems to be the > reason why forceDefaultParagraph does not force Standard paragraphs in the > output of tabulars (this is triggered by the Paragraph code and seems to

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-17 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote: > >> The idea looks good to me. Does it mean that you are going to get > >> rid of InsetBase::forceDefaultParagraph too? > > Georg> That would be nice, but I don't see how it can be done. It is > Georg> needed in LyXText::dispatch and LyXFunc::getStatus. Whatever we > Ge

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-16 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Jean-Marc Lasgouttes wrote: >> The idea looks good to me. Does it mean that you are going to get >> rid of InsetBase::forceDefaultParagraph too? Georg> That would be nice, but I don't see how it can be done. It is Georg> needed in LyX

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-16 Thread Georg Baum
Jean-Marc Lasgouttes wrote: > The idea looks good to me. Does it mean that you are going to get rid > of InsetBase::forceDefaultParagraph too? That would be nice, but I don't see how it can be done. It is needed in LyXText::dispatch and LyXFunc::getStatus. Whatever we do here, I think that Jürgen

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-16 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> With the problem that this cached information gets easily Georg> outdated. What about the following: Add a Georg> forceDefaultParagraphs flag to Outputparams and use that Georg> instead of Paragraph::forceDefault? The patch is not comp

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-16 Thread Jose' Matos
On Wednesday 16 November 2005 09:47, Georg Baum wrote: > With the problem that this cached information gets easily outdated. What > about the following: Add a forceDefaultParagraphs flag to Outputparams and > use that instead of Paragraph::forceDefault? The patch is not complete (ERT > is missing),

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-16 Thread Georg Baum
Juergen Spitzmueller wrote: > Yes, that's true. The old code was broken as well. And that seems to be > the reason why forceDefaultParagraph does not force Standard paragraphs in > the output of tabulars (this is triggered by the Paragraph code and seems > to work for ERT). > Basically, we'd have

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-15 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote: > Juergen> Looks much nicer :-) > > Indeed. If it works to your liking, please apply it. OK, thanks. > Juergen> I wonder if passing 0 from > Juergen> Paragraph::forceDefaultParagraphs() is always correct, > Juergen> though. > > I think it is equivalent to what we had

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-14 Thread Jean-Marc Lasgouttes
> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes: Juergen> Looks much nicer :-) Indeed. If it works to your liking, please apply it. Juergen> I wonder if passing 0 from Juergen> Paragraph::forceDefaultParagraphs() is always correct, Juergen> though. I think it is equivalent t

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-14 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote: > What about redefining as > > virtual bool forceDefaultParagraphs(idx_type cell =0) > > Paragraph::forceDefaultParagraph would pass 0 (or no value), the > others would use the cursor. Looks much nicer :-) I wonder if passing 0 from Paragraph::forceDefaultParagraphs() i

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-14 Thread Georg Baum
Juergen Spitzmueller wrote: > Is it worth it to add the argument for documentation purposes? The argument is already there. Do you mean to name it? IMHO it is worth it. > Attached is a patch with some mor FIXME's and the proposed documentation > (without having added the argument). > > Would th

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-14 Thread Georg Baum
Jean-Marc Lasgouttes wrote: > And the parameter passed to the method seems bogus to me. It seems to > be always like > inset.forceDefaultParagraphs(&inset) > > The only case that is different is with insettabular, it seems. This > does not make sense... It makes sense in so far as the paramete

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-14 Thread Jean-Marc Lasgouttes
> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes: Juergen> Georg Baum wrote: >> I see. I would also document the argument of forceDefaultParagraphs >> in insetbase.h so that misunderstandings like in the current code >> do not longer happen: >> >> /// if this inset has paragraph

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-14 Thread Juergen Spitzmueller
Georg Baum wrote: > I see. I would also document the argument of forceDefaultParagraphs in > insetbase.h so that misunderstandings like in the current code do not > longer happen: > > /// if this inset has paragraphs should they be output all as default > /// paragraphs with "Standard" layout? > //

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-14 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> I see. I would also document the argument of Georg> forceDefaultParagraphs in insetbase.h so that misunderstandings Georg> like in the current code do not longer happen: Georg> /// if this inset has paragraphs should they be output al

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-14 Thread Georg Baum
Juergen Spitzmueller wrote: > Jean-Marc Lasgouttes wrote: >> The problem is probably (as in bugs 1952/53) that there is no way when >> the cursor is in a tabular (top.inset() is the insettabular) to access >> the insettext itself (the cell). InsetTabular suffers from some >> personality disorder:

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-14 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote: > What about redefining as > > virtual bool forceDefaultParagraphs(idx_type cell =0) > > Paragraph::forceDefaultParagraph would pass 0 (or no value), the > others would use the cursor. > > Considering the low number of instance of this method, it seems both > easy and co

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-14 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote: > The problem is probably (as in bugs 1952/53) that there is no way when > the cursor is in a tabular (top.inset() is the insettabular) to access > the insettext itself (the cell). InsetTabular suffers from some > personality disorder: it is a tabular from the outside, b

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-14 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Am Sonntag, 13. November 2005 13:01 schrieb Juergen Georg> Spitzmueller: >> The attached patch reimplements setDefaultParagraphs in >> insettabular, as described in bug 1953. However, the paragraph >> merging problem described Georg> t

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-13 Thread Juergen Spitzmueller
Georg Baum wrote: > I think the code would be clearer without the tabular special casing in > LyXText::dispatch() and LyXFunc::getStatus() and the new code in > InsetTabular::forceDefaultParagraphs() instead. Does that not work? I don't have access to the cursor there :-( Jürgen

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-13 Thread Georg Baum
Am Sonntag, 13. November 2005 13:01 schrieb Juergen Spitzmueller: > The attached patch reimplements setDefaultParagraphs in insettabular, as > described in bug 1953. However, the paragraph merging problem described there > is not fixed (this is a different problem, independent from > setDefault

Re: [patch] fix setDefaultParagraph in insettabular

2005-11-13 Thread Juergen Spitzmueller
Juergen Spitzmueller wrote: > The attached patch reimplements setDefaultParagraphs in insettabular, as > described in bug 1953. I'm talking about forceDefaultParagraphs all the time, of course. Jürgen

[patch] fix setDefaultParagraph in insettabular

2005-11-13 Thread Juergen Spitzmueller
The attached patch reimplements setDefaultParagraphs in insettabular, as described in bug 1953. However, the paragraph merging problem described there is not fixed (this is a different problem, independent from setDefaultParagraphs; I got that wrong). There is a remaining problem with setDefaul