Commit 542f8ce7 authored by hbono@chromium.org's avatar hbono@chromium.org

Reapply Justin's spellchecker patch.

This change reapplies Justin's spellchecker change <http://codereview.chromium.org/326012/>, which is not applied to the current trunk somehow.

BUG=20469
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10823011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148726 0039d316-1c4b-4281-b951-d872f2087c98
parent 5bdb65c9
...@@ -350,7 +350,7 @@ void SpellCheck::InitializeHunspell() { ...@@ -350,7 +350,7 @@ void SpellCheck::InitializeHunspell() {
} }
void SpellCheck::AddWordToHunspell(const std::string& word) { void SpellCheck::AddWordToHunspell(const std::string& word) {
if (!word.empty() && word.length() < MAXWORDUTF8LEN) if (!word.empty() && word.length() < MAXWORDLEN)
hunspell_->add(word.c_str()); hunspell_->add(word.c_str());
} }
...@@ -386,7 +386,7 @@ bool SpellCheck::CheckSpelling(const string16& word_to_check, int tag) { ...@@ -386,7 +386,7 @@ bool SpellCheck::CheckSpelling(const string16& word_to_check, int tag) {
} else { } else {
std::string word_to_check_utf8(UTF16ToUTF8(word_to_check)); std::string word_to_check_utf8(UTF16ToUTF8(word_to_check));
// Hunspell shouldn't let us exceed its max, but check just in case // Hunspell shouldn't let us exceed its max, but check just in case
if (word_to_check_utf8.length() < MAXWORDUTF8LEN) { if (word_to_check_utf8.length() < MAXWORDLEN) {
if (hunspell_.get()) { if (hunspell_.get()) {
// |hunspell_->spell| returns 0 if the word is spelled correctly and // |hunspell_->spell| returns 0 if the word is spelled correctly and
// non-zero otherwsie. // non-zero otherwsie.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment