Global.getSpellSetting(Configuration.SPELL_IGNORESENTENCECAPITALIZATION));
spellListener.abortSpellCheck = false;
spellListener.errorsFound = false;
String content = getBrowser().page().mainFrame().toPlainText();
StringWordTokenizer tokenizer = new StringWordTokenizer(content);
if (!tokenizer.hasMoreWords())
return;
getBrowser().page().action(WebAction.MoveToStartOfDocument);
getBrowser().setFocus();
boolean found;
// Move to the start of page
KeyboardModifiers ctrl = new KeyboardModifiers(KeyboardModifier.ControlModifier.value());
QKeyEvent home = new QKeyEvent(Type.KeyPress, Key.Key_Home.value(), ctrl);
browser.keyPressEvent(home);
getBrowser().setFocus();
tokenizer = new StringWordTokenizer(content);
String word;
while(tokenizer.hasMoreWords()) {
word = tokenizer.nextWord();
found = getBrowser().page().findText(word);
if (found && !spellListener.abortSpellCheck) {
spellChecker.checkSpelling(new StringWordTokenizer(word));
getBrowser().setFocus();
}
}
// Go to the end of the document & finish up.