Table's intend is lost after reloading the rtf

General TRichView support forum. Please post your questions here
Post Reply
Roliat
Posts: 21
Joined: Wed Jul 27, 2011 4:12 pm

Table's intend is lost after reloading the rtf

Post by Roliat »

Hello - it's me again ;)

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;
Please help me. I use TRichView 11.05

Many thanks!
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

It's because you use old version of TRichView
Roliat
Posts: 21
Joined: Wed Jul 27, 2011 4:12 pm

Post by Roliat »

Hm ... is there any way to fix this in the source or is an update *really* needed?

Thanks
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Unfortunately, it requires changes in several places of code, both in RTF saving and writing. I cannot say what changes are needed - we cannot support too old versions.
Send me a private message with details of your order (for example, what email was used), and I'll explain how to get a new version.
Post Reply