tvplanit: Better variable name for page number in VpPrtPrv

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8538 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-10-12 11:27:47 +00:00
parent d061931e1f
commit 029833dbf2

View File

@ -476,7 +476,7 @@ var
lDate: TDateTime;
lContact, lTask: Integer;
lLastPage: Boolean;
i: Integer;
pageNum: Integer;
pageInfo: PVpPageInfo;
begin
if FPageInfo.Count > 0 then
@ -487,20 +487,22 @@ begin
lTask := 0;
lLastPage := false;
// The first page uses the start parameters
GetMem(pageInfo, SizeOf(TVpPageInfo));
pageInfo.Date := lDate;
pageInfo.Contact := lContact;
pageInfo.Task := lTask;
pageInfo.LastPage := lLastPage;
FPageInfo.Add(pageInfo);
pageNum := 0;
i := 0;
// The following pages must be rendered to determine the data for the PageInfo item.
while (not lLastPage) do begin
inc(i);
inc(pageNum);
FControlLink.Printer.RenderPage(
RenderBmp.Canvas,
Rect(0, 0, RenderBmp.Width, RenderBmp.Height),
i,
pageNum,
lDate,
FEndDate,
lContact,
@ -508,6 +510,9 @@ begin
lLastPage
);
// When lLastPage is true the preceeding rendering process yielded an empty
// page. In all other case store the data returned by Printer.RenderPage in
// the PageInfo list.
if not lLastPage then
begin
GetMem(pageInfo, SizeOf(TVpPageInfo));