- internal : const-correctness in LLHunspellWrapper
--HG-- branch : Misc-Spellcheckmeow-7.2.2
parent
7f0a348dee
commit
53ea5ca294
|
|
@ -62,14 +62,14 @@ LLHunspellWrapper::~LLHunspellWrapper()
|
|||
delete m_pHunspell;
|
||||
}
|
||||
|
||||
bool LLHunspellWrapper::checkSpelling(const std::string& strWord)
|
||||
bool LLHunspellWrapper::checkSpelling(const std::string& strWord) const
|
||||
{
|
||||
if ( (!s_fSpellCheck) || (!m_pHunspell) || (strWord.length() < 3) )
|
||||
return true;
|
||||
return m_pHunspell->spell(strWord.c_str());
|
||||
}
|
||||
|
||||
S32 LLHunspellWrapper::getSuggestions(const std::string& strWord, std::vector<std::string>& strSuggestionList)
|
||||
S32 LLHunspellWrapper::getSuggestions(const std::string& strWord, std::vector<std::string>& strSuggestionList) const
|
||||
{
|
||||
if ( (!s_fSpellCheck) || (!m_pHunspell) || (strWord.length() < 3) )
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -31,15 +31,15 @@ protected:
|
|||
~LLHunspellWrapper();
|
||||
|
||||
public:
|
||||
bool checkSpelling(const std::string& strWord);
|
||||
S32 getSuggestions(const std::string& strWord, std::vector<std::string>& strSuggestionList);
|
||||
bool checkSpelling(const std::string& strWord) const;
|
||||
S32 getSuggestions(const std::string& strWord, std::vector<std::string>& strSuggestionList) const;
|
||||
|
||||
/*
|
||||
* Dictionary related functions
|
||||
*/
|
||||
const std::string getCurrentDictionary() const { return m_strDictionary; }
|
||||
S32 getDictionaries(std::vector<std::string>& strDictionaryList) const;
|
||||
const std::string& getDictionaryPath() { return m_strDictionaryPath; }
|
||||
const std::string& getDictionaryPath() const { return m_strDictionaryPath; }
|
||||
S32 getInstalledDictionaries(std::vector<std::string>& strDictionaryList) const;
|
||||
bool setCurrentDictionary(const std::string& strDictionary);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue