OnValidationEvent Method of the ITextValidatorEvents Interface
This method is implemented on the client-side. It is called by ABBYY FineReader Engine when Text Validator finds an error during spell checking. The method allows the client to select the operation which should be performed on the error: ignore, replace, or add uncertainly recognized word to the dictionary.
The method is called before displaying an error in Text Validator. If you select any reaction except TVC_None in this method, the error will not be displayed in Text Validator.
You can receive the information on the errors which have been found using the ITextValidator::ValidatorError property.
Syntax
C++
HRESULT OnValidationEvent( TextValidatorCommandEnum* Reaction, ISpellWord** Replacement );
C#
void OnValidationEvent( ref TextValidatorCommandEnum Reaction, ref ISpellWord Replacement );
Visual Basic .NET
Sub OnValidationEvent( _ ByRef Reaction As TextValidatorCommandEnum, _ ByRef Replacement As ISpellWord _ )
Parameters
- Reaction
- [out] This variable of the TextValidatorCommandEnum type specifies the command which should be applied to the word. If you select any reaction except TVC_None in this method, the error will not be displayed in Text Validator.
- Replacement
- [out] Represents a replacement word as a SpellWord object. This parameter is used, if the Reaction parameter is TVC_Replace or TVC_ReplaceAll.
Return values
This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.
Remarks
The client implementation of this method must assure that all exceptions thrown inside the method are caught and handled and no exceptions are propagated outside the method. Propagation of an exception outside the method may lead to unpredictable results (such as program termination).
See also
17.09.2024 15:14:40