diff options
author | Jean-Marc Levecque <jean-marc.levecque@jmlesite.fr> | 2011-12-29 23:42:44 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-02-13 15:46:19 +0200 |
commit | 58036ff804a98095cc063eac0a9fc7c434fa6c32 (patch) | |
tree | 14aa03e767f91e687d8dc00499ec445f43a7e1d9 /extras/contributed | |
parent | 25ec462c6313b59964f614b937117b41b19ddae1 (diff) | |
download | fpGUI-58036ff804a98095cc063eac0a9fc7c434fa6c32.tar.xz |
A duplicated image will now be loaded only once
Fix a bug in loading duplicated images + minor change in demo
Signed-off-by: Jean-Marc Levecque <jean-marc.levecque@jmlesite.fr>
Diffstat (limited to 'extras/contributed')
-rw-r--r-- | extras/contributed/report_tool/demo/u_demo.pas | 11 | ||||
-rw-r--r-- | extras/contributed/report_tool/reportengine/u_report.pas | 3 |
2 files changed, 6 insertions, 8 deletions
diff --git a/extras/contributed/report_tool/demo/u_demo.pas b/extras/contributed/report_tool/demo/u_demo.pas index 2807a641..377e92cd 100644 --- a/extras/contributed/report_tool/demo/u_demo.pas +++ b/extras/contributed/report_tool/demo/u_demo.pas @@ -1031,7 +1031,6 @@ end; procedure TF_Demo.PrintMultiSections(Preview: Boolean); var FtTitleS1,FtTitleS2,FtTitleS3,FtText,FtNum,FtNumS: Integer; - ColDefSect2: Integer; Cpt: Integer; begin with FReport do @@ -1062,15 +1061,14 @@ with FReport do // create a new section and define the margins Section(10,10,10,10,0,oLandscape); // create a default column for section2 which is landscape oriented - ColDefSect2:= Column(20,257); // write title on each page of the section - WriteHeader(cnCenter,lnEnd,'MULTI SECTION DOCUMENT',ColDefSect2,FtTitleS2); + WriteHeader(cnCenter,lnEnd,'MULTI SECTION DOCUMENT',ColDefaut,FtTitleS2); // write section number and total of sections on each page - NumSectionHeader(cnRight,lnEnd,'Section','of',True,False,ColDefSect2,FtNum); + NumSectionHeader(cnRight,lnEnd,'Section','of',True,False,ColDefaut,FtNum); // write page number for the section and total pages of the section on each page - NumPageSectionHeader(cnCenter,lnEnd,'Section page','of',True,True,ColDefSect2,FtNumS); + NumPageSectionHeader(cnCenter,lnEnd,'Section page','of',True,True,ColDefaut,FtNumS); // write page number and total of pages on each page - NumPageFooter(cnCenter,lnEnd,'Page','of',True,ColDefSect2,FtNum); + NumPageFooter(cnCenter,lnEnd,'Page','of',True,ColDefaut,FtNum); // create some new empty pages in the section for Cpt:= 1 to 2 do Page; @@ -1097,7 +1095,6 @@ end; procedure TF_Demo.PrintOutlines(Preview: Boolean); var FtTitleS1,FtTitleS2,FtTitleS3,FtText,FtNum,FtNumS: Integer; - ColDefSect2: Integer; Cpt: Integer; begin with FReport do diff --git a/extras/contributed/report_tool/reportengine/u_report.pas b/extras/contributed/report_tool/reportengine/u_report.pas index 10a7178f..9405ea99 100644 --- a/extras/contributed/report_tool/reportengine/u_report.pas +++ b/extras/contributed/report_tool/reportengine/u_report.pas @@ -2978,7 +2978,8 @@ then if (Copy(ImgFileName,Succ(Pos('.',ImgFileName)),3)= 'jpg') or (Copy(ImgFileName,Succ(Pos('.',ImgFileName)),4)= 'jpeg') then Image:= LoadImage_JPG(ImgFileName,Scale); - RefImage:= Images.Add(Image); + RefImage:= ImageNames.Add(IntToStr(Scale)+ImgFileName); + Images.Add(Image); end; PaintImage(Horiz,Verti,ColNum,RefImage,zPage); end |