Stephan Witt <st.w...@gmx.net> 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 again and again. What kind of scrolling? Page Up/Down or one line at a time? > 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 > through Paragraph methods. So it must be doable with little effort. My view is: either (1) your current code is fast enough and you should simplify it by getting rid of range-setting functions for misspelled words; or (2) a more complicated thing is necessary and you should integrate the misspelled info into Font object, since you are sure that this one is correctly updated. There is no point in recreating yet another Font-like property and update it in all points of the document. So I propose to profile your current code and see whether there are things that seem wrong (typing in a paragraph that is very long, for example). And go for the more complicated version only if the profiler shows something. JMarc