Repair Alignment settings in export filter, and use alignment information in HTML export filter.

This commit is contained in:
Jacek Rydzewski 2022-01-21 15:12:02 +00:00
parent 73fd319f37
commit c1ca9a357d
2 changed files with 9 additions and 3 deletions

View File

@ -12413,7 +12413,7 @@ begin
FontStyle := frGetFontStyle(Font.Style);
FontColor := Font.Color;
FontCharset := Font.Charset;
Alignment := Alignment;
PfrTextRec(p)^.Alignment := Alignment;
end;
end;
end;

View File

@ -193,7 +193,7 @@ begin
end;
end;
s := '<table align="center" width="90%">'+LineEnding;
s := '<table align="center" width="90%" cellspacing="0" style="border-collapse: collapse;">'+LineEnding;
s += '<tr>';
for j:=1 to xPos.Count do
s += '<td></td>';
@ -301,7 +301,7 @@ begin
Result := p^.FontName;
Result += LowerCase(IntToHex(p^.FontSize, 2) + IntToHex(p^.FontStyle, 2) +
IntToHex(p^.FontColor, 8) + IntToHex(p^.FillColor, 8) +
IntToHex(Integer(p^.Borders), 2));
IntToHex(Integer(p^.Borders), 2) + IntToHex(Ord(p^.Alignment), 2));
for x:=1 to Length(Result) do
if not (Result[x] in ['$', '%', '&', '0'..'9', '@'..'z']) then
Result[x]:= '_';
@ -371,6 +371,12 @@ begin
s += Format(' border-width: %dpx;%s', [p^.BorderWidth,LineEnding]);
s += Format(' border-color: %s;%s', [ColorToHex(p^.BorderColor),LineEnding]);
end;
case p^.Alignment of
taRightJustify: s += ' align="right";';
taCenter: s += ' align="center";';
else
s += ' align="left";';
end;
s += ' } '+LineEnding+LineEnding;
end;
cssStyles[Result].styleInfo:= s;