diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index c15b8b51a3df1df64b414afe1a7b8ae15312e0f5..d549fb4d8855569eb9dca249dc54bb11f2256adf 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -593,7 +593,7 @@ void LLLineEditor::addToDictionary() { if (canAddToDictionary()) { - LLSpellChecker::instance().addToCustomDictionary(getMisspelledWord(mCursorPos)); + LLSpellChecker::instanceFast().addToCustomDictionary(getMisspelledWord(mCursorPos)); } } @@ -606,7 +606,7 @@ void LLLineEditor::addToIgnore() { if (canAddToIgnore()) { - LLSpellChecker::instance().addToIgnoreList(getMisspelledWord(mCursorPos)); + LLSpellChecker::instanceFast().addToIgnoreList(getMisspelledWord(mCursorPos)); } } @@ -2686,7 +2686,7 @@ void LLLineEditor::showContextMenu(S32 x, S32 y) std::string misspelled_word = getMisspelledWord(mCursorPos); if ((is_misspelled = !misspelled_word.empty()) == true) { - LLSpellChecker::instance().getSuggestions(misspelled_word, mSuggestionList); + LLSpellChecker::instanceFast().getSuggestions(misspelled_word, mSuggestionList); } } diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp index dca99a6705f63e61d86b719c6d7ebd31fadd7dc6..427eb16b6d6360b6b50851b5418971c381db75b0 100644 --- a/indra/llui/llspellcheck.cpp +++ b/indra/llui/llspellcheck.cpp @@ -402,7 +402,7 @@ const std::string LLSpellChecker::getDictionaryUserPath() // static bool LLSpellChecker::getUseSpellCheck() { - return (LLSpellChecker::instanceExists()) && (LLSpellChecker::instance().mHunspell); + return LLSpellChecker::instanceFast().mHunspell; } bool LLSpellChecker::canRemoveDictionary(const std::string& dict_language) @@ -411,7 +411,7 @@ bool LLSpellChecker::canRemoveDictionary(const std::string& dict_language) const LLSD dict_info = getDictionaryData(dict_language); return (dict_info["user_installed"].asBoolean()) && - ( (!getUseSpellCheck()) || (!LLSpellChecker::instance().isActiveDictionary(dict_language)) ); + ( (!getUseSpellCheck()) || (!isActiveDictionary(dict_language)) ); } void LLSpellChecker::removeDictionary(const std::string& dict_language) @@ -481,8 +481,8 @@ boost::signals2::connection LLSpellChecker::setSettingsChangeCallback(const sett void LLSpellChecker::setUseSpellCheck(const std::string& dict_language) { if ( (((dict_language.empty()) && (getUseSpellCheck())) || (!dict_language.empty())) && - (LLSpellChecker::instance().mDictLanguage != dict_language) ) + (LLSpellChecker::instanceFast().mDictLanguage != dict_language) ) { - LLSpellChecker::instance().initHunspell(dict_language); + LLSpellChecker::instanceFast().initHunspell(dict_language); } } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 427bbd4286d29416d9d843aad1c4391c1f5d9ded..12b18fa0c9443a1896835bcbd9f38993ebefd2ac 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1449,7 +1449,7 @@ void LLTextBase::deselect() bool LLTextBase::getSpellCheck() const { - return (LLSpellChecker::getUseSpellCheck()) && (!mReadOnly) && (mSpellCheck); + return (!mReadOnly) && (mSpellCheck) && (LLSpellChecker::getUseSpellCheck()); } const std::string& LLTextBase::getSuggestion(U32 index) const @@ -1490,7 +1490,7 @@ void LLTextBase::addToDictionary() { if (canAddToDictionary()) { - LLSpellChecker::instance().addToCustomDictionary(getMisspelledWord(mCursorPos)); + LLSpellChecker::instanceFast().addToCustomDictionary(getMisspelledWord(mCursorPos)); } } @@ -1503,7 +1503,7 @@ void LLTextBase::addToIgnore() { if (canAddToIgnore()) { - LLSpellChecker::instance().addToIgnoreList(getMisspelledWord(mCursorPos)); + LLSpellChecker::instanceFast().addToIgnoreList(getMisspelledWord(mCursorPos)); } }