mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-25 21:07:24 +01:00
LazReport, debug info
git-svn-id: trunk@36040 -
This commit is contained in:
parent
1b135c4d58
commit
ca4c12556c
@ -2692,7 +2692,7 @@ var
|
|||||||
size1 := -WCanvas.Font.Height + LineSpacing;
|
size1 := -WCanvas.Font.Height + LineSpacing;
|
||||||
maxWidth := dx - gapx - gapx;
|
maxWidth := dx - gapx - gapx;
|
||||||
{$IFDEF DebugLR}
|
{$IFDEF DebugLR}
|
||||||
DebugLn('OutMemo: Size=%d Size1=%d MaxWidth=%d dx=%d gapx=%d',[Size,Size1,MaxWidth,dx,gapx]);
|
DebugLn('OutMemo I: Size=%d Size1=%d MaxWidth=%d y=%d dx=%d gapy=%d gapx=%d',[Size,Size1,MaxWidth,y,dx,gapy,gapx]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
for i := 0 to Memo1.Count - 1 do
|
for i := 0 to Memo1.Count - 1 do
|
||||||
begin
|
begin
|
||||||
@ -2703,6 +2703,9 @@ var
|
|||||||
end;
|
end;
|
||||||
VHeight := size - y + gapy;
|
VHeight := size - y + gapy;
|
||||||
TextHeight := size1;
|
TextHeight := size1;
|
||||||
|
{$IFDEF DebugLR}
|
||||||
|
DebugLn('OutMemo E: Size=%d Size1=%d MaxWidth=%d y=%d dx=%d gapy=%d gapx=%d VHeight=%d',[Size,Size1,MaxWidth,y,dx,gapy,gapx,VHeight]);
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure OutMemo90;
|
procedure OutMemo90;
|
||||||
@ -3184,7 +3187,9 @@ begin
|
|||||||
BeginDraw(TempBmp.Canvas);
|
BeginDraw(TempBmp.Canvas);
|
||||||
frInterpretator.DoScript(Script);
|
frInterpretator.DoScript(Script);
|
||||||
if not Visible then Exit;
|
if not Visible then Exit;
|
||||||
|
{$IFDEF DebugLR}
|
||||||
|
DebugLnEnter('TfrMemoView.CalcHeight INIT',[]);
|
||||||
|
{$ENDIF}
|
||||||
CanExpandVar := True;
|
CanExpandVar := True;
|
||||||
Memo1.Assign(Memo);
|
Memo1.Assign(Memo);
|
||||||
s := Memo1.Text;
|
s := Memo1.Text;
|
||||||
@ -3211,10 +3216,16 @@ begin
|
|||||||
begin
|
begin
|
||||||
WrapMemo;
|
WrapMemo;
|
||||||
Result := VHeight;
|
Result := VHeight;
|
||||||
|
{$IFDEF DebugLR}
|
||||||
|
DebugLn('Memo1.Count<>0: VHeight=%d',[VHeight]);
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
Font.Assign(OldFont);
|
Font.Assign(OldFont);
|
||||||
OldFont.Free;
|
OldFont.Free;
|
||||||
fFillColor := OldFill;
|
fFillColor := OldFill;
|
||||||
|
{$IFDEF DebugLR}
|
||||||
|
DebugLnExit('TfrMemoView.CalcHeight DONE result=%d',[Result]);
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TfrMemoView.MinHeight: Integer;
|
function TfrMemoView.MinHeight: Integer;
|
||||||
@ -4734,7 +4745,7 @@ var
|
|||||||
|
|
||||||
function SubDoCalcHeight(CheckAll: Boolean): Integer;
|
function SubDoCalcHeight(CheckAll: Boolean): Integer;
|
||||||
var
|
var
|
||||||
i, h: Integer;
|
i, h, vh: Integer;
|
||||||
t: TfrView;
|
t: TfrView;
|
||||||
begin
|
begin
|
||||||
CurBand := Self;
|
CurBand := Self;
|
||||||
@ -4747,7 +4758,11 @@ var
|
|||||||
if t is TfrStretcheable then
|
if t is TfrStretcheable then
|
||||||
if (t.Parent = Self) or CheckAll then
|
if (t.Parent = Self) or CheckAll then
|
||||||
begin
|
begin
|
||||||
h := TfrStretcheable(t).CalcHeight + t.y;
|
vh := TfrStretcheable(t).CalcHeight;
|
||||||
|
h := vh + t.y;
|
||||||
|
{$IFDEF DebugLR}
|
||||||
|
DebugLn('View=%s t.y=%d t.dy=%d vh=%d h=%d result=%d',[ViewInfo(t),t.y,t.dy,vh,h,result]);
|
||||||
|
{$ENDIF}
|
||||||
if h > Result then
|
if h > Result then
|
||||||
Result := h;
|
Result := h;
|
||||||
if CheckAll then
|
if CheckAll then
|
||||||
@ -4756,6 +4771,9 @@ var
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF DebugLR}
|
||||||
|
DebugLnEnter('TfrBand.CalcHeight INIT CurDy=%d',[dy]);
|
||||||
|
{$ENDIF}
|
||||||
Result := dy;
|
Result := dy;
|
||||||
if HasCross and (Typ <> btPageFooter) then
|
if HasCross and (Typ <> btPageFooter) then
|
||||||
begin
|
begin
|
||||||
@ -4794,6 +4812,9 @@ begin
|
|||||||
else
|
else
|
||||||
Result := SubDoCalcHeight(False);
|
Result := SubDoCalcHeight(False);
|
||||||
CalculatedHeight := Result;
|
CalculatedHeight := Result;
|
||||||
|
{$IFDEF DebugLR}
|
||||||
|
DebugLnExit('TfrBand.CalcHeight DONE CalculatedHeight=%d',[CalculatedHeight]);
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrBand.StretchObjects(MaxHeight: Integer);
|
procedure TfrBand.StretchObjects(MaxHeight: Integer);
|
||||||
@ -4801,13 +4822,27 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
t: TfrView;
|
t: TfrView;
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF DebugLR}
|
||||||
|
DebugLnEnter('TfrBand.StretchObjects INIT MaxHeight=%d',[MaxHeight]);
|
||||||
|
{$ENDIF}
|
||||||
for i := 0 to Objects.Count - 1 do
|
for i := 0 to Objects.Count - 1 do
|
||||||
begin
|
begin
|
||||||
t :=TfrView(Objects[i]);
|
t :=TfrView(Objects[i]);
|
||||||
if (t is TfrStretcheable) or (t is TfrLineView) then
|
if (t is TfrStretcheable) or (t is TfrLineView) then
|
||||||
if (t.Flags and flStretched) <> 0 then
|
if (t.Flags and flStretched) <> 0 then
|
||||||
|
begin
|
||||||
|
{$IFDEF DebugLR}
|
||||||
|
DebugLn('i=%d View=%s Antes: y=%d dy=%d',[i,ViewInfo(t), t.y,t.dy]);
|
||||||
|
{$ENDIF}
|
||||||
t.dy := MaxHeight - t.y;
|
t.dy := MaxHeight - t.y;
|
||||||
|
{$IFDEF DebugLR}
|
||||||
|
DebugLn('i=%d View=%s After: y=%d dy=%d',[i,ViewInfo(t), t.y,t.dy]);
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
{$IFDEF DebugLR}
|
||||||
|
DebugLnExit('TfrBand.StretchObjects DONE');
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrBand.UnStretchObjects;
|
procedure TfrBand.UnStretchObjects;
|
||||||
@ -5340,6 +5375,9 @@ begin
|
|||||||
begin
|
begin
|
||||||
sh := CalculatedHeight;
|
sh := CalculatedHeight;
|
||||||
// sh := CalcHeight;
|
// sh := CalcHeight;
|
||||||
|
{$IFDEF DebugLR}
|
||||||
|
DebugLn('Height=%d CalculatedHeight=%d',[dy,sh]);
|
||||||
|
{$ENDIF}
|
||||||
if sh > dy then
|
if sh > dy then
|
||||||
StretchObjects(sh);
|
StretchObjects(sh);
|
||||||
maxdy := sh;
|
maxdy := sh;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user