mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 13:39:30 +02:00
LazReport, fixes TfrTextExportFilter text output alignment
git-svn-id: trunk@23170 -
This commit is contained in:
parent
6ae9c66c27
commit
c160d3ebf6
@ -52,6 +52,7 @@ type
|
||||
procedure AppendLine(const s: UTF8String);
|
||||
procedure InsertLine(const s: UTF8String; position: Integer);
|
||||
function GetviewText(View:TfrView): string; override;
|
||||
procedure CalcXCoords(var x,w: integer); override;
|
||||
public
|
||||
constructor Create(AStream: TStream); override;
|
||||
destructor Destroy; override;
|
||||
@ -415,6 +416,12 @@ begin
|
||||
result := '';
|
||||
end;
|
||||
|
||||
procedure TfrHTMExportFilter.CalcXCoords(var x, w: integer);
|
||||
begin
|
||||
x := round(x/UsedFont);
|
||||
w := round(w/UsedFont);
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrHTMExportFilter.OnEndDoc;
|
||||
var
|
||||
|
@ -15,8 +15,8 @@ interface
|
||||
{$I lr_vers.inc}
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Graphics, GraphType, Controls, Forms, Dialogs,
|
||||
LCLType, LCLIntf, LR_Class;
|
||||
Classes, SysUtils, LCLProc, LResources, Graphics, GraphType, Controls, Forms,
|
||||
Dialogs, LCLType, LCLIntf, LR_Class;
|
||||
|
||||
type
|
||||
|
||||
@ -83,8 +83,6 @@ end;
|
||||
|
||||
procedure TfrTextExportFilter.CalcXCoords(var x, w: integer);
|
||||
begin
|
||||
x := round(x/UsedFont);
|
||||
w := round(w/UsedFont);
|
||||
end;
|
||||
|
||||
function TfrTextExportFilter.CheckView(View: TfrView): boolean;
|
||||
@ -140,7 +138,7 @@ begin
|
||||
begin
|
||||
x := Round(p^.X / 6.5);
|
||||
s := s + Dup(x - tc1) + p^.Text;
|
||||
tc1:= x + Length(p^.Text);
|
||||
tc1:= x + UTF8Length(p^.Text);
|
||||
p := p^.Next;
|
||||
end;
|
||||
s := s + LineEnding;
|
||||
|
Loading…
Reference in New Issue
Block a user