![]() | InDesign SDK 20.5 |

Classes | |
| class | SpellingError |
Public Types | |
| enum | SpellResult { kCorrect = 0, kSpellError, kIncorrectWord, kUncapitalizedWord, kGrammarError, kRepeatedWord, kUncapitalizedStartOfSentence, kNoteAnchor, kDeletedText } |
Public Member Functions | |
| virtual SpellResult | IsCorrect (const WideString &rWord, bool16 *bEndsWithPeriod)=0 |
| virtual bool16 | FindAlternatives (const WideString &rWord, WideStringList *pAlternatives)=0 |
| virtual SpellResult | Spell (const WideString &rWord, WideStringList *pAlternatives, bool16 *bEndsWithPeriod)=0 |
| virtual SpellResult | IsCorrectGrammar (const WideString &rParagraph, int32 *pWordStart, int32 *pWordLength, int32 startAt=0)=0 |
| virtual bool16 | Set (const PMString &rCoreFileName, const PMString &rLexFileName, const PMString &rPhonFileName, const PMString &rBaseLangLexFileName)=0 |
| virtual bool16 | SupportsCaseSensitive ()=0 |
| virtual SpellResult | FindError (const WideString &rParagraph, int32 startAt, int32 *pErrorStart, int32 *pErrorLength, WideStringList *pAlternatives, bool searchBackwards=false)=0 |
| virtual void | FindAllErrors (const WideString &rParagraph, int32 startAt, std::vector< SpellingError > *pSpellingErrors)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Spelling results. Items after kSpellError are spelling errors. Items after kGrammarError are grammar errors.
| Enumerator | |
|---|---|
| kCorrect | Word is spelled correctly or no grammar error. |
| kSpellError | Denotes beginning of spelling errors. Not valid return value. |
| kIncorrectWord | Word is spelled incorrectly. |
| kUncapitalizedWord | Word is not correctly capitalized. |
| kGrammarError | Denotes beginning of grammar errors. Not valid return value. |
| kRepeatedWord | Word is repeated. |
| kUncapitalizedStartOfSentence | Sentence is not correctly capitalized. |
| kNoteAnchor | used to indicate that current index is a note. not returned by any routines in ISpellingService. Spelling walker is using |
| kDeletedText | used to indicate that current index is deleted text. not currently returned by any routines in ISpellingService. Spelling walker is using |
| pure virtual |
FindAllErrors() assumes that rParagraph is a paragraph that has to start with a capital.
| rParagraph | IN the paragraph to check. |
| startAt | IN the starting position for where to start reporting errors in the paragraph. |
| pSpellingErrors | OUT errors. vector is empty if no errors. |
Implemented in CHLSpelling.
| pure virtual |
Look for alternate spellings for word.
| rWord | IN to be checked word for alternative word. |
| pAlternatives | OUT the list of alternative words for this word. |
Implemented in CHLSpelling.
| pure virtual |
FindError() finds first error in rParagraph starting at startAt. assumes that rParagraph is a paragraph that has to start with a capital.
| rParagraph | IN the paragraph to check. |
| startAt | IN the starting position for where to start reporting errors in the paragraph. |
| pErrorStart | OUT the position where the error starts. |
| pErrorLength | OUT the length of the error. |
| pAlternatives | OUT the alternatives for this error. Can be nil. |
| searchBackwards | IN the direction of spell check. Spell check works in reverse direction if this bool is true. |
Implemented in CHLSpelling.
| pure virtual |
Checks whether the word is spelled correctly.
| rWord | IN to be checked word for spelling. |
| bEndsWithPeriod | OUT if the word ends with period (ex. Mr. would return kFalse). If kTrue the calling code will attempt to remove the trailing period. |
Implemented in CHLSpelling.
| pure virtual |
IsCorrectGrammar() assumes that rParagraph is a paragraph that has to start with a capital. Notice that IsCorrectGrammar() does not check the word at the position, use IsCorrect() and Spell() instead.
| rParagraph | IN the paragraph to check its grammar. |
| pWordStart | OUT the position where the word start. |
| pWordLength | OUT the length of the word. |
| StartAt | IN the starting position for the paragraph. |
Implemented in CHLSpelling.
| pure virtual |
Set up the spelling service.
| rCoreFileName | IN the core file name. |
| rLexFileName | IN the lex file name. |
| rPhonFileName | IN the phon file name. |
| rBaseLangLexFileName | IN the base language lex file name. |
Implemented in CHLSpelling.
| pure virtual |
Spell checking the word.
| rWord | IN to be checked word for spelling. |
| pAlternatives | OUT the list of alternative words for this word. |
| bEndsWithPeriod | OUT if the word ends with period. |
Implemented in CHLSpelling.
| pure virtual |
Spelling service supports case sensitive.
Implemented in CHLSpelling.