mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-23 05:32:04 +00:00
When checking whether a word is in the user dictionary, make sure that
the word is checked against the current list of ignored words regardless of whether the user (already) has a set of learned words in the current language. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29702 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9f114f8cee
commit
69c7b2d054
2 changed files with 29 additions and 21 deletions
|
@ -301,6 +301,28 @@ GSSpellServerName(NSString *vendor, NSString *language)
|
|||
result = [word isEqualToString: dictWord];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Checking User Dictionaries
|
||||
/**
|
||||
Checks to see if the word is in the user's dictionary. The user dictionary
|
||||
is a set of words learned by the spell service for that particular user
|
||||
combined with the set of ignored words in the current document.
|
||||
*/
|
||||
- (BOOL) isWordInUserDictionaries: (NSString *)word
|
||||
caseSensitive: (BOOL)flag
|
||||
{
|
||||
NSSet *userDict = [self _openUserDictionary: _currentLanguage];
|
||||
BOOL result = NO;
|
||||
|
||||
if (userDict)
|
||||
{
|
||||
result = [self _isWord: word
|
||||
inDictionary: userDict
|
||||
caseSensitive: flag];
|
||||
}
|
||||
|
||||
if (result == NO && _ignoredWords)
|
||||
{
|
||||
|
@ -324,27 +346,6 @@ GSSpellServerName(NSString *vendor, NSString *language)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Checking User Dictionaries
|
||||
/**
|
||||
Checks to see if the word is in the user's dictionary. The user dictionary
|
||||
is a set of words learned by the spell service for that particular user.
|
||||
*/
|
||||
- (BOOL) isWordInUserDictionaries: (NSString *)word
|
||||
caseSensitive: (BOOL)flag
|
||||
{
|
||||
NSSet *userDict = [self _openUserDictionary: _currentLanguage];
|
||||
BOOL result = NO;
|
||||
|
||||
if (userDict)
|
||||
{
|
||||
result = [self _isWord: word
|
||||
inDictionary: userDict
|
||||
caseSensitive: flag];
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue