WPCubed Product Support

Addict and WPTools

Hi Julian,

a few month ago we did this :

procedure TWPTAddictInstance.WPOnSpellCheckWord(Sender: TObject; var Word: WideString;
       var Res: TSpellCheckResult; var Hyphen: TSpellCheckHyphen;
           par : TParagraph;posinpar : Integer);
begin
  //"Dies ist ein Test.Noch ein Satz" -> Hier fehlt das Blank nach dem dot"
  if (Assigned(FAddictSpell)) and FLiveSpell then
  begin
    if par.IsPunctation(posinpar-1) then  
      begin
        res := [spMisSpelled];
        exit;
      end;
  end;
  //new
...

now this "1.2" "1,3" is also misspelled....

Can you please tell me what to do?

Thanks

Patrick

#1 ♥ 0
2.9k Views 2 users read 1 min
support

Hi,

ideally posinpar is the start of the word.

I would try

i := posinpar ;
while not par.IsWordDelimiter(i) do
begin
  if par.IsPunctation(i) then 
  begin 
        res := [spMisSpelled]; 
        exit; 
      end; 
  inc(i);
end;

Julian

#2 ♥ 0
This category is archived. No new posts are possible.