I started experimenting and a problem appeared:
You notice that the underline is out of sync on first word (-1).
This code was used (in ActionTest):
Code: Select all
var s: string;
i, p: Integer;
begin
for i := 0 to SRichViewEdit1.RichViewEdit.ItemCount - 1 do
begin
s := SRichViewEdit1.RichViewEdit.GetItemTextA(i);
p := Pos(', supra', s);
if p = 1 then
SRichViewEdit1.RichViewEdit.GetItem(i).AddMisspelling(3, 5);
end;
SRichViewEdit1.RichViewEdit.Invalidate;
end;
If I deactivate "Justify" or use an older version of ScaleRichView all is fine.
The rtf that I used is so short that I will add it here:
Code: Select all
{\rtf1\ansi\ansicpg0\uc1\deff0\deflang0\deflangfe0\paperw12240\paperh15480\margl1800\margr1800\margt1440\margb1440\headery720\footery720\viewscale100\viewzk0
{\fonttbl{\f0\fnil Arial;}{\f1\fnil\fcharset0 Times New Roman;}{\f2\fnil\fcharset238 Times New Roman;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
{\header
\pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f0\fs20 \par}{\footer
\pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f0\fs20 \par}
\pard\fi0\li0\qj\ri0\sb0\sa0\itap0 \plain \f1\fs24 I\plain \f2\fs24 mediat ce \u238 \'ee\u351 \'bai lu\u259 \'e3 la bord pasagera, elicopterul se preg\u259 \'e3ti s\u259 \'e3 p\u259 \'e3r\u259 \'e3seasc\u259 \'e3 platforma de pe zg\u226 \'e2rie-nori. Rafalele puternice \u238 \'eengreunau \u238 \'eens\u259 \'e3 decolarea \u351 \'bai, din cauza unei erori de manevrare, o parte a dispozitivului de aterizare se prinse \u238 \'een ancorele care fixau antena de satelit de pe cl\u259 \'e3dire. Deodat\u259 \'e3, supra\u238 \'eentins, cablul p\u226 \'e2r\u226 \'e2i \u351 \'bai se rupse cu un zv\u226 \'e2cnet, \u238 \'eencurc\u226 \'e2ndu-se \u238 \'eentre palele rapide ale elicei.
\par
\par Rafalele puternice \u238 \'eengreunau \u238 \'eens\u259 \'e3 decolarea \u351 \'bai, din cauza unei erori de manevrare, o parte a dispozitivului de aterizare se prinse \u238 \'een ancorele care fixau antena de satelit de pe cl\u259 \'e3dire. Deodat\u259 \'e3, supra\u238 \'eentins, cablul p\u226 \'e2r\u226 \'e2i \u351 \'bai se rupse cu un zv\u226 \'e2cnet\par}