LazReport, fix text layout in multilined memos, patch with changes from Andrey Gusev, issue #10646

git-svn-id: trunk@13846 -
This commit is contained in:
jesus 2008-01-23 21:41:32 +00:00
parent ac48f8d690
commit 6801187bf3
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
The following people contributed to LazReport :
Aleksey Lagunov (ru)
Andrey Gusev (ru)
Christian Ulrich (de)
German Basisty (ar)
Javier Villarroya (es)

View File

@ -2287,7 +2287,7 @@ var
begin
AssignFont(Canvas);
Ts := Canvas.TextStyle;
Ts.Layout :=Layout;
Ts.Layout :=tlTop;
Ts.Alignment :=self.Alignment;
Ts.Wordbreak :=false;
Ts.SingleLine:=True;
@ -2306,7 +2306,7 @@ var
DebugLn('Rescal font ',IntToStr(Canvas.Font.Size));
{$ENDIF}
end;
th := Canvas.TextHeight('H')+Round(LineSpacing * ScaleY);
th := -Canvas.Font.Height+Round(LineSpacing * ScaleY);
{$IFDEF DebugLR}
DebugLn('Th=',Inttostr(Th),' Canvas.TextHeight(H)=',InttoStr(Canvas.TextHeight('H')));
Debugln('2 Canvas.Font.Size=',InttoStr(Canvas.Font.Size),' TextWidth=',InttoStr(Canvas.TextWidth(St)));
@ -2364,7 +2364,7 @@ var
begin {OutMemo}
cury := y + gapy;
th := Canvas.TextHeight('H')+Round(LineSpacing * ScaleY);
th := -Canvas.Font.Height+Round(LineSpacing * ScaleY);
{$IFDEF DebugLR}
DebugLn('Th=',IntToStr(Th),' Canvas.TextHeight(H)=',InttoStr(Canvas.TextHeight('H')), 'DR=',dbgs(DR));
{$ENDIF}