Kate
spellcheckdialog.cpp
Go to the documentation of this file.
99 void KateSpellCheckDialog::spellcheck( const KTextEditor::Cursor &from, const KTextEditor::Cursor &to )
187 length = m_view->doc()->computePositionWrtOffsets( m_currentDecToEncOffsetList, pos + word.length() )
198 int length = m_view->doc()->computePositionWrtOffsets( m_currentDecToEncOffsetList, pos + word.length() )
204 KateGlobal::self()->spellCheckManager()->replaceCharactersEncodedIfNecessary( newWord, doc, replacementRange );
206 m_currentSpellCheckRange.setRange( KTextEditor::Range( replacementStartCursor, m_currentSpellCheckRange.end() ) );
207 // we have to be careful here: due to static word wrapping the text might change in addition to simply
208 // the misspelled word being replaced, i.e. new line breaks might be inserted as well. As such, the text
209 // in the 'Sonnet::Dialog' might be eventually out of sync with the visible text. Therefore, we 'restart'
211 performSpellCheck( KTextEditor::Range( replacementStartCursor, m_globalSpellCheckRange->end() ) );
219 m_languagesInSpellCheckRange = KateGlobal::self()->spellCheckManager()->spellCheckLanguageRanges(m_view->doc(), range);
238 KTextEditor::Cursor nextRangeBegin = (m_currentSpellCheckRange.isValid() ? m_currentSpellCheckRange.end()
247 KTextEditor::Range languageSubRange = (nextRangeBegin.isValid() ? KTextEditor::Range(nextRangeBegin, currentLanguageRange.end())
KGuiItem cancel()
Cursor & start()
KateSpellCheckDialog(KateView *)
Definition: spellcheckdialog.cpp:43
static Cursor invalid()
QScriptValue i18n(QScriptContext *context, QScriptEngine *engine)
i18n("text", arguments [optional])
Definition: katescripthelpers.cpp:186
int computePositionWrtOffsets(const OffsetList &offsetList, int pos)
Definition: katedocument.cpp:5254
virtual KTextEditor::MovingRange * newMovingRange(const KTextEditor::Range &range, KTextEditor::MovingRange::InsertBehaviors insertBehaviors=KTextEditor::MovingRange::DoNotExpand, KTextEditor::MovingRange::EmptyBehavior emptyBehavior=KTextEditor::MovingRange::AllowEmpty)
Create a new moving range for this document.
Definition: katedocument.cpp:4742
virtual bool isValid() const
void setSpellCheckContinuedAfterReplacement(bool b)
QAction * addAction(const QString &name, QAction *action)
void setBuffer(const QString &)
static Cursor start()
virtual void setRange(const Range &range)
QList< QPair< KTextEditor::Range, QString > > spellCheckLanguageRanges(KateDocument *doc, const KTextEditor::Range &range)
Definition: spellcheck.cpp:92
KSharedConfigPtr config()
void createActions(KActionCollection *)
Definition: spellcheckdialog.cpp:62
virtual const KTextEditor::Range & selectionRange() const
Definition: kateview.cpp:2760
void show()
void showSpellCheckCompletionMessage(bool b=true)
void showProgressDialog(int timeout=500)
QString decodeCharacters(const KTextEditor::Range &range, KateDocument::OffsetList &decToEncOffsetList, KateDocument::OffsetList &encToDecOffsetList)
The first OffsetList is from decoded to encoded, and the second OffsetList from encoded to decoded...
Definition: katedocument.cpp:5266
virtual bool isValid() const
virtual bool setSelection(const KTextEditor::Range &selection)
Definition: kateview.cpp:1931
static Range invalid()
void restore(KConfig *config)
void setSpeller(const Speller &speller)
~KateSpellCheckDialog()
Definition: spellcheckdialog.cpp:54
virtual KTextEditor::Cursor documentEnd() const
Definition: katedocument.cpp:4682
Definition: spellcheck.h:36
Definition: kateview.h:78
Definition: katedocument.h:74
KAction * replace(const QObject *recvr, const char *slot, QObject *parent)
virtual int line() const
virtual void setLine(int line)
void restore(KConfig *config)
Cursor & end()
QList< QPair< KTextEditor::Range, QString > > spellCheckWrtHighlightingRanges(KateDocument *doc, const KTextEditor::Range &range, const QString &dictionary=QString(), bool singleLine=false, bool returnSingleRange=false)
Definition: spellcheck.cpp:129
QString language() const
virtual const MovingCursor & end() const =0
bool isEmpty() const
const KShortcut & end()
virtual void setColumn(int column)
int column() const
bool setCursorPositionInternal(const KTextEditor::Cursor &position, uint tabwidth=1, bool calledExternally=false)
Definition: kateview.cpp:1278
void setLanguage(const QString &lang)
void replaceCharactersEncodedIfNecessary(const QString &newWord, KateDocument *doc, const KTextEditor::Range &replacementRange)
Definition: spellcheck.cpp:239
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.