#include <ap_Dialog_Spell.h>
AP_Dialog_Spell::AP_Dialog_Spell | ( | XAP_DialogFactory * | pDlgFactory, | |
XAP_Dialog_Id | id | |||
) |
AP_Dialog_Spell::~AP_Dialog_Spell | ( | void | ) | [virtual] |
SpellChecker * AP_Dialog_Spell::_getDict | ( | void | ) | [protected] |
References m_pView.
Referenced by _spellCheckWord(), addIgnoreAll(), addToDict(), changeWordWith(), and nextMisspelledWord().
void AP_Dialog_Spell::_purgeSuggestions | ( | void | ) | [protected] |
bool AP_Dialog_Spell::_spellCheckWord | ( | const UT_UCSChar * | word, | |
UT_uint32 | len | |||
) | [protected] |
References _getDict(), and SpellChecker::checkWord().
Referenced by nextMisspelledWord().
bool AP_Dialog_Spell::addChangeAll | ( | const UT_UCSChar * | newword | ) | [protected] |
bool AP_Dialog_Spell::addIgnoreAll | ( | void | ) | [protected] |
References _getDict(), SpellChecker::ignoreWord(), m_iWordLength, and m_pWord.
Referenced by AP_Win32Dialog_Spell::_onCommand(), and AP_UnixDialog_Spell::onIgnoreAllClicked().
bool AP_Dialog_Spell::addToDict | ( | void | ) | [protected] |
References _getDict(), SpellChecker::addToCustomDict(), m_iWordLength, and m_pWord.
Referenced by AP_Win32Dialog_Spell::_onCommand(), and AP_UnixDialog_Spell::onAddClicked().
bool AP_Dialog_Spell::changeWordWith | ( | const UT_UCSChar * | newword | ) | [protected] |
References _getDict(), FL_SelectionPreserver::cmdCharInsert(), SpellChecker::correctWord(), m_bIsSelection, m_iEndLength, m_iWordLength, m_pCurrBlock, m_pEndBlock, m_pPreserver, m_pView, m_pWordIterator, makeWordVisible(), FV_View::updateScreen(), and UT_UCS4_strlen().
Referenced by AP_Win32Dialog_Spell::_change(), AP_Win32Dialog_Spell::_changeAll(), inChangeAll(), AP_UnixDialog_Spell::onChangeAllClicked(), and AP_UnixDialog_Spell::onChangeClicked().
void AP_Dialog_Spell::ignoreWord | ( | void | ) | [protected] |
bool AP_Dialog_Spell::inChangeAll | ( | void | ) | [protected] |
References changeWordWith(), FREEP, m_pChangeAll, m_pWordIterator, makeWordVisible(), UT_GenericStringMap< T >::pick(), UT_calloc(), UT_return_val_if_fail, and UT_UCS4_strncpy_to_char().
Referenced by nextMisspelledWord().
bool AP_Dialog_Spell::isComplete | ( | void | ) | const [inline] |
bool AP_Dialog_Spell::isSelection | ( | void | ) | const [inline] |
bool AP_Dialog_Spell::makeWordVisible | ( | void | ) | [protected] |
References FV_View::cmdUnselectSelection(), FV_View::extSelHorizontal(), fl_BlockLayout::getPosition(), m_iWordLength, m_iWordOffset, m_pCurrBlock, m_pView, FV_View::moveInsPtTo(), and FV_View::updateScreen().
Referenced by AP_Win32Dialog_Spell::_onInitDialog(), AP_Win32Dialog_Spell::_tryAgain(), changeWordWith(), inChangeAll(), nextMisspelledWord(), and AP_UnixDialog_Spell::runModal().
bool AP_Dialog_Spell::nextMisspelledWord | ( | void | ) | [protected] |
Scan through document until we find a misspelled word or the document ends
References _getDict(), _purgeSuggestions(), _spellCheckWord(), UT_GenericVector< T >::addItem(), AP_PREF_KEY_AutoSpellCheck, FL_DocLayout::bgcrSpelling, SpellChecker::checkWord(), DELETEP, XAP_Dialog::getApp(), XAP_Prefs::getCurrentScheme(), fl_SectionLayout::getDocLayout(), UT_GenericVector< T >::getItemCount(), FV_View::getLayout(), fl_ContainerLayout::getNextBlockInDocument(), UT_GenericVector< T >::getNthItem(), XAP_Prefs::getPrefsValueBool(), inChangeAll(), m_bIsSelection, m_bSkipWord, m_iEndLength, m_iStartIndex, m_iWordLength, m_iWordOffset, m_pCurrBlock, m_pCurrSection, m_pEndBlock, m_pView, m_pWord, m_pWordIterator, m_Suggestions, makeWordVisible(), SpellChecker::suggestWord(), UT_ASSERT_HARMLESS, and UT_return_val_if_fail.
Referenced by AP_Win32Dialog_Spell::_tryAgain(), AP_Win32Dialog_Spell::runModal(), and AP_UnixDialog_Spell::runModal().
void AP_Dialog_Spell::runModal | ( | XAP_Frame * | pFrame | ) | [pure virtual] |
Implements XAP_Dialog_NonPersistent.
Implemented in AP_UnixDialog_Spell, and AP_Win32Dialog_Spell.
References FV_View::getBlockAtPosition(), fl_BlockLayout::getDocSectionLayout(), FL_DocLayout::getDocument(), FV_View::getDocumentRangeOfCurrentSelection(), fl_ContainerLayout::getFirstLayout(), FL_DocLayout::getFirstSection(), XAP_Frame::getFrameData(), FV_View::getPoint(), fl_BlockLayout::getPosition(), FL_DocLayout::getView(), FV_View::isSelectionEmpty(), m_bIsSelection, m_bSkipWord, m_iEndLength, m_iOrigInsPoint, m_iStartIndex, m_pChangeAll, m_pCurrBlock, m_pCurrSection, m_pDoc, AP_FrameData::m_pDocLayout, m_pEndBlock, m_pEndSection, m_pFrame, m_pIgnoreAll, PD_DocumentRange::m_pos1, PD_DocumentRange::m_pos2, m_pPreserver, m_pStartBlock, m_pStartSection, m_pView, m_pWordIterator, and UT_return_if_fail.
bool AP_Dialog_Spell::m_bCancelled [protected] |
bool AP_Dialog_Spell::m_bIsSelection [protected] |
Referenced by AP_Dialog_Spell(), changeWordWith(), nextMisspelledWord(), runModal(), and ~AP_Dialog_Spell().
bool AP_Dialog_Spell::m_bSkipWord [protected] |
Referenced by AP_Dialog_Spell(), ignoreWord(), nextMisspelledWord(), and runModal().
UT_sint32 AP_Dialog_Spell::m_iEndLength [protected] |
Referenced by AP_Dialog_Spell(), changeWordWith(), nextMisspelledWord(), and runModal().
PT_DocPosition AP_Dialog_Spell::m_iOrigInsPoint [protected] |
Referenced by runModal(), and ~AP_Dialog_Spell().
short AP_Dialog_Spell::m_iSelectedRow [protected] |
UT_sint32 AP_Dialog_Spell::m_iStartIndex [protected] |
Referenced by AP_Dialog_Spell(), nextMisspelledWord(), and runModal().
UT_sint32 AP_Dialog_Spell::m_iWordLength [protected] |
Referenced by addIgnoreAll(), addToDict(), AP_Dialog_Spell(), changeWordWith(), makeWordVisible(), and nextMisspelledWord().
UT_sint32 AP_Dialog_Spell::m_iWordOffset [protected] |
Referenced by AP_Dialog_Spell(), makeWordVisible(), and nextMisspelledWord().
UT_GenericStringMap<UT_UCSChar*>* AP_Dialog_Spell::m_pChangeAll [protected] |
Referenced by addChangeAll(), AP_Dialog_Spell(), inChangeAll(), runModal(), and ~AP_Dialog_Spell().
fl_BlockLayout* AP_Dialog_Spell::m_pCurrBlock [protected] |
Referenced by AP_Dialog_Spell(), changeWordWith(), makeWordVisible(), nextMisspelledWord(), and runModal().
fl_DocSectionLayout* AP_Dialog_Spell::m_pCurrSection [protected] |
Referenced by AP_Dialog_Spell(), nextMisspelledWord(), and runModal().
PD_Document* AP_Dialog_Spell::m_pDoc [protected] |
Referenced by runModal().
fl_BlockLayout* AP_Dialog_Spell::m_pEndBlock [protected] |
Referenced by AP_Dialog_Spell(), changeWordWith(), nextMisspelledWord(), and runModal().
fl_DocSectionLayout* AP_Dialog_Spell::m_pEndSection [protected] |
Referenced by AP_Dialog_Spell(), and runModal().
XAP_Frame* AP_Dialog_Spell::m_pFrame [protected] |
Referenced by runModal().
UT_GenericStringMap<UT_UCSChar*>* AP_Dialog_Spell::m_pIgnoreAll [protected] |
Referenced by AP_Dialog_Spell(), runModal(), and ~AP_Dialog_Spell().
FL_SelectionPreserver* AP_Dialog_Spell::m_pPreserver [protected] |
Referenced by AP_Dialog_Spell(), changeWordWith(), runModal(), and ~AP_Dialog_Spell().
fl_BlockLayout* AP_Dialog_Spell::m_pStartBlock [protected] |
Referenced by AP_Dialog_Spell(), and runModal().
fl_DocSectionLayout* AP_Dialog_Spell::m_pStartSection [protected] |
Referenced by AP_Dialog_Spell(), and runModal().
FV_View* AP_Dialog_Spell::m_pView [protected] |
Referenced by _getDict(), AP_Dialog_Spell(), changeWordWith(), makeWordVisible(), nextMisspelledWord(), runModal(), and ~AP_Dialog_Spell().
const UT_UCSChar* AP_Dialog_Spell::m_pWord [protected] |
Referenced by addIgnoreAll(), addToDict(), AP_Dialog_Spell(), and nextMisspelledWord().
fl_BlockSpellIterator* AP_Dialog_Spell::m_pWordIterator [protected] |
UT_GenericVector<UT_UCSChar*>* AP_Dialog_Spell::m_Suggestions [protected] |
Referenced by AP_Win32Dialog_Spell::_change(), AP_Win32Dialog_Spell::_changeAll(), AP_Win32Dialog_Spell::_onCommand(), _purgeSuggestions(), AP_Win32Dialog_Spell::_showMisspelledWord(), AP_Win32Dialog_Spell::_suggestChange(), AP_UnixDialog_Spell::_updateWindow(), nextMisspelledWord(), and AP_UnixDialog_Spell::onSuggestionSelected().