Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-08 Thread Stephan Witt
Am 02.09.2010 um 09:38 schrieb Jean-Marc LASGOUTTES: > Stephan Witt writes: > >> The point is to catch all possibilities to change paragraph contents. >> But that holds true for change tracking either. Perhaps a common >> method can simplify that... But every change of content has to go >> throu

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-06 Thread Stephan Witt
Am 06.09.2010 um 12:38 schrieb Jean-Marc LASGOUTTES: > Stephan Witt writes: >> I tried to see what happens when the spell checker gets discretionary >> hyphens. >> But I don't know if the presented code snippet really produce a >> discretionary hyphen as result. >> When I inspect the string pas

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-06 Thread Jean-Marc LASGOUTTES
Stephan Witt writes: > I tried to see what happens when the spell checker gets discretionary hyphens. > But I don't know if the presented code snippet really produce a discretionary > hyphen as result. > When I inspect the string passed to spell checker I couldn't see a difference. > So, I have t

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-04 Thread Stephan Witt
Am 03.09.2010 um 17:42 schrieb Jean-Marc LASGOUTTES: > Stephan Witt writes: What about replacing each character coming from the inset output by a discretionary hyphen (0x00ad)? Will the spellchecker correctly ignore it? In this case, this is a nice way of having strings of the same

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-03 Thread Jean-Marc LASGOUTTES
Stephan Witt writes: >>> What about replacing each character coming from the inset output by a >>> discretionary hyphen (0x00ad)? Will the spellchecker correctly ignore >>> it? In this case, this is a nice way of having strings of the same size. >> > > I tried that, but it didn't work. > How shou

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-03 Thread Pavel Sanda
Stephan Witt wrote: > Any objections? not here pavel

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-03 Thread Jean-Marc LASGOUTTES
Stephan Witt writes: > I'd like to commit the attached patch - changing the names only and adding > the paragraph check feature for apple speller. > > The Paragraph and Font changes I've left out because they seem controversial. > > Any objections? Not from me. >> What about replacing each char

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-03 Thread Stephan Witt
Am 03.09.2010 um 16:52 schrieb Stephan Witt: > Am 01.09.2010 um 20:11 schrieb Stephan Witt: > >> Am 01.09.2010 um 17:38 schrieb Jean-Marc LASGOUTTES: >> >> What about replacing each character coming from the inset output by a >> discretionary hyphen (0x00ad)? Will the spellchecker correctly igno

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-03 Thread Stephan Witt
Am 01.09.2010 um 20:11 schrieb Stephan Witt: > Am 01.09.2010 um 17:38 schrieb Jean-Marc LASGOUTTES: > >> Stephan Witt writes: >>> I've made some changes again... shorten lines as Jürgen suggested and >>> formatting of if/while. And I added code to handle the soft-hyphens >>> and friends. >> >>>

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-02 Thread Stephan Witt
Am 02.09.2010 um 18:22 schrieb Stephan Witt: > Am 02.09.2010 um 15:42 schrieb Abdelrazak Younes: > >> On 09/02/2010 02:19 PM, Stephan Witt wrote: >>> Am 02.09.2010 um 13:42 schrieb Abdelrazak Younes: >>> >>> On 09/02/2010 12:13 PM, Stephan Witt wrote: > I could go back to the row

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-02 Thread Stephan Witt
Am 02.09.2010 um 15:42 schrieb Abdelrazak Younes: > On 09/02/2010 02:19 PM, Stephan Witt wrote: >> Am 02.09.2010 um 13:42 schrieb Abdelrazak Younes: >> >> >>> On 09/02/2010 12:13 PM, Stephan Witt wrote: >>> I could go back to the row based spell check and abandon the checker state >

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-02 Thread Abdelrazak Younes
On 09/02/2010 02:19 PM, Stephan Witt wrote: Am 02.09.2010 um 13:42 schrieb Abdelrazak Younes: On 09/02/2010 12:13 PM, Stephan Witt wrote: I could go back to the row based spell check and abandon the checker state of paragraph. But I decided to do the move from row to paragraph check

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-02 Thread Stephan Witt
Am 02.09.2010 um 14:10 schrieb Pavel Sanda: > Abdelrazak Younes wrote: >> I am a bit uneasy with the whole paragraph based solution as I am >> raisonably confident that it won't be as fast as the row based one for >> Aspell and Unspell and the user experience will be worse I am sure. > > bad n

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-02 Thread Stephan Witt
Am 02.09.2010 um 13:42 schrieb Abdelrazak Younes: > On 09/02/2010 12:13 PM, Stephan Witt wrote: >> I could go back to the row based spell check and abandon the checker state >> of paragraph. >> But I decided to do the move from row to paragraph checking when seeing the >> loop code in >> Buffer.

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-02 Thread Pavel Sanda
Abdelrazak Younes wrote: > I am a bit uneasy with the whole paragraph based solution as I am > raisonably confident that it won't be as fast as the row based one for > Aspell and Unspell and the user experience will be worse I am sure. bad news p

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-02 Thread Abdelrazak Younes
On 09/02/2010 12:13 PM, Stephan Witt wrote: I could go back to the row based spell check and abandon the checker state of paragraph. But I decided to do the move from row to paragraph checking when seeing the loop code in Buffer.cpp which implements the explicit spell check with F7. This code i

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-02 Thread Stephan Witt
Am 02.09.2010 um 09:38 schrieb Jean-Marc LASGOUTTES: > Stephan Witt writes: >>> I fear this is going to become very fragile. >> >> That's why I stopped here and see currently no need to reduce the >> spell check range to the current word. > > What do you mean? I meant I did not implement the l

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-02 Thread Jean-Marc LASGOUTTES
Stephan Witt writes: >> Can you explain what the softbreaks variable is for? > > I called it softbreaks because I detected the problem with > soft-hyphens and it's the same with ligature-breaks. They have their > own position as insets but are "missing" in the result of > Paragraph::asString(). So

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-02 Thread Jean-Marc LASGOUTTES
Stephan Witt writes: >> I fear this is going to become very fragile. > > That's why I stopped here and see currently no need to reduce the > spell check range to the current word. What do you mean? > When typing this is ok. But on scroll you have a complete spell check > of the visible part agai

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-01 Thread Stephan Witt
Am 02.09.2010 um 00:35 schrieb Jean-Marc Lasgouttes: > Le 01/09/2010 20:11, Stephan Witt a écrit : +// Paragraph::SpellRanges +// +/ > + +class Paragraph::SpellCheckerState { >>> >>> What is the real na

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-01 Thread Jean-Marc Lasgouttes
Le 01/09/2010 20:11, Stephan Witt a écrit : +// Paragraph::SpellRanges +// +/ + +class Paragraph::SpellCheckerState { What is the real name? Does it need to be in Paragraph, or can it be in Paragraph::Private? Or can it eve

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-01 Thread Stephan Witt
Am 01.09.2010 um 17:38 schrieb Jean-Marc LASGOUTTES: > Stephan Witt writes: >> I've made some changes again... shorten lines as Jürgen suggested and >> formatting of if/while. And I added code to handle the soft-hyphens >> and friends. >> >> So I attach it again and hope I can put it in later. J

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-09-01 Thread Jean-Marc LASGOUTTES
Stephan Witt writes: > I've made some changes again... shorten lines as Jürgen suggested and > formatting of if/while. And I added code to handle the soft-hyphens > and friends. > > So I attach it again and hope I can put it in later. JMarc, can you > have a look, please? See below. Nice work. J

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-08-31 Thread Stephan Witt
Am 28.08.2010 um 19:26 schrieb Pavel Sanda: > Stephan Witt wrote: >> The performance gain with native spell checker on mac is as follows: >> Scrolling the complete users guide with spell check as you type enabled >> * without patch: 34% of the cpu time in spell check, >> * with patch: 4% of the t

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-08-30 Thread Stephan Witt
Am 30.08.2010 um 16:40 schrieb Jürgen Spitzmüller: > Stephan Witt wrote: > BTW, the word LyX is correct for apples spell checker :-) >>> >>> >>> >>> by default? :-) >> >> Yes. I think it ignores all words with mixed case by default. > > Hm, that would be a really bad default. I think ca

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-08-30 Thread Jürgen Spitzmüller
Stephan Witt wrote: > > ..."by default". Which means you can change that behaviour, I suppose. > > Maybe. By studying the hunspell.hxx file I couldn't learn how... > I found no argument to the spell() function and no option setter function. > Perhaps it is left as an exercise to the open-source co

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-08-30 Thread Stephan Witt
Am 30.08.2010 um 14:42 schrieb Jürgen Spitzmüller: > Also sprach Stephan Witt: >> Am 30.08.2010 um 13:07 schrieb Jürgen Spitzmüller: >>> Stephan Witt wrote: I removed one FIXME which is outdated and one that might be still valid. Perhaps I should have mentioned this, but I don't think th

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-08-30 Thread Jürgen Spitzmüller
Also sprach Stephan Witt: > Am 30.08.2010 um 13:07 schrieb Jürgen Spitzmüller: > > Stephan Witt wrote: > >> I removed one FIXME which is outdated and one that might be still valid. > >> Perhaps I should have mentioned this, but I don't think that this should > >> be customizable. > > > > I think i

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-08-30 Thread Jürgen Spitzmüller
Stephan Witt wrote: > I removed one FIXME which is outdated and one that might be still valid. > Perhaps I should have mentioned this, but I don't think that this should be > customizable. I think it should. This is a common customization option for spellcheckers (you can customize whether to che

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-08-30 Thread Stephan Witt
Am 30.08.2010 um 11:48 schrieb Jürgen Spitzmüller: > Stephan Witt wrote: >> Now the patch is ready for review. >> It compiles and works for me on mac and linux. Thank you for review. > Not a thorough review, but on a first glance I see many style issues. For > instance, > > + if (from >= t

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-08-30 Thread Jürgen Spitzmüller
Stephan Witt wrote: > Now the patch is ready for review. > It compiles and works for me on mac and linux. Not a thorough review, but on a first glance I see many style issues. For instance, + if (from >= to) return 0; should be + if (from >= to) + return 0; also, tak

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-08-29 Thread Stephan Witt
Am 28.08.2010 um 19:26 schrieb Pavel Sanda: > Stephan Witt wrote: >> The performance gain with native spell checker on mac is as follows: >> Scrolling the complete users guide with spell check as you type enabled >> * without patch: 34% of the cpu time in spell check, >> * with patch: 4% of the t

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-08-28 Thread Stephan Witt
Am 28.08.2010 um 19:26 schrieb Pavel Sanda: > Stephan Witt wrote: >> The performance gain with native spell checker on mac is as follows: >> Scrolling the complete users guide with spell check as you type enabled >> * without patch: 34% of the cpu time in spell check, >> * with patch: 4% of the t

Re: Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-08-28 Thread Pavel Sanda
Stephan Witt wrote: > The performance gain with native spell checker on mac is as follows: > Scrolling the complete users guide with spell check as you type enabled > * without patch: 34% of the cpu time in spell check, > * with patch: 4% of the time in spell check. > Didn't made measurements for

Patch for spell checker state in Paragraph instead of Font (Re: alpha6)

2010-08-28 Thread Stephan Witt
Am 28.08.2010 um 18:46 schrieb Pavel Sanda: > Stephan Witt wrote: >> Or is it really very soon? > i was thinking about tomorrow or monday, but no hard opinions. > >> I've much time spent for the planned spell checker changes. >> I'd like to present them soon... any chance to get them in? > > dep

Re: alpha6

2010-08-28 Thread Pavel Sanda
Stephan Witt wrote: >Or is it really very soon? i was thinking about tomorrow or monday, but no hard opinions. > I've much time spent for the planned spell checker changes. > I'd like to present them soon... any chance to get them in? depends what does it mean soon. if its in the next days we can

Re: alpha6

2010-08-28 Thread Stephan Witt
Am 28.08.2010 um 12:44 schrieb Pavel Sanda: > hi, > > i plan to release a6 very soon. anything you wanted to have in before? > highest prior bugs are showstopper as usual. I've much time spent for the planned spell checker changes. I'd like to present them soon... any chance to get them in? Or i