From b614cbb088107996d8e56d30cdecefca9f14d5b6 Mon Sep 17 00:00:00 2001 From: "mhm@chromium.org" Date: Mon, 3 Aug 2009 18:13:58 +0000 Subject: Reverting hunspell upgrade 22263,22257,22252,22243. Causing many valgrind warnings. TBR: brettw, dank, jshin Review URL: http://codereview.chromium.org/159797 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22287 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/spellcheck_unittest.cc | 6 +++--- chrome/browser/spellchecker.cc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'chrome/browser') diff --git a/chrome/browser/spellcheck_unittest.cc b/chrome/browser/spellcheck_unittest.cc index 1d51b5b..86eadff 100644 --- a/chrome/browser/spellcheck_unittest.cc +++ b/chrome/browser/spellcheck_unittest.cc @@ -607,11 +607,11 @@ TEST_F(SpellCheckTest, SpellCheckSuggestions_EN_US) { {L"wate", false, 0, 0, L"water"}, {L"wate", false, 0, 0, L"waste"}, {L"wate", false, 0, 0, L"sate"}, - {L"wate", false, 0, 0, L"ate"}, + {L"wate", false, 0, 0, L"rate"}, {L"jum", false, 0, 0, L"jump"}, - {L"jum", false, 0, 0, L"hum"}, + {L"jum", false, 0, 0, L"rum"}, {L"jum", false, 0, 0, L"sum"}, - {L"jum", false, 0, 0, L"um"}, + {L"jum", false, 0, 0, L"tum"}, #endif //!OS_MACOSX // TODO (Sidchat): add many more examples. }; diff --git a/chrome/browser/spellchecker.cc b/chrome/browser/spellchecker.cc index f7635b6..f3bb9d3 100644 --- a/chrome/browser/spellchecker.cc +++ b/chrome/browser/spellchecker.cc @@ -613,7 +613,7 @@ void SpellChecker::AddCustomWordsToHunspell() { if (hunspell_.get()) { for (std::vector::iterator it = list_of_words.begin(); it != list_of_words.end(); ++it) { - hunspell_->add(it->c_str()); + hunspell_->put_word(it->c_str()); } } } @@ -744,7 +744,7 @@ void SpellChecker::AddWord(const std::wstring& word) { // Add the word to hunspell. std::string word_to_add = WideToUTF8(word); if (!word_to_add.empty()) - hunspell_->add(word_to_add.c_str()); + hunspell_->put_word(word_to_add.c_str()); // Now add the word to the custom dictionary file. Task* write_word_task = -- cgit v1.1