Now, I got a problem with tables. When an intendation is set (for a paragraph), and a table is inserted, everything works fine. But after saving and reloading the rtf file the intendation (only) of the table is "0". Why?
Here's my code for saving and reloading
Code: Select all
//Save
function TfrmEditor.GetRTF: String;
var
ss: TStringStream;
begin
ss:=TStringStream.Create('');
try
ss.Seek(0, soFromBeginning);
Editor.SaveRTFToStream(ss, false);
result:=ss.DataString;
finally
ss.Free;
end;
end;
//Read
procedure TfrmEditor.InsertRTF(rtf: string);
var
ss: TStringStream;
begin
ss:=TStringStream.Create('');
try
ss.Seek(0, soFromBeginning);
ss.WriteString(rtf);
ss.Seek(0, soFromBeginning);
Editor.LoadFromStream(ss, rvynaYes);
Editor.Format;
Editor.Modified:=False;
finally
ss.Free;
end;
end;
Many thanks!