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())
void clear()
KateSpellCheckDialog(KateView *)
Definition: spellcheckdialog.cpp:43
QScriptValue i18n(QScriptContext *context, QScriptEngine *engine)
i18n("text", arguments [optional])
Definition: katescripthelpers.cpp:186
int computePositionWrtOffsets(const OffsetList &offsetList, int pos)
Definition: katedocument.cpp:5248
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:4741
QList< QPair< KTextEditor::Range, QString > > spellCheckLanguageRanges(KateDocument *doc, const KTextEditor::Range &range)
Definition: spellcheck.cpp:92
int size() const
void createActions(KActionCollection *)
Definition: spellcheckdialog.cpp:62
void clear()
virtual const KTextEditor::Range & selectionRange() const
Definition: kateview.cpp:2815
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:5260
virtual bool setSelection(const KTextEditor::Range &selection)
Definition: kateview.cpp:1956
bool isEmpty() const
~KateSpellCheckDialog()
Definition: spellcheckdialog.cpp:54
virtual KTextEditor::Cursor documentEnd() const
Definition: katedocument.cpp:4681
Definition: spellcheck.h:36
T & first()
Definition: kateview.h:77
iterator end()
Definition: katedocument.h:74
int length() const
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
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool setCursorPositionInternal(const KTextEditor::Cursor &position, uint tabwidth=1, bool calledExternally=false)
Definition: kateview.cpp:1293
iterator begin()
void destroyed(QObject *obj)
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-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.