diff --git a/components/lazreport/source/lr_class.pas b/components/lazreport/source/lr_class.pas index 609a0b6da2..a103dbeb92 100644 --- a/components/lazreport/source/lr_class.pas +++ b/components/lazreport/source/lr_class.pas @@ -12413,7 +12413,7 @@ begin FontStyle := frGetFontStyle(Font.Style); FontColor := Font.Color; FontCharset := Font.Charset; - Alignment := Alignment; + PfrTextRec(p)^.Alignment := Alignment; end; end; end; diff --git a/components/lazreport/source/lr_e_htm.pas b/components/lazreport/source/lr_e_htm.pas index 87d8dc06fd..23da1f28c4 100644 --- a/components/lazreport/source/lr_e_htm.pas +++ b/components/lazreport/source/lr_e_htm.pas @@ -193,7 +193,7 @@ begin end; end; - s := ''+LineEnding; + s := '
'+LineEnding; s += ''; for j:=1 to xPos.Count do s += ''; @@ -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 += ' text-align: right;'; + taCenter: s += ' text-align: center;'; + else + s += ' text-align: left;'; + end; s += ' } '+LineEnding+LineEnding; end; cssStyles[Result].styleInfo:= s;