void KEdit::misspelling(const QString &word, const QStringList &, unsigned int pos) { unsigned int l = 0; unsigned int cnt = 0; posToRowCol(pos, l, cnt); setSelection(l, cnt, l, cnt + word.length()); /* if (cursorPoint().y()>height()/2) kspell->moveDlg (10, height()/2-kspell->heightDlg()-15); else kspell->moveDlg (10, height()/2 + 15); */ }
//need to use pos for insert, not cur, so forget cur altogether void KEdit::corrected (const QString &originalword, const QString &newword, unsigned int pos) { //we'll reselect the original word in case the user has played with //the selection in eframe or the word was auto-replaced unsigned int l = 0; unsigned int cnt = 0; if( newword != originalword ) { posToRowCol (pos, l, cnt); setSelection(l, cnt, l, cnt+originalword.length()); setReadOnly ( false ); removeSelectedText(); insert(newword); setReadOnly ( true ); } else { deselect(); } }