#include <spell_manager.h>

Public Types | |
| enum | SpellCheckResult { LOOKUP_SUCCEEDED = 0, LOOKUP_FAILED = 1, LOOKUP_ERROR = 2 } |
Public Member Functions | |
| SpellCheckResult | checkWord (const UT_UCSChar *word, size_t len) |
| UT_GenericVector< UT_UCSChar * > * | suggestWord (const UT_UCSChar *word, size_t len) |
| virtual UT_Vector & | getMapping () |
| virtual bool | doesDictionaryExist (const char *) |
| virtual bool | addToCustomDict (const UT_UCSChar *word, size_t len) |
| virtual void | correctWord (const UT_UCSChar *toCorrect, size_t toCorrectLen, const UT_UCSChar *correct, size_t correctLen) |
| virtual void | ignoreWord (const UT_UCSChar *toCorrect, size_t toCorrectLen)=0 |
| virtual bool | isIgnored (const UT_UCSChar *pWord, size_t len) const =0 |
| const UT_String & | getLanguage () const |
| bool | requestDictionary (const char *szLang) |
| bool | isDictionaryFound (void) |
| void | setDictionaryFound (bool b) |
Protected Member Functions | |
| SpellChecker () | |
| virtual | ~SpellChecker () |
| void | setLanguage (const char *lang) |
Static Protected Member Functions | |
| static void | couldNotLoadDictionary (const char *szLang) |
Protected Attributes | |
| UT_String | m_sLanguage |
| BarbarismChecker | m_BarbarismChecker |
| UT_Vector | m_vecEmpty |
| bool | m_bIsBarbarism |
| bool | m_bIsDictionaryWord |
| bool | m_bFoundDictionary |
Private Member Functions | |
| SpellChecker (const SpellChecker &) | |
| void | operator= (const SpellChecker &) |
| virtual bool | _requestDictionary (const char *szLang)=0 |
| virtual SpellCheckResult | _checkWord (const UT_UCSChar *word, size_t len)=0 |
| virtual UT_GenericVector < UT_UCSChar * > * | _suggestWord (const UT_UCSChar *word, size_t len)=0 |
Friends | |
| class | SpellManager |
| SpellChecker::SpellChecker | ( | ) | [protected] |
Abstract constructor
| SpellChecker::~SpellChecker | ( | ) | [protected, virtual] |
Abstract destructor
| SpellChecker::SpellChecker | ( | const SpellChecker & | ) | [private] |
| SpellChecker::SpellCheckResult SpellChecker::checkWord | ( | const UT_UCSChar * | word, | |
| size_t | len | |||
| ) |
| UT_GenericVector< UT_UCSChar * > * SpellChecker::suggestWord | ( | const UT_UCSChar * | word, | |
| size_t | len | |||
| ) |
References _suggestWord(), m_BarbarismChecker, and BarbarismChecker::suggestWord().
Referenced by AP_Dialog_Spell::nextMisspelledWord().
| virtual UT_Vector& SpellChecker::getMapping | ( | ) | [inline, virtual] |
Referenced by XAP_Dialog_Language::getAvailableDictionaries().
| virtual bool SpellChecker::doesDictionaryExist | ( | const char * | ) | [inline, virtual] |
Referenced by XAP_Dialog_Language::getAvailableDictionaries().
| bool SpellChecker::addToCustomDict | ( | const UT_UCSChar * | word, | |
| size_t | len | |||
| ) | [virtual] |
Reimplemented in EnchantChecker.
References XAP_App::addWordToDict(), and XAP_App::getApp().
Referenced by AP_Dialog_Spell::addToDict().
| void SpellChecker::correctWord | ( | const UT_UCSChar * | toCorrect, | |
| size_t | toCorrectLen, | |||
| const UT_UCSChar * | correct, | |||
| size_t | correctLen | |||
| ) | [virtual] |
| virtual void SpellChecker::ignoreWord | ( | const UT_UCSChar * | toCorrect, | |
| size_t | toCorrectLen | |||
| ) | [pure virtual] |
| virtual bool SpellChecker::isIgnored | ( | const UT_UCSChar * | pWord, | |
| size_t | len | |||
| ) | const [pure virtual] |
Implemented in EnchantChecker.
| const UT_String& SpellChecker::getLanguage | ( | void | ) | const [inline] |
Referenced by checkWord().
| bool SpellChecker::requestDictionary | ( | const char * | szLang | ) |
References _requestDictionary(), BarbarismChecker::load(), and m_BarbarismChecker.
| bool SpellChecker::isDictionaryFound | ( | void | ) | [inline] |
| void SpellChecker::setDictionaryFound | ( | bool | b | ) | [inline] |
| void SpellChecker::setLanguage | ( | const char * | lang | ) | [inline, protected] |
| void SpellChecker::couldNotLoadDictionary | ( | const char * | szLang | ) | [static, protected] |
References XAP_Dialog_MessageBox::a_OK, XAP_Dialog_MessageBox::b_O, UT_String::c_str(), gchar, XAP_App::getApp(), UT_Language::getIndxFromCode(), XAP_App::getLastFocussedFrame(), UT_Language::getNthLangName(), XAP_App::getStringSet(), XAP_StringSet::getValue(), XAP_Frame::showMessageBox(), UT_DEBUGMSG, and UT_String_sprintf().
| void SpellChecker::operator= | ( | const SpellChecker & | ) | [private] |
| virtual bool SpellChecker::_requestDictionary | ( | const char * | szLang | ) | [private, pure virtual] |
| virtual SpellCheckResult SpellChecker::_checkWord | ( | const UT_UCSChar * | word, | |
| size_t | len | |||
| ) | [private, pure virtual] |
| virtual UT_GenericVector<UT_UCSChar*>* SpellChecker::_suggestWord | ( | const UT_UCSChar * | word, | |
| size_t | len | |||
| ) | [private, pure virtual] |
friend class SpellManager [friend] |
Reimplemented in EnchantChecker.
UT_String SpellChecker::m_sLanguage [protected] |
BarbarismChecker SpellChecker::m_BarbarismChecker [protected] |
Referenced by checkWord(), requestDictionary(), and suggestWord().
UT_Vector SpellChecker::m_vecEmpty [protected] |
bool SpellChecker::m_bIsBarbarism [protected] |
Referenced by checkWord().
bool SpellChecker::m_bIsDictionaryWord [protected] |
Referenced by checkWord().
bool SpellChecker::m_bFoundDictionary [protected] |
1.5.5