Ignore:
Timestamp:
May 9, 2015, 7:14:07 AM (9 years ago)
Author:
healthsevak
Message:

Did few modifications related to manual modifications by user inside RichEdit while spellcheck running

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/HealthSevak-CPRS/CPRS-Lib/Hans SpellCheck/skaSpellCheck.pas

    r1693 r1694  
    7070    FHighlightEdit: TEdit;
    7171    FbtnClose: TButton;
     72    FTxtBeforeManualEdit: String;
    7273    function AddCustomWord(aWord: String; isInternal: Boolean = False): Boolean;
    7374                                                            overload; virtual;
     
    8788    procedure ReplaceCurrentWordWith(const aNewWord: String);
    8889    function GetAboutThis: String;
    89     procedure SaveForUndo(const Ignoring: Boolean = False);
     90    procedure SaveForUndo(const Ignoring: Boolean=False);
    9091  public
    9192    constructor Create(AOwner: TComponent); overload; override;
     
    106107    procedure IgnoreOnce;
    107108    function IsMisspelled(const AWord: string): Boolean; dynamic;
     109    procedure ManualChangeStart;
     110    procedure ManualChangeDone;
    108111    function Open:Boolean; virtual;
    109112    function ReStart: Boolean; virtual;
     113
    110114    function Undo: Boolean;
    111115
     
    204208  full: String;
    205209  prefix: string;
    206   current: string;
    207210  suffix: string;
    208211begin
     
    588591end;
    589592
     593procedure TskaHunSpellChecker.ManualChangeDone;
     594begin
     595  if trim(FTxtBeforeManualEdit) = '' then
     596    exit;
     597  FUndoList.Add(FTxtBeforeManualEdit);
     598  ReStart;
     599end;
     600
     601procedure TskaHunSpellChecker.ManualChangeStart;
     602begin
     603  FTxtBeforeManualEdit := FSourceEdit.Text;
     604end;
     605
    590606function TskaHunSpellChecker.Open: Boolean;
    591607var
Note: See TracChangeset for help on using the changeset viewer.