RTF import/export and trrh / absolute table row height

General TRichView support forum. Please post your questions here
Post Reply
bastian.turcs
Posts: 3
Joined: Fri Nov 13, 2020 8:08 am

RTF import/export and trrh / absolute table row height

Post by bastian.turcs »

In RTF, the row height of a table is described via the

Code: Select all

\trrh
control word, followed by a number. If the number is negative, the table row height is absolute, otherwise the row height at least the specified value or increased if the text of the row requires more space. Unfortunately, if I do a load/save from rtf, absolute row heights are not preserved. Example:

Code: Select all

\trowd\trql\ltrrow\trrh-283\trpaddft3\trpaddt0 .....
is saved as

Code: Select all

\trowd\trgaph0\trleft0\trrh285\trpaddl0 ....
Can I change that behaviour so that absolute row heights are preserved? I did not find any published properties related to row height in the TRVTableRow class.

I'm using a purchased TRichView 16.10.4 and the following code to initilialize my view:

Code: Select all

  ADoc := TRichViewEdit.Create(Self);
  ADoc.Style := TRVStyle.Create(ADoc);
  ADoc.Parent := Self;
  ADoc.AnimationMode := rvaniDisabled;
  ADoc.DoInPaletteMode := rvpaCreateCopies;
  ADoc.RTFReadProperties.TextStyleMode := rvrsAddIfNeeded;
  ADoc.RTFReadProperties.ParaStyleMode := rvrsAddIfNeeded;
  ADoc.RTFReadProperties.ReadDocParameters := true;
  ADoc.RTFReadProperties.SkipHiddenText := false;

  ADoc.RVFOptions := [rvfoSavePicturesBody, rvfoSaveControlsBody, rvfoSaveBinary, rvfoSaveTextStyles,
    rvfoSaveParaStyles, rvfoSaveDocProperties, rvfoLoadDocProperties, rvfoSaveDocObjects, rvfoLoadDocObjects];

  ADoc.RTFOptions := [rvrtfSaveEMFAsWMF, rvrtfDuplicateUnicode, rvrtfSaveJpegAsJpeg, rvrtfSaveDocParameters,
    rvrtfSaveHeaderFooter];
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: RTF import/export and trrh / absolute table row height

Post by Sergey Tkachenko »

TRichView does not support this property on per-row basis.
This option can only be set for the whole table (rvtoIgnoreContentHeight in table.Options) and cannot be imported from RTF.
Post Reply