Widths of cells and borders are saved correctly.
By default, for auto-width tables, the component saves a table width equal to the width of this table in TRichView window, and it may be not exactly precise.
To save such tables as auto-width tables in RTF, assign the global variable from RVTable.pas.
Code: Select all
RichViewTableDefaultRTFAutofit := True
The part "if BestWidth = 0 then" must be:
Code: Select all
function GetTableWidthStr: TRVAnsiString;
begin
if BestWidth = 0 then
begin
if RichViewTableDefaultRTFAutofit or (rvtoRTFAllowAutofit in Options) then
Result := '<w:tblW w:w="0" w:type="auto"/>'
else
Result := RVFormatA('<w:tblW w:w="%d" w:type="dxa"/>',
[RV_UnitsToTwips(GetWidth(ARVStyle, GetPixelsPerInch, 1), rvuPixels, GetPixelsPerInch)])
end