27
27
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
31
#include "Foundation/NSSpellServer.h"
32
#include "Foundation/NSDictionary.h"
33
#include "Foundation/NSRunLoop.h"
34
#include "Foundation/NSFileManager.h"
35
#include "Foundation/NSUserDefaults.h"
36
#include "Foundation/NSPathUtilities.h"
37
#include "Foundation/NSConnection.h"
38
#include "Foundation/NSProcessInfo.h"
39
#include "Foundation/NSString.h"
40
#include "Foundation/NSException.h"
41
#include "Foundation/NSSet.h"
31
#define EXPOSE_NSSpellServer_IVARS 1
32
#import "Foundation/NSSpellServer.h"
33
#import "Foundation/NSDictionary.h"
34
#import "Foundation/NSRunLoop.h"
35
#import "Foundation/NSFileManager.h"
36
#import "Foundation/NSUserDefaults.h"
37
#import "Foundation/NSPathUtilities.h"
38
#import "Foundation/NSConnection.h"
39
#import "Foundation/NSProcessInfo.h"
40
#import "Foundation/NSException.h"
41
#import "Foundation/NSSet.h"
43
43
NSString *const NSGrammarRange = @"NSGrammarRange";
44
44
NSString *const NSGrammarUserDescription = @"NSGrammarUserDescription";
150
150
- (void) setDelegate: (id)anObject
152
152
/* FIXME - we should not retain the delegate ! */
153
IF_NO_GC(RETAIN(anObject);)
154
154
ASSIGN(_delegate, anObject);
301
301
result = [word isEqualToString: dictWord];
308
// Checking User Dictionaries
310
Checks to see if the word is in the user's dictionary. The user dictionary
311
is a set of words learned by the spell service for that particular user
312
combined with the set of ignored words in the current document.
314
- (BOOL) isWordInUserDictionaries: (NSString *)word
315
caseSensitive: (BOOL)flag
317
NSSet *userDict = [self _openUserDictionary: _currentLanguage];
322
result = [self _isWord: word
323
inDictionary: userDict
324
caseSensitive: flag];
305
327
if (result == NO && _ignoredWords)
331
// Checking User Dictionaries
333
Checks to see if the word is in the user's dictionary. The user dictionary
334
is a set of words learned by the spell service for that particular user.
336
- (BOOL) isWordInUserDictionaries: (NSString *)word
337
caseSensitive: (BOOL)flag
339
NSSet *userDict = [self _openUserDictionary: _currentLanguage];
344
result = [self _isWord: word
345
inDictionary: userDict
346
caseSensitive: flag];
423
424
- (NSRange) _findMisspelledWordInString: (NSString *)stringToCheck
424
425
language: (NSString *)language
425
426
ignoredWords: (NSArray *)ignoredWords
426
wordCount: (int *)wordCount
427
wordCount: (int32_t *)wordCount
427
428
countOnly: (BOOL)countOnly
429
430
NSRange r = NSMakeRange(0,0);