Re: Problem stripLeadingSpaces()

2007-01-21 Thread Abdelrazak Younes
Michael Gerz wrote: Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? deleted space means a space that was marked as deleted. Use the attached lyx

Re: Problem stripLeadingSpaces()

2007-01-21 Thread Abdelrazak Younes
Michael Gerz wrote: Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? deleted space means a space that was marked as deleted. Use the attached lyx

Re: Problem stripLeadingSpaces()

2007-01-21 Thread Michael Gerz
Abdelrazak Younes schrieb: OK, IIUC, then you will have two deleted space then, right? Again, IIUC, the paragraph contents should still contain the two spaces but isDeleted(0) and (1) would return true, right? Yes Yes. If yes, then as I said, there is a problem even before the screen update

Re: Problem stripLeadingSpaces()

2007-01-21 Thread Michael Gerz
Abdelrazak Younes schrieb: Right now, stripLeadingSpaces() returns the number of _physically_ deleted spaces. I can change this to return the number of physically and logically characters. Yes, I guess we should do that. Ok, the patch will be committed in a few minutes. Michael

Re: Problem stripLeadingSpaces()

2007-01-21 Thread Abdelrazak Younes
Michael Gerz wrote: Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? means a space that was marked as deleted. Use the attached lyx file. Press

Re: Problem stripLeadingSpaces()

2007-01-21 Thread Abdelrazak Younes
Michael Gerz wrote: Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? means a space that was marked as deleted. Use the attached lyx file. Press

Re: Problem stripLeadingSpaces()

2007-01-21 Thread Michael Gerz
Abdelrazak Younes schrieb: OK, IIUC, then you will have two deleted space then, right? Again, IIUC, the paragraph contents should still contain the two spaces but isDeleted(0) and (1) would return true, right? Yes & Yes. If yes, then as I said, there is a problem even before the screen update

Re: Problem stripLeadingSpaces()

2007-01-21 Thread Michael Gerz
Abdelrazak Younes schrieb: Right now, stripLeadingSpaces() returns the number of _physically_ deleted spaces. I can change this to return the number of physically and logically characters. Yes, I guess we should do that. Ok, the patch will be committed in a few minutes. Michael

Re: Problem stripLeadingSpaces()

2007-01-20 Thread Michael Gerz
Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? deleted space means a space that was marked as deleted. Use the attached lyx file. Press return

Re: Problem stripLeadingSpaces()

2007-01-20 Thread Michael Gerz
Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? means a space that was marked as deleted. Use the attached lyx file. Press return after "hello".

Re: Problem stripLeadingSpaces()

2007-01-16 Thread Abdelrazak Younes
Michael Gerz wrote: Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? deleted space means a space that was marked as deleted. Use the attached lyx file. Press return after hello. The leading

Re: Problem stripLeadingSpaces()

2007-01-16 Thread Abdelrazak Younes
Michael Gerz wrote: Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? means a space that was marked as deleted. Use the attached lyx file. Press return after "hello". The leading spaces are

Problem stripLeadingSpaces()

2007-01-14 Thread Michael Gerz
Hi, I rethought the logic of stripLeadingSpaces() and came to the conclusion that it is not a good idea to remove the spaces in change tracking mode: imagine that your co-author inserts a par break that you don't like. If you revert his par break (revert = reject change, not undo!), you would

Re: Problem stripLeadingSpaces()

2007-01-14 Thread Abdelrazak Younes
Michael Gerz wrote: Hi, I rethought the logic of stripLeadingSpaces() and came to the conclusion that it is not a good idea to remove the spaces in change tracking mode: imagine that your co-author inserts a par break that you don't like. If you revert his par break (revert = reject change,

Re: Problem stripLeadingSpaces()

2007-01-14 Thread Michael Gerz
Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? deleted space means a space that was marked as deleted. Use the attached lyx file. Press return after hello. The leading spaces are marked as deleted but the screen is not updated. Michael

Re: Problem stripLeadingSpaces()

2007-01-14 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Michael Gerz wrote: I think that you have to distinguish the document model from what is on screen. On screen, the row representation does not care if one char is a space or a deleted space, seven chars are seven chars. I guess this is the problem and you have to

Re: Problem stripLeadingSpaces()

2007-01-14 Thread Abdelrazak Younes
Michael Gerz wrote: Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? deleted space means a space that was marked as deleted. Use the attached lyx file. Press return after hello. The leading spaces are marked as deleted but the screen is not

Re: Problem stripLeadingSpaces()

2007-01-14 Thread Michael Gerz
Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? deleted space means a space that was marked as deleted. Use the attached lyx file. Press return after hello. The leading spaces are marked as

Re: Problem stripLeadingSpaces()

2007-01-14 Thread Michael Gerz
Abdelrazak Younes schrieb: Yes, this is exactly it. The problem is that the first (and unique) row of the first ParagraphMetrics has one more character than what is in the Paragraph. The Paragraph content does not seem to reflect the deleted characters. In the following loop, the position of

Problem stripLeadingSpaces()

2007-01-14 Thread Michael Gerz
Hi, I rethought the logic of stripLeadingSpaces() and came to the conclusion that it is not a good idea to remove the spaces in change tracking mode: imagine that your co-author inserts a par break that you don't like. If you revert his par break (revert = reject change, not undo!), you would

Re: Problem stripLeadingSpaces()

2007-01-14 Thread Abdelrazak Younes
Michael Gerz wrote: Hi, I rethought the logic of stripLeadingSpaces() and came to the conclusion that it is not a good idea to remove the spaces in change tracking mode: imagine that your co-author inserts a par break that you don't like. If you revert his par break (revert = reject change,

Re: Problem stripLeadingSpaces()

2007-01-14 Thread Michael Gerz
Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? means a space that was marked as deleted. Use the attached lyx file. Press return after "hello". The leading spaces are marked as deleted but the screen is not updated. Michael strip.lyx

Re: Problem stripLeadingSpaces()

2007-01-14 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Michael Gerz wrote: I think that you have to distinguish the document model from what is on screen. On screen, the row representation does not care if one char is a or a , seven chars are seven chars. I guess this is the problem and you have to skip deleted char in

Re: Problem stripLeadingSpaces()

2007-01-14 Thread Abdelrazak Younes
Michael Gerz wrote: Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? means a space that was marked as deleted. Use the attached lyx file. Press return after "hello". The leading spaces are marked as deleted but the screen is not updated.

Re: Problem stripLeadingSpaces()

2007-01-14 Thread Michael Gerz
Abdelrazak Younes schrieb: Michael Gerz wrote: Abdelrazak Younes schrieb: I don't understand, why the space in the first line should be deleted? means a space that was marked as deleted. Use the attached lyx file. Press return after "hello". The leading spaces are marked as deleted but

Re: Problem stripLeadingSpaces()

2007-01-14 Thread Michael Gerz
Abdelrazak Younes schrieb: Yes, this is exactly it. The problem is that the first (and unique) row of the first ParagraphMetrics has one more character than what is in the Paragraph. The Paragraph content does not seem to reflect the deleted characters. In the following loop, the position of