From 11282d6db4e8a6ba92576f0e7c532d760cb580a0 Mon Sep 17 00:00:00 2001 From: wlux Date: Mon, 22 Feb 2010 20:09:51 +0000 Subject: [PATCH] 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 --- ChangeLog | 7 +++++++ Source/NSSpellServer.m | 43 +++++++++++++++++++++--------------------- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 22e00d32f..1eb39b505 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-02-22 Wolfgang Lux + + * Source/NSSpellServer.m (-isWordInUserDictionaries:caseSensitive:): + Make sure 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. + 2010-02-22 Wolfgang Lux * Source/Additions/Unicode.m (GSToUnicode): Fix my own bug fix to diff --git a/Source/NSSpellServer.m b/Source/NSSpellServer.m index f7f19d199..f97ac9705 100644 --- a/Source/NSSpellServer.m +++ b/Source/NSSpellServer.m @@ -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; }