I've just been looking at the code in ControlSpellchecker to see what needs
to be done to clean up the code. I think that the first thing to do is to
create the necessary LFUNs. Below is the existing code together with the
proposed request that would be dispatched to the kernel.
John, I think that you know this code well. Am I on the right track?
Angus
FuncRequest(LFUN_SPELLCHECK, "end");
bufferview()->endOfSpellCheck();
FuncRequest(LFUN_SPELLCHECK, "clearselection");
// clear any old selection
LyXText * text = bufferview()->getLyXText();
bufferview()->toggleSelection(true);
bufferview()->update(text, BufferView::SELECT);
FuncRequest(LFUN_SPELLCHECK, "selectlastword");
bufferview()->selectLastWord();
FuncRequest(LFUN_SPELLCHECK, string("replaceword " + replacement));
bufferview()->replaceWord(replacement);
FuncRequest(LFUN_SPELLCHECK, string("nextword " + tostr(newval_)));
word_ = bufferview()->nextWord(newval_);
This last one is a little complex, as we would have also to pass the new
word and modified newval_ back to the dialog through
Dialogs::update("spellchecker", string(word_ + tostr(newval_)));