RTF import/export and trrh / absolute table row height
Posted: Fri Jan 08, 2021 8:06 am
In RTF, the row height of a table is described via the 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:
is saved as
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
\trrh
Code: Select all
\trowd\trql\ltrrow\trrh-283\trpaddft3\trpaddt0 .....
Code: Select all
\trowd\trgaph0\trleft0\trrh285\trpaddl0 ....
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];