You've already forked lazarus-ccr
jvcllaz: Less hints and warnings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7466 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -237,7 +237,6 @@ procedure TJvFullColorListFrm.FormShow(Sender: TObject);
|
||||
var
|
||||
i, w: Integer;
|
||||
s: string;
|
||||
cs: TJvColorSpace;
|
||||
begin
|
||||
w := 0;
|
||||
ListBoxColors.Canvas.Font.Assign(ListboxColors.Font);
|
||||
|
@ -31,7 +31,7 @@ interface
|
||||
|
||||
uses
|
||||
LCLType,
|
||||
Classes, Graphics, StdCtrls, PropEdits,
|
||||
Classes, Graphics, PropEdits,
|
||||
JvFullColorSpaces;
|
||||
|
||||
type
|
||||
|
@ -37,12 +37,12 @@ unit JvPageLinkEditorForm;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Windows, Forms, Controls, StdCtrls, ExtCtrls, ComCtrls,
|
||||
Classes, SysUtils, Forms, Controls, StdCtrls, ExtCtrls, ComCtrls,
|
||||
ActnList, Menus,
|
||||
Variants,
|
||||
//DesignEditors, DesignIntf,
|
||||
PropEdits,
|
||||
JvPageList, JvPageListTreeView, JvComponent;
|
||||
JvPageList, JvPageListTreeView;
|
||||
|
||||
type
|
||||
{ a property editor for the PageLinks property of TJvCustomPageListTreeView}
|
||||
@ -178,7 +178,7 @@ begin
|
||||
N2 := tvItems.Items.GetFirstNode;
|
||||
while Assigned(N1) and Assigned(N2) do
|
||||
begin
|
||||
N2.Data := Pointer(N1.PageIndex);
|
||||
N2.Data := {%H-}Pointer(PtrInt(N1.PageIndex));
|
||||
N2.Text := Format('%s (%d)', [N1.Text, N1.PageIndex]);
|
||||
N1 := TJvPageIndexNode(N1.GetNext);
|
||||
N2 := N2.GetNext;
|
||||
@ -215,7 +215,7 @@ begin
|
||||
N2 := tvItems.Items.GetFirstNode;
|
||||
while Assigned(N1) and Assigned(N2) do
|
||||
begin
|
||||
N1.PageIndex := Integer(N2.Data);
|
||||
N1.PageIndex := {%H-}PtrInt(N2.Data);
|
||||
N1.Text := GetStrippedText(N2.Text);
|
||||
N1 := TJvPageIndexNode(N1.GetNext);
|
||||
N2 := N2.GetNext;
|
||||
@ -230,7 +230,7 @@ begin
|
||||
if Node is TJvPageIndexNode then
|
||||
lbPages.ItemIndex := TJvPageIndexNode(Node).PageIndex
|
||||
else
|
||||
lbPages.ItemIndex := Integer(Node.Data);
|
||||
lbPages.ItemIndex := {%H-}PtrInt(Node.Data);
|
||||
end;
|
||||
|
||||
procedure TfrmJvTreeViewLinksEditor.acLinkExecute(Sender: TObject);
|
||||
@ -238,19 +238,19 @@ var
|
||||
N: TTreeNode;
|
||||
begin
|
||||
N := tvItems.Selected;
|
||||
N.Data := Pointer(lbPages.ItemIndex);
|
||||
N.Data := {%H-}Pointer(PtrInt(lbPages.ItemIndex));
|
||||
if FTreeView is TJvCustomSettingsTreeView then
|
||||
begin
|
||||
// make the editor behave like the component
|
||||
if (N.Parent <> nil) and (N.Parent.GetFirstChild = N) then
|
||||
begin
|
||||
N.Parent.Data := Pointer(lbPages.ItemIndex);
|
||||
N.Parent.Data := {%H-}Pointer(PtrInt(lbPages.ItemIndex));
|
||||
N.Parent.Text := GetNewTreeText(N.Parent.Text, lbPages.ItemIndex);
|
||||
end
|
||||
else
|
||||
if N.HasChildren then
|
||||
begin
|
||||
N.GetFirstChild.Data := Pointer(lbPages.ItemIndex);
|
||||
N.GetFirstChild.Data := {%H-}Pointer(PtrInt(lbPages.ItemIndex));
|
||||
N.GetFirstChild.Text := GetNewTreeText(N.GetFirstChild.Text, lbPages.ItemIndex);
|
||||
end;
|
||||
end;
|
||||
|
@ -91,7 +91,7 @@ implementation
|
||||
|
||||
uses
|
||||
StrUtils,
|
||||
JvConsts, JvResources, JvTypes, JvJCLUtils;
|
||||
JvConsts, JvResources, JvTypes;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
|
@ -329,7 +329,7 @@ begin
|
||||
inherited Create;
|
||||
Self.Msg.Msg := AMsg;
|
||||
Self.Msg.WParam := WParam;
|
||||
Self.Msg.LParam := PtrInt(@LParam);
|
||||
Self.Msg.LParam := {%H-}PtrInt(@LParam);
|
||||
Self.Msg.Result := 0;
|
||||
end;
|
||||
|
||||
|
@ -30,7 +30,6 @@ unit JvExtComponent;
|
||||
interface
|
||||
|
||||
uses
|
||||
Types,
|
||||
Classes, Graphics, ExtCtrls,
|
||||
JvExExtCtrls;
|
||||
// JvExComCtrls;
|
||||
|
@ -1605,7 +1605,7 @@ begin
|
||||
LocalFormatSettings.ThousandSeparator := GetLocaleChar(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, '.');
|
||||
LocalFormatSettings.DecimalSeparator := GetLocaleChar(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, '.');
|
||||
{$ELSE}
|
||||
LocalFormatSettings.DecimalSeparator := DecimalSeparator;
|
||||
LocalFormatSettings.DecimalSeparator := DefaultFormatSettings.DecimalSeparator;
|
||||
{$ENDIF RTL150_UP}
|
||||
if aDecimalSeparator = ' ' then {magic mode}
|
||||
aDecimalSeparator := LocalFormatSettings.DecimalSeparator { default case! use system defaults! }
|
||||
|
@ -38,7 +38,7 @@ interface
|
||||
|
||||
uses
|
||||
LMessages, LCLVersion,
|
||||
Classes, Graphics, Contnrs, Controls, Forms, StdCtrls, ComCtrls,
|
||||
Classes, Graphics, Contnrs, Controls, Forms, ComCtrls,
|
||||
ExtCtrls, JvConsts, Types, LCLType;
|
||||
|
||||
const
|
||||
|
@ -30,7 +30,7 @@ interface
|
||||
|
||||
uses
|
||||
LCLVersion,
|
||||
SysUtils, Classes, Controls, Graphics, StdCtrls, ComCtrls, ImgList,
|
||||
SysUtils, Classes, Controls, Graphics, ComCtrls, ImgList,
|
||||
JvCustomItemViewer;
|
||||
|
||||
type
|
||||
|
@ -29,7 +29,7 @@ interface
|
||||
{$MODE OBJFPC}{$H+}
|
||||
|
||||
uses
|
||||
SysUtils, Classes, Controls, Graphics, StdCtrls, ComCtrls,
|
||||
SysUtils, Classes, Controls, Graphics, ComCtrls,
|
||||
FPImage, LCLVersion,
|
||||
JvCustomItemViewer;
|
||||
|
||||
|
@ -41,7 +41,7 @@ interface
|
||||
uses
|
||||
//{$IFDEF WINDOWS}Windows,{$ENDIF}
|
||||
Variants, Classes, Graphics, Controls, Forms, DB, DBCtrls,
|
||||
LMessages, LCLType, LCLIntf, LCLProc, EditBtn, Themes,
|
||||
LMessages, LCLType, LCLIntf, LCLProc, Themes,
|
||||
JvThemes, JvDBUtils;
|
||||
|
||||
const
|
||||
@ -3268,7 +3268,7 @@ end;
|
||||
|
||||
function TJvDBLookupCombo.GetDropDownButtonRect: TRect;
|
||||
begin
|
||||
Result := Rect(ClientWidth - FButtonWidth - Round((Width - ClientWidth) / 2), 0, Width, ClientHeight);
|
||||
Result := Rect(ClientWidth - FButtonWidth - (Width - ClientWidth) div 2, 0, Width, ClientHeight);
|
||||
end;
|
||||
|
||||
procedure TJvDBLookupCombo.InvalidateFrame;
|
||||
|
@ -56,9 +56,6 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
JvConsts;
|
||||
|
||||
type
|
||||
TGridFilterFunc = function(const FieldValue, FilterValue: string): Boolean;
|
||||
|
||||
|
@ -48,11 +48,11 @@ type
|
||||
procedure FontChanged(Sender: TObject); override;
|
||||
procedure Paint; override;
|
||||
procedure Resize; override;
|
||||
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
|
||||
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
|
||||
procedure ToggleMouseDown(Sender: TObject; AButton: TMouseButton;
|
||||
AShift: TShiftState; X, Y: Integer);
|
||||
|
||||
|
@ -325,7 +325,7 @@ function RGBToBGR(Value: Cardinal): Cardinal;
|
||||
implementation
|
||||
|
||||
uses
|
||||
Controls, StdCtrls, ExtCtrls, TypInfo, Math,
|
||||
Controls, ExtCtrls, TypInfo, Math,
|
||||
JvResources;
|
||||
|
||||
var
|
||||
|
@ -471,13 +471,13 @@ begin
|
||||
SetFocus;
|
||||
end;
|
||||
|
||||
{
|
||||
(*
|
||||
function TJvGradientHeaderPanel.DoEraseBackground(Canvas: TCanvas; Param: LPARAM): Boolean;
|
||||
begin
|
||||
{ Reduce flickering FGradient completely fills the TJvGradientHeaderPanel }
|
||||
Result := True;
|
||||
end;
|
||||
}
|
||||
*)
|
||||
|
||||
|
||||
//=== { TNoEventLabel } ======================================================
|
||||
|
@ -327,8 +327,6 @@ type
|
||||
FArgs: TJvInterpreterArgs;
|
||||
function GetArgs: TJvInterpreterArgs;
|
||||
protected
|
||||
constructor Create(AOwner: TJvInterpreterExpression; AInstance: TObject;
|
||||
const AUnitName, AFunctionName, APropName: string); virtual;
|
||||
function CallFunction(Args: TJvInterpreterArgs; Params: array of Variant): Variant;
|
||||
property Args: TJvInterpreterArgs read GetArgs;
|
||||
property Owner: TJvInterpreterExpression read FOwner;
|
||||
@ -339,6 +337,8 @@ type
|
||||
property FunctionName: string read FFunctionName;
|
||||
property PropName: string read FPropName;
|
||||
public
|
||||
constructor Create(AOwner: TJvInterpreterExpression; AInstance: TObject;
|
||||
const AUnitName, AFunctionName, APropName: string); virtual;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
@ -386,7 +386,7 @@ type
|
||||
FDuplicates: TDuplicates;
|
||||
public
|
||||
function IndexOf(const UnitName, Identifier: string): TJvInterpreterIdentifier;
|
||||
function Find(const Identifier: string; var Index: Integer): Boolean;
|
||||
function Find(const Identifier: string; out Index: Integer): Boolean;
|
||||
procedure Sort(Compare: TListSortCompare = nil); virtual;
|
||||
property Duplicates: TDuplicates read FDuplicates write FDuplicates;
|
||||
end;
|
||||
@ -1211,7 +1211,7 @@ function GlobalJvInterpreterAdapter: TJvInterpreterAdapter;
|
||||
const
|
||||
prArgsNoCheck = -1;
|
||||
noInstance = HINST(0);
|
||||
RFDNull: TJvInterpreterRecField = (Identifier: ''; Offset: 0; Typ: 0);
|
||||
RFDNull: TJvInterpreterRecField = (Identifier: ''; Offset: 0; Typ: 0; DataType: nil);
|
||||
|
||||
varByConst = $8000;
|
||||
|
||||
@ -1304,7 +1304,7 @@ uses
|
||||
{$IFDEF JvInterpreter_OLEAUTO}
|
||||
OleConst, ActiveX, ComObj,
|
||||
{$ENDIF JvInterpreter_OLEAUTO}
|
||||
JvConsts, JvInterpreterConst, JvJVCLUtils, JvResources, JvTypes,
|
||||
JvInterpreterConst, JvResources, JvTypes,
|
||||
JvInterpreterFm; // required uses for class method support
|
||||
|
||||
var
|
||||
@ -1737,7 +1737,7 @@ end;
|
||||
|
||||
function StringLoadFromStream(Stream: TStream): string;
|
||||
var
|
||||
L: Integer;
|
||||
L: Integer = 0;
|
||||
UTF8Str: UTF8String;
|
||||
begin
|
||||
Stream.ReadBuffer(L, SizeOf(L));
|
||||
@ -1755,7 +1755,7 @@ end;
|
||||
|
||||
function IntLoadFromStream(Stream: TStream): Integer;
|
||||
begin
|
||||
Stream.ReadBuffer(Result, SizeOf(Result));
|
||||
Stream.ReadBuffer(Result{%H-}, SizeOf(Result));
|
||||
end;
|
||||
|
||||
procedure WordSaveToStream(Stream: TStream; AWord: Word);
|
||||
@ -1765,7 +1765,7 @@ end;
|
||||
|
||||
function WordLoadFromStream(Stream: TStream): Word;
|
||||
begin
|
||||
Stream.ReadBuffer(Result, SizeOf(Result));
|
||||
Stream.ReadBuffer(Result{%H-}, SizeOf(Result));
|
||||
end;
|
||||
|
||||
procedure ExtendedSaveToStream(Stream: TStream; AExt: Extended);
|
||||
@ -1775,7 +1775,7 @@ end;
|
||||
|
||||
function ExtendedLoadFromStream(Stream: TStream): Extended;
|
||||
begin
|
||||
Stream.ReadBuffer(Result, SizeOf(Result));
|
||||
Stream.ReadBuffer(Result{%H-}, SizeOf(Result));
|
||||
end;
|
||||
|
||||
procedure BoolSaveToStream(Stream: TStream; ABool: Boolean);
|
||||
@ -1790,7 +1790,7 @@ function BoolLoadFromStream(Stream: TStream): Boolean;
|
||||
var
|
||||
B: Integer;
|
||||
begin
|
||||
Stream.ReadBuffer(B, SizeOf(B));
|
||||
Stream.ReadBuffer(B{%H-}, SizeOf(B));
|
||||
Result := (B <> 0);
|
||||
end;
|
||||
|
||||
@ -2020,7 +2020,7 @@ function CallDll(const DllName, FuncName: string; Args: TJvInterpreterArgs;
|
||||
ParamDesc: TTypeArray; ResTyp: Word): Variant;
|
||||
var
|
||||
Ins: HMODULE;
|
||||
LastError: DWORD;
|
||||
//LastError: DWORD;
|
||||
begin
|
||||
Result := False;
|
||||
Ins := SafeLoadLibrary(DllName);
|
||||
@ -2899,7 +2899,7 @@ end;
|
||||
//=== { TJvInterpreterIdentifierList } =======================================
|
||||
|
||||
function TJvInterpreterIdentifierList.Find(const Identifier: string;
|
||||
var Index: Integer): Boolean;
|
||||
out Index: Integer): Boolean;
|
||||
var
|
||||
L, H, I, C: Integer;
|
||||
begin
|
||||
@ -5512,11 +5512,7 @@ end;
|
||||
|
||||
procedure TJvInterpreterExpression.ParseToken;
|
||||
var
|
||||
{$IFDEF DELPHI7_UP}
|
||||
FS: TFormatSettings;
|
||||
{$ELSE}
|
||||
OldDecimalSeparator: Char;
|
||||
{$ENDIF DELPHI7_UP}
|
||||
Dob: Extended;
|
||||
Int: Integer;
|
||||
ValueInt64: Int64;
|
||||
@ -5540,22 +5536,10 @@ begin
|
||||
end;
|
||||
ttDouble:
|
||||
begin
|
||||
{$IFDEF DELPHI7_UP}
|
||||
FS.ThousandSeparator := ',';
|
||||
FS.DecimalSeparator := '.';
|
||||
if not TextToFloat(PChar(FTokenStr), Dob, fvExtended, FS) then
|
||||
JvInterpreterError(ieInternal, -1);
|
||||
{$ELSE}
|
||||
OldDecimalSeparator := DecimalSeparator;
|
||||
DecimalSeparator := '.';
|
||||
if not TextToFloat(PChar(FTokenStr), Dob, fvExtended) then
|
||||
begin
|
||||
DecimalSeparator := OldDecimalSeparator;
|
||||
JvInterpreterError(ieInternal, -1);
|
||||
end
|
||||
else
|
||||
DecimalSeparator := OldDecimalSeparator;
|
||||
{$ENDIF DELPHI7_UP}
|
||||
FToken := Dob;
|
||||
end;
|
||||
ttString:
|
||||
@ -8621,7 +8605,7 @@ const
|
||||
EmptyStr: string = '';
|
||||
var
|
||||
I: Integer;
|
||||
Rec: PAnsiChar;
|
||||
Rec: PAnsiChar = nil;
|
||||
// Res: Boolean;
|
||||
RecHolder: TJvInterpreterRecHolder;
|
||||
begin
|
||||
|
@ -57,7 +57,7 @@ interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, Controls, Forms,
|
||||
JvInterpreter, JvJVCLUtils, JvComponent;
|
||||
JvInterpreter;
|
||||
|
||||
type
|
||||
TJvInterpreterGetDfmFileName = procedure(Sender: TObject; UnitName: string;
|
||||
@ -285,7 +285,7 @@ end;
|
||||
|
||||
function TJvInterpreterFm.MakeForm(const FileName: TFileName): TForm;
|
||||
var
|
||||
S: string;
|
||||
S: string = '';
|
||||
UnitName: string;
|
||||
begin
|
||||
FFileName := FileName;
|
||||
@ -302,7 +302,7 @@ end; { MakeForm }
|
||||
|
||||
function TJvInterpreterFm.MakeInheritedForm(F: TJvInterpreterForm; const FileName: TFileName): TForm;
|
||||
var
|
||||
S: string;
|
||||
S: string = '';
|
||||
UnitName: string;
|
||||
begin
|
||||
FFileName := FileName;
|
||||
@ -320,7 +320,7 @@ end;
|
||||
procedure TJvInterpreterFm.CreateDfmStream(const UnitName: string; var Stream: TStream);
|
||||
var
|
||||
Done: Boolean;
|
||||
DfmFile: string;
|
||||
DfmFile: string = '';
|
||||
begin
|
||||
Done := False;
|
||||
if Assigned(FOnCreateDfmStream) then
|
||||
@ -350,7 +350,7 @@ end;
|
||||
|
||||
procedure TJvInterpreterFm.LoadForm(AForm: TJvInterpreterForm);
|
||||
var
|
||||
Stream: TStream;
|
||||
Stream: TStream = nil;
|
||||
SrcClass: TJvInterpreterIdentifier; // Class Fields support
|
||||
i: integer;
|
||||
begin
|
||||
@ -611,7 +611,7 @@ end;
|
||||
function TJvInterpreterFm.RunUnit(const FileName: TFileName): Variant;
|
||||
var
|
||||
UnitName: string;
|
||||
S: string;
|
||||
S: string = '';
|
||||
begin
|
||||
FFileName := FileName;
|
||||
try
|
||||
|
@ -263,9 +263,6 @@ implementation
|
||||
uses
|
||||
JvJCLUtils, JvInterpreter, JvInterpreterConst, JvConsts;
|
||||
|
||||
const
|
||||
K = '''';
|
||||
|
||||
{*********************** tokenizer ***********************}
|
||||
{ modified algorithm from mozilla source }
|
||||
|
||||
|
Reference in New Issue
Block a user