mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 12:19:14 +02:00
LazReport, fix reports with stretched objects on stretched bands which span more than two pages, issues #23490, #18719
git-svn-id: trunk@39565 -
This commit is contained in:
parent
034537a23f
commit
d9f9355bcc
@ -3084,7 +3084,7 @@ var
|
|||||||
DebugLn('OutLine Cury=%d + th=%d = %d < dr.bottom=%d == %s',[cury,th,cury+th,dr.bottom,dbgs(cury+th<dr.bottom)]);
|
DebugLn('OutLine Cury=%d + th=%d = %d < dr.bottom=%d == %s',[cury,th,cury+th,dr.bottom,dbgs(cury+th<dr.bottom)]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// TODO: needs to check that th is calculated precisely
|
// TODO: needs to check that th is calculated precisely
|
||||||
if not Streaming {and (cury + th <= DR.Bottom)} then
|
if not Streaming and (cury + th <= DR.Bottom) then
|
||||||
begin
|
begin
|
||||||
n := Length(St);
|
n := Length(St);
|
||||||
w := Ord(St[n - 1]) * 256 + Ord(St[n]);
|
w := Ord(St[n - 1]) * 256 + Ord(St[n]);
|
||||||
@ -3506,7 +3506,7 @@ begin
|
|||||||
frInterpretator.DoScript(Script);
|
frInterpretator.DoScript(Script);
|
||||||
if not Visible then Exit;
|
if not Visible then Exit;
|
||||||
{$IFDEF DebugLR}
|
{$IFDEF DebugLR}
|
||||||
DebugLnEnter('TfrMemoView.CalcHeight INIT',[]);
|
DebugLnEnter('TfrMemoView.CalcHeight %s INIT',[ViewInfo(Self)]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
CanExpandVar := True;
|
CanExpandVar := True;
|
||||||
Memo1.Assign(Memo);
|
Memo1.Assign(Memo);
|
||||||
@ -5449,7 +5449,7 @@ begin
|
|||||||
Result := False;
|
Result := False;
|
||||||
with Parent do begin
|
with Parent do begin
|
||||||
{$IFDEF DebugLR}
|
{$IFDEF DebugLR}
|
||||||
DebugLn('say+dy+ady=%d CurBottomY=%d',[ay+Bands[btColumnFooter].dy+ady,CurBottomY]);
|
DebugLn('ay+dy+ady=%d CurBottomY=%d',[ay+Bands[btColumnFooter].dy+ady,CurBottomY]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if not RowsLayout then begin
|
if not RowsLayout then begin
|
||||||
if ay + Bands[btColumnFooter].dy + ady > CurBottomY then
|
if ay + Bands[btColumnFooter].dy + ady > CurBottomY then
|
||||||
@ -5546,8 +5546,11 @@ begin
|
|||||||
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.Selected then
|
if not t.Selected then
|
||||||
|
continue;
|
||||||
|
|
||||||
if (t.y >= 0) and (t.y < newdy) then
|
if (t.y >= 0) and (t.y < newdy) then
|
||||||
|
begin
|
||||||
if (t.y + t.dy < newdy) then
|
if (t.y + t.dy < newdy) then
|
||||||
begin
|
begin
|
||||||
if aMaxy < t.y + t.dy then
|
if aMaxy < t.y + t.dy then
|
||||||
@ -5572,10 +5575,25 @@ begin
|
|||||||
else
|
else
|
||||||
t.y := newdy
|
t.y := newdy
|
||||||
end
|
end
|
||||||
|
end
|
||||||
else if t is TfrStretcheable then
|
else if t is TfrStretcheable then
|
||||||
|
begin
|
||||||
if (t.y < 0) and (t.y + t.dy >= 0) then
|
if (t.y < 0) and (t.y + t.dy >= 0) then
|
||||||
if t.y + t.dy < dy then
|
begin
|
||||||
|
// drawing the remaining part of some object
|
||||||
|
if t.y + t.dy > newdy then
|
||||||
begin
|
begin
|
||||||
|
// the rest of "t" is too large to fit in the rest of the page
|
||||||
|
oldy := t.y; olddy := t.dy;
|
||||||
|
t.y := 0; t.dy := newdy;
|
||||||
|
Inc(TfrStretcheable(t).ActualHeight, t.dy);
|
||||||
|
TfrStretcheable(t).DrawMode := drPart;
|
||||||
|
DrawObject(t);
|
||||||
|
t.y := oldy; t.dy := olddy;
|
||||||
|
t.Selected := true;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
// the rest of "t" fits within the remaining space on page
|
||||||
oldy := t.y; olddy := t.dy;
|
oldy := t.y; olddy := t.dy;
|
||||||
t.dy := t.y + t.dy;
|
t.dy := t.y + t.dy;
|
||||||
t.y := 0;
|
t.y := 0;
|
||||||
@ -5591,17 +5609,10 @@ begin
|
|||||||
t.y := oldy; t.dy := olddy;
|
t.y := oldy; t.dy := olddy;
|
||||||
CorrY(t, TfrStretcheable(t).ActualHeight - t.dy);
|
CorrY(t, TfrStretcheable(t).ActualHeight - t.dy);
|
||||||
t.Selected := False;
|
t.Selected := False;
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
oldy := t.y; olddy := t.dy;
|
|
||||||
t.y := 0; t.dy := newdy;
|
|
||||||
Inc(TfrStretcheable(t).ActualHeight, t.dy);
|
|
||||||
TfrStretcheable(t).DrawMode := drPart;
|
|
||||||
DrawObject(t);
|
|
||||||
t.y := oldy; t.dy := olddy;
|
|
||||||
t.Selected := False;
|
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
Flag := False;
|
Flag := False;
|
||||||
for i := 0 to Objects.Count - 1 do
|
for i := 0 to Objects.Count - 1 do
|
||||||
|
Loading…
Reference in New Issue
Block a user