TAChart: Less hints and warnings

This commit is contained in:
wp_xyz 2021-08-05 10:34:38 +02:00
parent e0a6278dff
commit 7c644ae7b3
23 changed files with 26 additions and 16 deletions

View File

@ -22,6 +22,7 @@ object ChartEditorForm: TChartEditorForm
HelpButton.Name = 'HelpButton' HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton' CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton' CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True CancelButton.DefaultCaption = True
TabOrder = 0 TabOrder = 0

View File

@ -393,7 +393,7 @@ var
msg: String; msg: String;
C: TWinControl; C: TWinControl;
begin begin
if not Validate(Tree.Selected, msg, C) then if not Validate(Node, msg, C) then
begin begin
C.SetFocus; C.SetFocus;
MessageDlg(msg, mtError, [mbOk], 0); MessageDlg(msg, mtError, [mbOk], 0);

View File

@ -6,7 +6,7 @@ interface
uses uses
Classes, SysUtils, Graphics, Classes, SysUtils, Graphics,
Forms, Controls, ExtCtrls, ColorBox, StdCtrls, Spin, Forms, Controls, ExtCtrls, StdCtrls, Spin,
TALegend, TAGraph, TALegend, TAGraph,
ceFontFrame, ceSimpleBrushFrame, ceSimplePenFrame; ceFontFrame, ceSimpleBrushFrame, ceSimplePenFrame;

View File

@ -99,8 +99,8 @@ procedure TChartShapeBrushPenMarginsFrame.CalculatePreferredSize(
var PreferredWidth, PreferredHeight: integer; var PreferredWidth, PreferredHeight: integer;
WithThemeSpace: Boolean); WithThemeSpace: Boolean);
var var
w: Integer; w: Integer = 0;
h: Integer; h: Integer = 0;
begin begin
PreferredHeight := cmbShape.Height + PreferredHeight := cmbShape.Height +
gbBorder.BorderSpacing.Top + gbBorder.Height + gbBorder.BorderSpacing.Top + gbBorder.Height +

View File

@ -19,7 +19,6 @@ type
private private
FBrush: TBrush; FBrush: TBrush;
FOnChange: TNotifyEvent; FOnChange: TNotifyEvent;
FOnVisibleChange: TNotifyEvent;
procedure DoChange; procedure DoChange;
public public
constructor Create(AOwner: TComponent); override; constructor Create(AOwner: TComponent); override;

View File

@ -62,6 +62,7 @@ object SimpleChartPenFrame: TSimpleChartPenFrame
Constraints.MinWidth = 80 Constraints.MinWidth = 80
Enabled = False Enabled = False
ItemHeight = 16 ItemHeight = 16
ItemIndex = 0
TabOrder = 1 TabOrder = 1
OnChange = cbPenWidthChange OnChange = cbPenWidthChange
end end

View File

@ -24,14 +24,13 @@ type
private private
FPen: TChartPen; FPen: TChartPen;
FOnChange: TNotifyEvent; FOnChange: TNotifyEvent;
FOnVisibleChange: TNotifyEvent;
procedure DoChange; procedure DoChange;
function GetWidthLeft: Integer; function GetWidthLeft: Integer;
procedure SetWidthLeft(const AValue: Integer); procedure SetWidthLeft(const AValue: Integer);
protected protected
procedure CalculatePreferredSize( procedure CalculatePreferredSize(
var PreferredWidth, PreferredHeight: integer; var PreferredWidth, PreferredHeight: integer;
WithThemeSpace: Boolean); override; {%H-}WithThemeSpace: Boolean); override;
public public
constructor Create(AOwner: TComponent); override; constructor Create(AOwner: TComponent); override;
procedure GetData(APen: TChartPen); procedure GetData(APen: TChartPen);

View File

