back out patch for 453813, closed tree

This commit is contained in:
Josh Aas 2008-09-18 18:00:18 -04:00
parent 4ede8df5af
commit 01263fd939

View File

@ -103,16 +103,8 @@ NS_IMETHODIMP mozOSXSpell::GetLanguage(PRUnichar **aLanguage)
NS_ENSURE_ARG_POINTER(aLanguage);
if (!mLanguage.Length()) {
@try {
NSString* lang = [[NSSpellChecker sharedSpellChecker] language];
*aLanguage = [lang createNewUnicodeBuffer];
}
@catch (id exception) {
// If we get here, the spelling system on the user's machine is almost
// certainly damaged; do what the rest of the OS does, and silently
// ignore it.
*aLanguage = NULL;
}
NSString* lang = [[NSSpellChecker sharedSpellChecker] language];
*aLanguage = [lang createNewUnicodeBuffer];
mLanguage.Assign(*aLanguage);
}
else
@ -226,17 +218,7 @@ NS_IMETHODIMP mozOSXSpell::Check(const PRUnichar *aWord, PRBool *aResult)
*aResult = PR_FALSE;
NSString* wordStr = [NSString stringWithPRUnichars:aWord];
NSRange misspelledRange;
@try {
misspelledRange = [[NSSpellChecker sharedSpellChecker] checkSpellingOfString:wordStr startingAt:0];
}
@catch (id exception) {
// Silently return true; if something is seriously wrong with the
// spelling system on a user's machine, the best thing to do is
// to just treat everything as correct.
*aResult = PR_TRUE;
return NS_OK;
}
NSRange misspelledRange = [[NSSpellChecker sharedSpellChecker] checkSpellingOfString:wordStr startingAt:0];
if (misspelledRange.location != NSNotFound && mPersonalDictionary)
mPersonalDictionary->Check(aWord, mLanguage.get(), aResult);
else