Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-29 Thread Jean-Marc Lasgouttes
> "Michael" == Michael Gerz <[EMAIL PROTECTED]> writes: Michael> AFAICS, there are only two methods in which we use dummy Michael> cursors to invoke checkDepm: Michael> LyXText::CursorUp() LyXText::CursorDown() This is Lars' doing and he said at the time there was no other way. I have doubt

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-27 Thread Michael Gerz
Abdelrazak Younes schrieb: Michael Gerz wrote: Abdel, Jean-Marc, here is my first attempt to incorporate a simple & efficient DEPM into accept/reject change. I like it. If it works, I would suggest to try to share some code between the two DEPMs. There are some cases where this new DEPM wou

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-27 Thread Michael Gerz
Abdelrazak Younes schrieb: Michael Gerz wrote: Abdel, Jean-Marc, here is my first attempt to incorporate a simple & efficient DEPM into accept/reject change. I like it. If it works, I would suggest to try to share some code between the two DEPMs. There are some cases where this new DEPM wou

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Because you are just touching the ParagraphList which is a Abdelrazak> member of LyXText? Why acceptChanges() and rejectChanges() Abdelrazak> and not acceptOrRejectChange()? Abdelrazak> I am not sure the InsetText/LyX

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Abdelrazak Younes
Michael Gerz wrote: Abdel, Jean-Marc, here is my first attempt to incorporate a simple & efficient DEPM into accept/reject change. I like it. If it works, I would suggest to try to share some code between the two DEPMs. There are some cases where this new DEPM would be preferable over the o

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Michael Gerz
Abdel, Jean-Marc, here is my first attempt to incorporate a simple & efficient DEPM into accept/reject change. I think this code will be even smarter if accept/rejectChange() become members of LyXText. Unfortunately, I ran out of time today... Anyway, please provide comments on the existing

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Michael Gerz
Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: Why? These are definitely operations on insettext insets. Because you are just touching the ParagraphList which is a member of LyXText? Hmmm. I may move the code to LyXText but we still need wrappers in Insettext.

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Abdelrazak Younes
Michael Gerz wrote: Abdelrazak Younes schrieb: Why? These are definitely operations on insettext insets. Because you are just touching the ParagraphList which is a member of LyXText? Hmmm. I may move the code to LyXText but we still need wrappers in Insettext. Note that there are also acc

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Michael Gerz
Abdelrazak Younes schrieb: Why? These are definitely operations on insettext insets. Because you are just touching the ParagraphList which is a member of LyXText? Hmmm. I may move the code to LyXText but we still need wrappers in Insettext. Note that there are also acceptChange() and rejec

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Abdelrazak Younes
Michael Gerz wrote: Abdelrazak Younes schrieb: Michael Gerz wrote: Michael Gerz schrieb: Michael, I think you should transfer the paragraph manipulation code in those two functions to LyXText. Why? These are definitely operations on insettext insets. Michael G... you corrupted my co

Re: [Cvslog] r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Michael Gerz
Abdelrazak Younes schrieb: Couldn't you just call deleteEmptyParagraphMechanism() each time you accept or reject a change? No. A change may span multiple paragraphs, including nested insets. Moreover, DEPM also removes duplicate spaces. Do you want me to iterate through the whole selection,

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Abdelrazak Younes
Michael Gerz wrote: Abdelrazak Younes schrieb: [EMAIL PROTECTED] wrote: Author: younes Date: Wed Jan 24 18:19:56 2007 New Revision: 16838 URL: http://www.lyx.org/trac/changeset/16838 Log: Small formatting and comment cleanup. Modified: lyx-devel/trunk/src/insets/insettext.C Modified: lyx

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Michael Gerz
Abdelrazak Younes schrieb: Michael Gerz wrote: Michael Gerz schrieb: Michael, I think you should transfer the paragraph manipulation code in those two functions to LyXText. Why? These are definitely operations on insettext insets. Michael G... you corrupted my code! pars.size() is n

Re: [Cvslog] r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Abdelrazak Younes
Michael Gerz wrote: [EMAIL PROTECTED] schrieb: // FIXME: finally, invoke the DEPM +// This cannot be done here but at a higher calling level +// because we need BufferView::checkDepm(). } I know that cannot do it - otherwise I would called DEPM :-) (And that's why I added a

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Abdelrazak Younes
Michael Gerz wrote: Michael Gerz schrieb: Michael, I think you should transfer the paragraph manipulation code in those two functions to LyXText. Why? These are definitely operations on insettext insets. Michael G... you corrupted my code! pars.size() is not fixed in this method. I w

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Michael Gerz
Michael Gerz schrieb: Michael, I think you should transfer the paragraph manipulation code in those two functions to LyXText. Why? These are definitely operations on insettext insets. Michael G... you corrupted my code! pars.size() is not fixed in this method. I will revert your chang

Re: [Cvslog] r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Michael Gerz
[EMAIL PROTECTED] schrieb: // FIXME: finally, invoke the DEPM + // This cannot be done here but at a higher calling level + // because we need BufferView::checkDepm(). } I know that cannot do it - otherwise I would called DEPM :-) (And that's why I added a FIXME) Michael

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Michael Gerz
Abdelrazak Younes schrieb: [EMAIL PROTECTED] wrote: Author: younes Date: Wed Jan 24 18:19:56 2007 New Revision: 16838 URL: http://www.lyx.org/trac/changeset/16838 Log: Small formatting and comment cleanup. Modified: lyx-devel/trunk/src/insets/insettext.C Modified: lyx-devel/trunk/src/inse

Re: r16838 - /lyx-devel/trunk/src/insets/insettext.C

2007-01-24 Thread Abdelrazak Younes
[EMAIL PROTECTED] wrote: Author: younes Date: Wed Jan 24 18:19:56 2007 New Revision: 16838 URL: http://www.lyx.org/trac/changeset/16838 Log: Small formatting and comment cleanup. Modified: lyx-devel/trunk/src/insets/insettext.C Modified: lyx-devel/trunk/src/insets/insettext.C URL: http://