View Issue Details

IDProjectCategoryView StatusLast Update
0033708FPCPatchpublic2018-05-08 09:28
ReporterGraeme GeldenhuysAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSFreeBSDOS Version10.3
Product Version3.1.1Product Build 
Target Version3.2.0Fixed in Version3.1.1 
Summary0033708: [patches] A set of fpReport patches
DescriptionI've included a set of three patches.

* The first one addresses the issue of bug report 33356. Memo text that
  appears outside the bounds of the memo.
* The 2nd one fixes some spelling mistakes.
* The 3rd one gives some compiler hints.
TagsNo tags attached.
Fixed in Revision38948
FPCOldBugId
FPCTarget
Attached Files
  • 0001-fpReport-prevent-memo-text-from-overflowing-in-smDon.patch (8,138 bytes)
    From bbe88c8db6210f36ff038bc25e385b22d5c54549 Mon Sep 17 00:00:00 2001
    From: Graeme Geldenhuys <graemeg@gmail.com>
    Date: Mon, 7 May 2018 23:36:34 +0100
    Subject: [PATCH 1/3] fpReport: prevent memo text from overflowing in
     smDontStretch is specified.
    
    A new property, CullThreshold, was also introduced to handle the last
    line of text that could partially overflow.
    
    diff --git a/packages/fcl-report/src/fpreport.pp b/packages/fcl-report/src/fpreport.pp
    index 088d4e2bcb..545ee8843a 100644
    --- a/packages/fcl-report/src/fpreport.pp
    +++ b/packages/fcl-report/src/fpreport.pp
    @@ -48,6 +48,7 @@ interface
       TFPReportUnits  = single; // Units are defined as Millimetres
       TFPReportScale  = single;
       TFPReportColor  = type UInt32;
    +  TFPReportCullThreshold = 1..100;
     
       // A position in report units
       TFPReportPoint = record
    @@ -1877,10 +1878,10 @@   TExprNodeInfoRec = record
         ExprNode: TFPExprNode;
       end;
     
    -  { TFPReportCustomMemo }
     
       TFPReportCustomMemo = class(TFPReportElement)
       private
    +    FCullThreshold: TFPReportCullThreshold;
         FText: TFPReportString;
         FIsExpr: boolean;
         FTextAlignment: TFPReportTextAlignment;
    @@ -1905,6 +1906,7 @@   TFPReportCustomMemo = class(TFPReportElement)
         FUseParentFont: Boolean;
         function    GetParentFont: TFPReportFont;
         procedure   HandleFontChange(Sender: TObject);
    +    procedure   SetCullThreshold(AValue: TFPReportCullThreshold);
         procedure   SetText(AValue: TFPReportString);
         procedure   SetUseParentFont(AValue: Boolean);
         procedure   WrapText(const AText: String; var ALines: TStrings; const ALineWidth: TFPReportUnits; out AHeight: TFPReportUnits);
    @@ -1929,9 +1931,10 @@   TFPReportCustomMemo = class(TFPReportElement)
         procedure   AddMultipleTextBlocks(const AText: string);
         function    IsExprAtArrayPos(const APos: integer): Boolean;
         procedure   SetFont(const AValue: TFPReportFont);
    +    procedure   CullTextOutOfBounds;
       protected
    -    procedure ReassignParentFont;
    -    procedure ParentFontChanged; override;
    +    procedure   ReassignParentFont;
    +    procedure   ParentFontChanged; override;
         function    CreateTextAlignment: TFPReportTextAlignment; virtual;
         function    GetExpr: TFPExpressionParser; virtual;
         procedure   RecalcLayout; override;
    @@ -1939,7 +1942,7 @@   TFPReportCustomMemo = class(TFPReportElement)
         procedure   ExpandExpressions;
         procedure   UpdateAggregates;
         function    PrepareObject(aRTParent: TFPReportElement): TFPReportElement; override;
    -    Procedure SetParent(const AValue: TFPReportElement); override;
    +    procedure   SetParent(const AValue: TFPReportElement); override;
         property    Text: TFPReportString read FText write SetText;
         property    Font: TFPReportFont read FFont write SetFont;
         property    TextAlignment: TFPReportTextAlignment read FTextAlignment write SetTextAlignment;
    @@ -1951,6 +1954,8 @@   TFPReportCustomMemo = class(TFPReportElement)
         { Used by Runtime Memos - this is a reference back to the original design memo. }
         property    Original: TFPReportCustomMemo read FOriginal write FOriginal;
         property    UseParentFont: Boolean read FUseParentFont write SetUseParentFont default True;
    +    { % of line height that should be visible, otherwise it's culled if StretchMode = smDontStretch. Valid range is 1-100% and default is 75%}
    +    property    CullThreshold: TFPReportCullThreshold read FCullThreshold write SetCullThreshold default 75;
       protected
         // *****************************
         //   This block is made Protected simply for Unit Testing purposes.
    @@ -1987,6 +1992,7 @@   TFPReportCustomMemo = class(TFPReportElement)
     
       TFPReportMemo = class(TFPReportCustomMemo)
       published
    +    property  CullThreshold;
         property  Font;
         property  LineSpacing;
         property  LinkColor;
    @@ -3946,6 +3952,14 @@ procedure TFPReportCustomMemo.HandleFontChange(Sender: TObject);
       Changed;
     end;
     
    +procedure TFPReportCustomMemo.SetCullThreshold(AValue: TFPReportCullThreshold);
    +begin
    +  if FCullThreshold = AValue then
    +    Exit;
    +  FCullThreshold := AValue;
    +  Changed;
    +end;
    +
     function TFPReportCustomMemo.GetParentFont: TFPReportFont;
     
     begin
    @@ -4406,10 +4420,8 @@ procedure TFPReportCustomMemo.ApplyVertTextAlignment;
     { package the text into TextBlock objects. We don't apply Memo Margins here - that
       gets done in the Apply*TextAlignment() methods. }
     procedure TFPReportCustomMemo.PrepareTextBlocks;
    -
     var
       i: integer;
    -
     begin
       { blockstate is cleared outside the FOR loop because the font state could
         roll over to multiple lines. }
    @@ -4818,6 +4830,41 @@ procedure TFPReportCustomMemo.SetFont(const AValue: TFPReportFont);
       Changed;
     end;
     
    +{ Only called if StretchMode = smDontStretch. This methods removes text that
    +  will not fit in the space allocated for the Memo. }
    +procedure TFPReportCustomMemo.CullTextOutOfBounds;
    +var
    +  i: integer;
    +  lBlock: TFPTextBlock;
    +  lRemainingHeight: single;
    +  d: single;
    +begin
    +  for i := FTextBlockList.Count-1 downto 0 do
    +  begin
    +    lBlock := FTextBlockList[i];
    +
    +    if lBlock.Pos.Top >= Layout.Height then // completely out of bounds
    +    begin
    +      FTextBlockList.Delete(i);
    +    end
    +    else if (lBlock.Pos.Top + lBlock.Height + lBlock.Descender) > Layout.Height then // partially out of bounds
    +    begin
    +      lRemainingHeight :=  Layout.Height - lBlock.Pos.Top;
    +      { calculate % of text [height] that falls inside the bounderies of the Memo. }
    +      d := (lRemainingHeight / (lBlock.Height + lBlock.Descender)) * 100;
    +
    +      {$IFDEF gDEBUG}
    +      writeln(Format('Memo Culling: %2.2f%% of line height is visible', [d]));
    +      {$ENDIF}
    +
    +      if CullThreshold > d then
    +      begin
    +        FTextBlockList.Delete(i);
    +      end;
    +    end;
    +  end;
    +end;
    +
     function TFPReportCustomMemo.CreateTextAlignment: TFPReportTextAlignment;
     begin
       Result := TFPReportTextAlignment.Create(self);
    @@ -4897,15 +4944,12 @@ function TFPReportCustomMemo.HtmlColorToFPReportColor(AColorStr: string; ADefaul
     procedure TFPReportCustomMemo.RecalcLayout;
     
       Function CalcNeededHeight(aHeight : TFPReportUnits) : TFPReportUnits;
    -
       begin
         Result :=((AHeight + LineSpacing) * TextLines.Count) + TextAlignment.TopMargin + TextAlignment.BottomMargin;
       end;
     
     var
       h: TFPReportUnits;
    -
    -
     begin
       FTextBlockList.Clear;
       FCurTextBlock := nil;
    @@ -4923,6 +4967,8 @@ procedure TFPReportCustomMemo.RecalcLayout;
         ApplyStretchMode(CalcNeededHeight(h));
     
       PrepareTextBlocks;
    +  if StretchMode = smDontStretch then
    +    CullTextOutOfBounds;
       ApplyVertTextAlignment;
       ApplyHorzTextAlignment;
     end;
    @@ -4931,6 +4977,7 @@ procedure TFPReportCustomMemo.DoWriteLocalProperties(AWriter: TFPReportStreamer;
     begin
       inherited DoWriteLocalProperties(AWriter, AOriginal);
       AWriter.WriteString('Text', Text);
    +  AWriter.WriteInteger('CullThreshold', CullThreshold);
     
       AWriter.WriteBoolean('UseParentFont', UseParentFont);
       if not UseParentFont then
    @@ -5049,7 +5096,7 @@ procedure TFPReportCustomMemo.SetParent(const AValue: TFPReportElement);
         ReassignParentFont;
     end;
     
    -Procedure TFPReportCustomMemo.ReassignParentFont;
    +procedure TFPReportCustomMemo.ReassignParentFont;
     
     Var
       F : TFPReportFont;
    @@ -5089,6 +5136,7 @@ constructor TFPReportCustomMemo.Create(AOwner: TComponent);
       FUseParentFont := True;
       FFont := TFPReportFont.Create;
       FFont.OnChanged:=@HandleFontChange;
    +  FCullThreshold := 75;
     end;
     
     destructor TFPReportCustomMemo.Destroy;
    @@ -5110,6 +5158,7 @@ procedure TFPReportCustomMemo.Assign(Source: TPersistent);
       begin
         E := Source as TFPReportCustomMemo;
         Text := E.Text;
    +    CullThreshold := E.CullThreshold;
         Font.Assign(E.Font);
         UseParentFont := E.UseParentFont;
         LineSpacing := E.LineSpacing;
    @@ -5137,6 +5186,7 @@ procedure TFPReportCustomMemo.ReadElement(AReader: TFPReportStreamer);
         end;
       end;
       FText := AReader.ReadString('Text', '');
    +  FCullThreshold := AReader.ReadInteger('CullThreshold', CullThreshold);
       UseParentFont := AReader.ReadBoolean('UseParentFont', UseParentFont);
       if not UseParentFont then
         begin
    -- 
    2.13.1
    
    
  • 0002-fpReport-Fix-spelling-mistakes-in-code-comments.patch (1,806 bytes)
    From 9f1d1f9c6095cf718dbc0b676e60505f851656e4 Mon Sep 17 00:00:00 2001
    From: Graeme Geldenhuys <graemeg@gmail.com>
    Date: Mon, 7 May 2018 23:37:19 +0100
    Subject: [PATCH 2/3] fpReport: Fix spelling mistakes in code comments.
    
    
    diff --git a/packages/fcl-report/src/fpreport.pp b/packages/fcl-report/src/fpreport.pp
    index 545ee8843a..dcc4d4dc57 100644
    --- a/packages/fcl-report/src/fpreport.pp
    +++ b/packages/fcl-report/src/fpreport.pp
    @@ -1973,7 +1973,7 @@   TFPReportCustomMemo = class(TFPReportElement)
         function    SubStr(const ASource, AStartDelim, AEndDelim: string; AIndex: integer; out AStartPos: integer): string;
         { Count the number of blocks of text in AValue separated by AToken }
         function    TokenCount(const AValue: string; const AToken: string = '['): integer;
    -    { Return the n-th token defined by APos. APas is 1-based. }
    +    { Return the n-th token defined by APos. APos is 1-based. }
         function    Token(const AValue, AToken: string; const APos: integer): string;
         // --------------->  End  <-----------------
     
    diff --git a/packages/fcl-report/src/fpreporthtmlparser.pp b/packages/fcl-report/src/fpreporthtmlparser.pp
    index ec5134cfed..676ab14e4c 100644
    --- a/packages/fcl-report/src/fpreporthtmlparser.pp
    +++ b/packages/fcl-report/src/fpreporthtmlparser.pp
    @@ -104,7 +104,7 @@
                  the old ExecUpcase
     
      0.5     -  Graeme Geldenhuys <graeme@geldenhuys.co.uk>
    -             New functions to extract attibute details from the tags.
    +             New functions to extract attribute details from the tags.
                                                                                                                                                               //
     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    -- 
    2.13.1
    
    
  • 0003-fpReport-demos-Fix-compiler-hints-about-unused-units.patch (1,339 bytes)
    From 73ee36e63a16648d0cce758f36659d68c238e9f3 Mon Sep 17 00:00:00 2001
    From: Graeme Geldenhuys <graemeg@gmail.com>
    Date: Mon, 7 May 2018 23:38:43 +0100
    Subject: [PATCH 3/3] fpReport demos: Fix compiler hints about unused units in
     uses clause.
    
    
    diff --git a/packages/fcl-report/demos/fcldemo.pp b/packages/fcl-report/demos/fcldemo.pp
    index cf153be57b..94a4e6964a 100644
    --- a/packages/fcl-report/demos/fcldemo.pp
    +++ b/packages/fcl-report/demos/fcldemo.pp
    @@ -1,7 +1,7 @@
     program fcldemo;
     
     uses
    -  udapp, fpextfuncs, regreports, fpreportbarcode;
    +  udapp, regreports, fpreportbarcode;
     
     Var
       Application : TReportDemoApplication;
    diff --git a/packages/fcl-report/demos/rptbarcode.pp b/packages/fcl-report/demos/rptbarcode.pp
    index a68375a101..462d9845e3 100644
    --- a/packages/fcl-report/demos/rptbarcode.pp
    +++ b/packages/fcl-report/demos/rptbarcode.pp
    @@ -12,7 +12,6 @@ interface
       fpreport,
       fpreportcontnr,
       fpreportbarcode,
    -  contnrs,
       udapp;
     
     type
    diff --git a/packages/fcl-report/demos/rptqrcode.pp b/packages/fcl-report/demos/rptqrcode.pp
    index a9b57847bb..1905d9370f 100644
    --- a/packages/fcl-report/demos/rptqrcode.pp
    +++ b/packages/fcl-report/demos/rptqrcode.pp
    @@ -11,9 +11,7 @@ interface
       SysUtils,
       fpreport,
       fpreportcontnr,
    -  fpqrcodegen,
       fpreportqrcode,
    -  contnrs,
       udapp;
     
     type
    -- 
    2.13.1
    
    

Relationships

related to 0033356 resolvedMichael Van Canneyt FPReport designer: Can't prevent memo from overflowing onto adjacent memos 

Activities

Graeme Geldenhuys

2018-05-08 01:36

reporter  

0001-fpReport-prevent-memo-text-from-overflowing-in-smDon.patch (8,138 bytes)
From bbe88c8db6210f36ff038bc25e385b22d5c54549 Mon Sep 17 00:00:00 2001
From: Graeme Geldenhuys <graemeg@gmail.com>
Date: Mon, 7 May 2018 23:36:34 +0100
Subject: [PATCH 1/3] fpReport: prevent memo text from overflowing in
 smDontStretch is specified.

A new property, CullThreshold, was also introduced to handle the last
line of text that could partially overflow.

diff --git a/packages/fcl-report/src/fpreport.pp b/packages/fcl-report/src/fpreport.pp
index 088d4e2bcb..545ee8843a 100644
--- a/packages/fcl-report/src/fpreport.pp
+++ b/packages/fcl-report/src/fpreport.pp
@@ -48,6 +48,7 @@ interface
   TFPReportUnits  = single; // Units are defined as Millimetres
   TFPReportScale  = single;
   TFPReportColor  = type UInt32;
+  TFPReportCullThreshold = 1..100;
 
   // A position in report units
   TFPReportPoint = record
@@ -1877,10 +1878,10 @@   TExprNodeInfoRec = record
     ExprNode: TFPExprNode;
   end;
 
-  { TFPReportCustomMemo }
 
   TFPReportCustomMemo = class(TFPReportElement)
   private
+    FCullThreshold: TFPReportCullThreshold;
     FText: TFPReportString;
     FIsExpr: boolean;
     FTextAlignment: TFPReportTextAlignment;
@@ -1905,6 +1906,7 @@   TFPReportCustomMemo = class(TFPReportElement)
     FUseParentFont: Boolean;
     function    GetParentFont: TFPReportFont;
     procedure   HandleFontChange(Sender: TObject);
+    procedure   SetCullThreshold(AValue: TFPReportCullThreshold);
     procedure   SetText(AValue: TFPReportString);
     procedure   SetUseParentFont(AValue: Boolean);
     procedure   WrapText(const AText: String; var ALines: TStrings; const ALineWidth: TFPReportUnits; out AHeight: TFPReportUnits);
@@ -1929,9 +1931,10 @@   TFPReportCustomMemo = class(TFPReportElement)
     procedure   AddMultipleTextBlocks(const AText: string);
     function    IsExprAtArrayPos(const APos: integer): Boolean;
     procedure   SetFont(const AValue: TFPReportFont);
+    procedure   CullTextOutOfBounds;
   protected
-    procedure ReassignParentFont;
-    procedure ParentFontChanged; override;
+    procedure   ReassignParentFont;
+    procedure   ParentFontChanged; override;
     function    CreateTextAlignment: TFPReportTextAlignment; virtual;
     function    GetExpr: TFPExpressionParser; virtual;
     procedure   RecalcLayout; override;
@@ -1939,7 +1942,7 @@   TFPReportCustomMemo = class(TFPReportElement)
     procedure   ExpandExpressions;
     procedure   UpdateAggregates;
     function    PrepareObject(aRTParent: TFPReportElement): TFPReportElement; override;
-    Procedure SetParent(const AValue: TFPReportElement); override;
+    procedure   SetParent(const AValue: TFPReportElement); override;
     property    Text: TFPReportString read FText write SetText;
     property    Font: TFPReportFont read FFont write SetFont;
     property    TextAlignment: TFPReportTextAlignment read FTextAlignment write SetTextAlignment;
@@ -1951,6 +1954,8 @@   TFPReportCustomMemo = class(TFPReportElement)
     { Used by Runtime Memos - this is a reference back to the original design memo. }
     property    Original: TFPReportCustomMemo read FOriginal write FOriginal;
     property    UseParentFont: Boolean read FUseParentFont write SetUseParentFont default True;
+    { % of line height that should be visible, otherwise it's culled if StretchMode = smDontStretch. Valid range is 1-100% and default is 75%}
+    property    CullThreshold: TFPReportCullThreshold read FCullThreshold write SetCullThreshold default 75;
   protected
     // *****************************
     //   This block is made Protected simply for Unit Testing purposes.
@@ -1987,6 +1992,7 @@   TFPReportCustomMemo = class(TFPReportElement)
 
   TFPReportMemo = class(TFPReportCustomMemo)
   published
+    property  CullThreshold;
     property  Font;
     property  LineSpacing;
     property  LinkColor;
@@ -3946,6 +3952,14 @@ procedure TFPReportCustomMemo.HandleFontChange(Sender: TObject);
   Changed;
 end;
 
+procedure TFPReportCustomMemo.SetCullThreshold(AValue: TFPReportCullThreshold);
+begin
+  if FCullThreshold = AValue then
+    Exit;
+  FCullThreshold := AValue;
+  Changed;
+end;
+
 function TFPReportCustomMemo.GetParentFont: TFPReportFont;
 
 begin
@@ -4406,10 +4420,8 @@ procedure TFPReportCustomMemo.ApplyVertTextAlignment;
 { package the text into TextBlock objects. We don't apply Memo Margins here - that
   gets done in the Apply*TextAlignment() methods. }
 procedure TFPReportCustomMemo.PrepareTextBlocks;
-
 var
   i: integer;
-
 begin
   { blockstate is cleared outside the FOR loop because the font state could
     roll over to multiple lines. }
@@ -4818,6 +4830,41 @@ procedure TFPReportCustomMemo.SetFont(const AValue: TFPReportFont);
   Changed;
 end;
 
+{ Only called if StretchMode = smDontStretch. This methods removes text that
+  will not fit in the space allocated for the Memo. }
+procedure TFPReportCustomMemo.CullTextOutOfBounds;
+var
+  i: integer;
+  lBlock: TFPTextBlock;
+  lRemainingHeight: single;
+  d: single;
+begin
+  for i := FTextBlockList.Count-1 downto 0 do
+  begin
+    lBlock := FTextBlockList[i];
+
+    if lBlock.Pos.Top >= Layout.Height then // completely out of bounds
+    begin
+      FTextBlockList.Delete(i);
+    end
+    else if (lBlock.Pos.Top + lBlock.Height + lBlock.Descender) > Layout.Height then // partially out of bounds
+    begin
+      lRemainingHeight :=  Layout.Height - lBlock.Pos.Top;
+      { calculate % of text [height] that falls inside the bounderies of the Memo. }
+      d := (lRemainingHeight / (lBlock.Height + lBlock.Descender)) * 100;
+
+      {$IFDEF gDEBUG}
+      writeln(Format('Memo Culling: %2.2f%% of line height is visible', [d]));
+      {$ENDIF}
+
+      if CullThreshold > d then
+      begin
+        FTextBlockList.Delete(i);
+      end;
+    end;
+  end;
+end;
+
 function TFPReportCustomMemo.CreateTextAlignment: TFPReportTextAlignment;
 begin
   Result := TFPReportTextAlignment.Create(self);
@@ -4897,15 +4944,12 @@ function TFPReportCustomMemo.HtmlColorToFPReportColor(AColorStr: string; ADefaul
 procedure TFPReportCustomMemo.RecalcLayout;
 
   Function CalcNeededHeight(aHeight : TFPReportUnits) : TFPReportUnits;
-
   begin
     Result :=((AHeight + LineSpacing) * TextLines.Count) + TextAlignment.TopMargin + TextAlignment.BottomMargin;
   end;
 
 var
   h: TFPReportUnits;
-
-
 begin
   FTextBlockList.Clear;
   FCurTextBlock := nil;
@@ -4923,6 +4967,8 @@ procedure TFPReportCustomMemo.RecalcLayout;
     ApplyStretchMode(CalcNeededHeight(h));
 
   PrepareTextBlocks;
+  if StretchMode = smDontStretch then
+    CullTextOutOfBounds;
   ApplyVertTextAlignment;
   ApplyHorzTextAlignment;
 end;
@@ -4931,6 +4977,7 @@ procedure TFPReportCustomMemo.DoWriteLocalProperties(AWriter: TFPReportStreamer;
 begin
   inherited DoWriteLocalProperties(AWriter, AOriginal);
   AWriter.WriteString('Text', Text);
+  AWriter.WriteInteger('CullThreshold', CullThreshold);
 
   AWriter.WriteBoolean('UseParentFont', UseParentFont);
   if not UseParentFont then
@@ -5049,7 +5096,7 @@ procedure TFPReportCustomMemo.SetParent(const AValue: TFPReportElement);
     ReassignParentFont;
 end;
 
-Procedure TFPReportCustomMemo.ReassignParentFont;
+procedure TFPReportCustomMemo.ReassignParentFont;
 
 Var
   F : TFPReportFont;
@@ -5089,6 +5136,7 @@ constructor TFPReportCustomMemo.Create(AOwner: TComponent);
   FUseParentFont := True;
   FFont := TFPReportFont.Create;
   FFont.OnChanged:=@HandleFontChange;
+  FCullThreshold := 75;
 end;
 
 destructor TFPReportCustomMemo.Destroy;
@@ -5110,6 +5158,7 @@ procedure TFPReportCustomMemo.Assign(Source: TPersistent);
   begin
     E := Source as TFPReportCustomMemo;
     Text := E.Text;
+    CullThreshold := E.CullThreshold;
     Font.Assign(E.Font);
     UseParentFont := E.UseParentFont;
     LineSpacing := E.LineSpacing;
@@ -5137,6 +5186,7 @@ procedure TFPReportCustomMemo.ReadElement(AReader: TFPReportStreamer);
     end;
   end;
   FText := AReader.ReadString('Text', '');
+  FCullThreshold := AReader.ReadInteger('CullThreshold', CullThreshold);
   UseParentFont := AReader.ReadBoolean('UseParentFont', UseParentFont);
   if not UseParentFont then
     begin
-- 
2.13.1

Graeme Geldenhuys

2018-05-08 01:36

reporter  

0002-fpReport-Fix-spelling-mistakes-in-code-comments.patch (1,806 bytes)
From 9f1d1f9c6095cf718dbc0b676e60505f851656e4 Mon Sep 17 00:00:00 2001
From: Graeme Geldenhuys <graemeg@gmail.com>
Date: Mon, 7 May 2018 23:37:19 +0100
Subject: [PATCH 2/3] fpReport: Fix spelling mistakes in code comments.


diff --git a/packages/fcl-report/src/fpreport.pp b/packages/fcl-report/src/fpreport.pp
index 545ee8843a..dcc4d4dc57 100644
--- a/packages/fcl-report/src/fpreport.pp
+++ b/packages/fcl-report/src/fpreport.pp
@@ -1973,7 +1973,7 @@   TFPReportCustomMemo = class(TFPReportElement)
     function    SubStr(const ASource, AStartDelim, AEndDelim: string; AIndex: integer; out AStartPos: integer): string;
     { Count the number of blocks of text in AValue separated by AToken }
     function    TokenCount(const AValue: string; const AToken: string = '['): integer;
-    { Return the n-th token defined by APos. APas is 1-based. }
+    { Return the n-th token defined by APos. APos is 1-based. }
     function    Token(const AValue, AToken: string; const APos: integer): string;
     // --------------->  End  <-----------------
 
diff --git a/packages/fcl-report/src/fpreporthtmlparser.pp b/packages/fcl-report/src/fpreporthtmlparser.pp
index ec5134cfed..676ab14e4c 100644
--- a/packages/fcl-report/src/fpreporthtmlparser.pp
+++ b/packages/fcl-report/src/fpreporthtmlparser.pp
@@ -104,7 +104,7 @@
              the old ExecUpcase
 
  0.5     -  Graeme Geldenhuys <graeme@geldenhuys.co.uk>
-             New functions to extract attibute details from the tags.
+             New functions to extract attribute details from the tags.
                                                                                                                                                           //
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-- 
2.13.1

Graeme Geldenhuys

2018-05-08 01:36

reporter  

0003-fpReport-demos-Fix-compiler-hints-about-unused-units.patch (1,339 bytes)
From 73ee36e63a16648d0cce758f36659d68c238e9f3 Mon Sep 17 00:00:00 2001
From: Graeme Geldenhuys <graemeg@gmail.com>
Date: Mon, 7 May 2018 23:38:43 +0100
Subject: [PATCH 3/3] fpReport demos: Fix compiler hints about unused units in
 uses clause.


diff --git a/packages/fcl-report/demos/fcldemo.pp b/packages/fcl-report/demos/fcldemo.pp
index cf153be57b..94a4e6964a 100644
--- a/packages/fcl-report/demos/fcldemo.pp
+++ b/packages/fcl-report/demos/fcldemo.pp
@@ -1,7 +1,7 @@
 program fcldemo;
 
 uses
-  udapp, fpextfuncs, regreports, fpreportbarcode;
+  udapp, regreports, fpreportbarcode;
 
 Var
   Application : TReportDemoApplication;
diff --git a/packages/fcl-report/demos/rptbarcode.pp b/packages/fcl-report/demos/rptbarcode.pp
index a68375a101..462d9845e3 100644
--- a/packages/fcl-report/demos/rptbarcode.pp
+++ b/packages/fcl-report/demos/rptbarcode.pp
@@ -12,7 +12,6 @@ interface
   fpreport,
   fpreportcontnr,
   fpreportbarcode,
-  contnrs,
   udapp;
 
 type
diff --git a/packages/fcl-report/demos/rptqrcode.pp b/packages/fcl-report/demos/rptqrcode.pp
index a9b57847bb..1905d9370f 100644
--- a/packages/fcl-report/demos/rptqrcode.pp
+++ b/packages/fcl-report/demos/rptqrcode.pp
@@ -11,9 +11,7 @@ interface
   SysUtils,
   fpreport,
   fpreportcontnr,
-  fpqrcodegen,
   fpreportqrcode,
-  contnrs,
   udapp;
 
 type
-- 
2.13.1

Michael Van Canneyt

2018-05-08 09:28

administrator   ~0108196

Applied in 3 separate commits, of which 38948 is that last one.

Many thanks for your efforts!

Issue History

Date Modified Username Field Change
2018-05-08 01:36 Graeme Geldenhuys New Issue
2018-05-08 01:36 Graeme Geldenhuys File Added: 0001-fpReport-prevent-memo-text-from-overflowing-in-smDon.patch
2018-05-08 01:36 Graeme Geldenhuys File Added: 0002-fpReport-Fix-spelling-mistakes-in-code-comments.patch
2018-05-08 01:36 Graeme Geldenhuys File Added: 0003-fpReport-demos-Fix-compiler-hints-about-unused-units.patch
2018-05-08 09:10 Michael Van Canneyt Assigned To => Michael Van Canneyt
2018-05-08 09:10 Michael Van Canneyt Status new => assigned
2018-05-08 09:23 Michael Van Canneyt Relationship added related to 0033356
2018-05-08 09:28 Michael Van Canneyt Fixed in Revision => 38948
2018-05-08 09:28 Michael Van Canneyt Note Added: 0108196
2018-05-08 09:28 Michael Van Canneyt Status assigned => resolved
2018-05-08 09:28 Michael Van Canneyt Fixed in Version => 3.1.1
2018-05-08 09:28 Michael Van Canneyt Resolution open => fixed
2018-05-08 09:28 Michael Van Canneyt Target Version => 3.2.0