InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ISpellingService.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bernd Paradies
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __ISpellingService__
25 #define __ISpellingService__
26 
27 #include "IPMUnknown.h"
28 #include "K2Vector.h"
29 
30 //----------------------------------------------------------------------------------------
31 // Interface ISpellingService
32 //----------------------------------------------------------------------------------------
33 
34 class WideString;
36 
41 {
42 public:
46  enum SpellResult {
48  kCorrect = 0,
61 
66  } ;
67 
77  virtual SpellResult IsCorrect( const WideString &rWord, bool16 *bEndsWithPeriod ) = 0;
78 
87  virtual bool16 FindAlternatives( const WideString &rWord, WideStringList *pAlternatives ) = 0;
88 
99  virtual SpellResult Spell( const WideString &rWord, WideStringList *pAlternatives, bool16 *bEndsWithPeriod ) = 0;
100 
115  virtual SpellResult IsCorrectGrammar( const WideString &rParagraph, int32 *pWordStart, int32 *pWordLength, int32 startAt = 0 ) = 0;
116 
126  virtual bool16 Set( const PMString &rCoreFileName, const PMString &rLexFileName, const PMString &rPhonFileName, const PMString &rBaseLangLexFileName ) = 0;
127 
133  virtual bool16 SupportsCaseSensitive() = 0;
134 
135 
151  virtual SpellResult FindError( const WideString &rParagraph, int32 startAt, int32 *pErrorStart, int32 *pErrorLength, WideStringList* pAlternatives, bool searchBackwards=false) = 0;
152 
155  {
156  public:
158  int32 errorStart;
160  int32 errorLength;
163  };
173  virtual void FindAllErrors( const WideString &rParagraph, int32 startAt, std::vector<SpellingError> *pSpellingErrors ) = 0;
174 
175 };
176 
177 #endif