@ -12,7 +12,7 @@
unit TAAnimatedSource; unit TAAnimatedSource;
{$H+} {$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface
uses uses

View File

@ -1,6 +1,7 @@
unit TAChartCombos; unit TAChartCombos;
{$mode ObjFPC}{$H+} {$mode ObjFPC}{$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface
@ -290,7 +291,7 @@ var
bs: TBrushStyle; bs: TBrushStyle;
symwidth, symheight: Integer; symwidth, symheight: Integer;
R: TRect; R: TRect;
penClr, brushClr: TColor; brushClr: TColor;
isDisabled: Boolean; isDisabled: Boolean;
begin begin
if Assigned(OnDrawItem) then if Assigned(OnDrawItem) then
@ -334,7 +335,6 @@ begin
Canvas.Pen.Color := Canvas.Font.Color Canvas.Pen.Color := Canvas.Font.Color
else else
Canvas.Pen.Color := FPenColor; Canvas.Pen.Color := FPenColor;
penClr := Canvas.Pen.Color;
Canvas.Pen.Width := 1; Canvas.Pen.Width := 1;
Canvas.Pen.Cosmetic := FCosmetic; Canvas.Pen.Cosmetic := FCosmetic;
case FMode of case FMode of
@ -363,7 +363,6 @@ begin
Canvas.Line(x1, y1, x2, y2-1); Canvas.Line(x1, y1, x2, y2-1);
Canvas.Line(x1, y2-1, x2, y1); Canvas.Line(x1, y2-1, x2, y1);
end else end else
// if not ((bs = bsSolid) and ([odFocused, odSelected] * AState <> [])) then
begin begin
Canvas.Pen.Color := clWindowText; Canvas.Pen.Color := clWindowText;
Canvas.Rectangle(x1, y1, x2, y2); Canvas.Rectangle(x1, y1, x2, y2);

View File

@ -1,7 +1,7 @@
unit TAChartExtentLink; unit TAChartExtentLink;
{$H+} {$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface
uses uses
@ -68,7 +68,7 @@ procedure Register;
implementation implementation
uses uses
SysUtils, Math, Types, SysUtils, Math,
TAGeometry, TAChartAxis; TAGeometry, TAChartAxis;
procedure Register; procedure Register;

View File

@ -21,6 +21,7 @@
unit TAChartListbox; unit TAChartListbox;
{$MODE objfpc}{$H+} {$MODE objfpc}{$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
{$IFDEF DARWIN} {$IFDEF DARWIN}
{$DEFINE USE_BITMAPS} {$DEFINE USE_BITMAPS}

View File

@ -12,7 +12,7 @@
unit TACustomSeries; unit TACustomSeries;
{$H+} {$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface
uses uses

View File

@ -13,6 +13,7 @@ unit TACustomSource;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
{$modeswitch advancedrecords} {$modeswitch advancedrecords}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface
@ -307,7 +308,7 @@ type
procedure SetSortBy(AValue: TChartSortBy); override; procedure SetSortBy(AValue: TChartSortBy); override;
procedure SetSortDir(AValue: TChartSortDir); override; procedure SetSortDir(AValue: TChartSortDir); override;
procedure SetSortIndex(AValue: Cardinal); override; procedure SetSortIndex(AValue: Cardinal); override;
procedure SortNoNotify; inline; procedure SortNoNotify;
property ItemInternal[AIndex: Integer]: PChartDataItem read GetItemInternal; property ItemInternal[AIndex: Integer]: PChartDataItem read GetItemInternal;
property OnCompare: TChartSortCompare read FOnCompare write SetOnCompare; property OnCompare: TChartSortCompare read FOnCompare write SetOnCompare;
property Sorted: Boolean read FSorted write SetSorted default false; property Sorted: Boolean read FSorted write SetSorted default false;

View File

@ -12,6 +12,7 @@
unit TADataTools; unit TADataTools;
{$H+} {$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface

View File

@ -10,6 +10,7 @@
unit TADiagram; unit TADiagram;
{$H+} {$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface

View File

@ -809,7 +809,7 @@ function WordWrap(const AText: String; ADrawer: IChartDrawer;
var var
L: TStrings; L: TStrings;
words: TStrings; words: TStrings;
line, testline: String; line: String;
s: String; s: String;
w, ws, wspace: Integer; w, ws, wspace: Integer;
i: Integer; i: Integer;

View File

@ -19,6 +19,7 @@
unit TAExpressionSeries; unit TAExpressionSeries;
{$H+} {$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface

View File

@ -13,6 +13,7 @@
unit TAFuncSeries; unit TAFuncSeries;
{$H+} {$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface

View File

@ -10,6 +10,7 @@
unit TAGeometry; unit TAGeometry;
{$H+} {$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface

View File

@ -18,6 +18,7 @@
unit TAGraph; unit TAGraph;
{$H+} {$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface

View File

@ -11,6 +11,7 @@
unit TAMultiSeries; unit TAMultiSeries;
{$H+} {$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface

View File

@ -19,6 +19,7 @@
unit TASeries; unit TASeries;
{$H+} {$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface

View File

@ -10,6 +10,7 @@
} }
unit TATools; unit TATools;
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface interface