diff --git a/components/jvcllaz/design/JvMM/jvfullcolorlistform.pas b/components/jvcllaz/design/JvMM/jvfullcolorlistform.pas index 38dd06f6b..8a72e6a19 100644 --- a/components/jvcllaz/design/JvMM/jvfullcolorlistform.pas +++ b/components/jvcllaz/design/JvMM/jvfullcolorlistform.pas @@ -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); diff --git a/components/jvcllaz/design/JvMM/jvfullcolorspaceseditors.pas b/components/jvcllaz/design/JvMM/jvfullcolorspaceseditors.pas index cfd94d9ca..36a53422d 100644 --- a/components/jvcllaz/design/JvMM/jvfullcolorspaceseditors.pas +++ b/components/jvcllaz/design/JvMM/jvfullcolorspaceseditors.pas @@ -31,7 +31,7 @@ interface uses LCLType, - Classes, Graphics, StdCtrls, PropEdits, + Classes, Graphics, PropEdits, JvFullColorSpaces; type diff --git a/components/jvcllaz/design/JvPageComps/jvpagelinkeditorform.pas b/components/jvcllaz/design/JvPageComps/jvpagelinkeditorform.pas index 11c0063f8..6ddcf47a5 100644 --- a/components/jvcllaz/design/JvPageComps/jvpagelinkeditorform.pas +++ b/components/jvcllaz/design/JvPageComps/jvpagelinkeditorform.pas @@ -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; diff --git a/components/jvcllaz/run/JvCmp/jvspellerform.pas b/components/jvcllaz/run/JvCmp/jvspellerform.pas index 3e55e6680..ca9abeaa6 100644 --- a/components/jvcllaz/run/JvCmp/jvspellerform.pas +++ b/components/jvcllaz/run/JvCmp/jvspellerform.pas @@ -91,7 +91,7 @@ implementation uses StrUtils, - JvConsts, JvResources, JvTypes, JvJCLUtils; + JvConsts, JvResources, JvTypes; {$R *.lfm} diff --git a/components/jvcllaz/run/JvCore/jvexcontrols.pas b/components/jvcllaz/run/JvCore/jvexcontrols.pas index e379fb60f..1e13cd5db 100644 --- a/components/jvcllaz/run/JvCore/jvexcontrols.pas +++ b/components/jvcllaz/run/JvCore/jvexcontrols.pas @@ -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; diff --git a/components/jvcllaz/run/JvCore/jvextcomponent.pas b/components/jvcllaz/run/JvCore/jvextcomponent.pas index d91e40838..2ea82f7e6 100644 --- a/components/jvcllaz/run/JvCore/jvextcomponent.pas +++ b/components/jvcllaz/run/JvCore/jvextcomponent.pas @@ -30,7 +30,6 @@ unit JvExtComponent; interface uses - Types, Classes, Graphics, ExtCtrls, JvExExtCtrls; // JvExComCtrls; diff --git a/components/jvcllaz/run/JvCore/jvjclutils.pas b/components/jvcllaz/run/JvCore/jvjclutils.pas index 49fc1470c..0bd5133c1 100644 --- a/components/jvcllaz/run/JvCore/jvjclutils.pas +++ b/components/jvcllaz/run/JvCore/jvjclutils.pas @@ -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! } diff --git a/components/jvcllaz/run/JvCustomControls/jvcustomitemviewer.pas b/components/jvcllaz/run/JvCustomControls/jvcustomitemviewer.pas index 7aed1942e..46f79fe32 100644 --- a/components/jvcllaz/run/JvCustomControls/jvcustomitemviewer.pas +++ b/components/jvcllaz/run/JvCustomControls/jvcustomitemviewer.pas @@ -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 diff --git a/components/jvcllaz/run/JvCustomControls/jvimagelistviewer.pas b/components/jvcllaz/run/JvCustomControls/jvimagelistviewer.pas index c81e5b0aa..8cd1264fc 100644 --- a/components/jvcllaz/run/JvCustomControls/jvimagelistviewer.pas +++ b/components/jvcllaz/run/JvCustomControls/jvimagelistviewer.pas @@ -30,7 +30,7 @@ interface uses LCLVersion, - SysUtils, Classes, Controls, Graphics, StdCtrls, ComCtrls, ImgList, + SysUtils, Classes, Controls, Graphics, ComCtrls, ImgList, JvCustomItemViewer; type diff --git a/components/jvcllaz/run/JvCustomControls/jvimagesviewer.pas b/components/jvcllaz/run/JvCustomControls/jvimagesviewer.pas index fa08bbc3d..69babc37a 100644 --- a/components/jvcllaz/run/JvCustomControls/jvimagesviewer.pas +++ b/components/jvcllaz/run/JvCustomControls/jvimagesviewer.pas @@ -29,7 +29,7 @@ interface {$MODE OBJFPC}{$H+} uses - SysUtils, Classes, Controls, Graphics, StdCtrls, ComCtrls, + SysUtils, Classes, Controls, Graphics, ComCtrls, FPImage, LCLVersion, JvCustomItemViewer; diff --git a/components/jvcllaz/run/JvDB/jvdblookup.pas b/components/jvcllaz/run/JvDB/jvdblookup.pas index 1f5cf74e5..7831cdf62 100644 --- a/components/jvcllaz/run/JvDB/jvdblookup.pas +++ b/components/jvcllaz/run/JvDB/jvdblookup.pas @@ -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; diff --git a/components/jvcllaz/run/JvJans/jvgridfilter.pas b/components/jvcllaz/run/JvJans/jvgridfilter.pas index 59b2bba4a..aac8598db 100644 --- a/components/jvcllaz/run/JvJans/jvgridfilter.pas +++ b/components/jvcllaz/run/JvJans/jvgridfilter.pas @@ -56,9 +56,6 @@ type implementation -uses - JvConsts; - type TGridFilterFunc = function(const FieldValue, FilterValue: string): Boolean; diff --git a/components/jvcllaz/run/JvJans/jvjantoggle.pas b/components/jvcllaz/run/JvJans/jvjantoggle.pas index b43f783ff..8584ce5bf 100644 --- a/components/jvcllaz/run/JvJans/jvjantoggle.pas +++ b/components/jvcllaz/run/JvJans/jvjantoggle.pas @@ -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); diff --git a/components/jvcllaz/run/JvMM/jvfullcolorspaces.pas b/components/jvcllaz/run/JvMM/jvfullcolorspaces.pas index 223054db2..3e22ab5f1 100644 --- a/components/jvcllaz/run/JvMM/jvfullcolorspaces.pas +++ b/components/jvcllaz/run/JvMM/jvfullcolorspaces.pas @@ -325,7 +325,7 @@ function RGBToBGR(Value: Cardinal): Cardinal; implementation uses - Controls, StdCtrls, ExtCtrls, TypInfo, Math, + Controls, ExtCtrls, TypInfo, Math, JvResources; var diff --git a/components/jvcllaz/run/JvMM/jvgradientheaderpanel.pas b/components/jvcllaz/run/JvMM/jvgradientheaderpanel.pas index c1ad23fa4..04c395eee 100644 --- a/components/jvcllaz/run/JvMM/jvgradientheaderpanel.pas +++ b/components/jvcllaz/run/JvMM/jvgradientheaderpanel.pas @@ -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 } ====================================================== diff --git a/components/jvcllaz/run/JvPascalInterpreter/JvInterpreter.pas b/components/jvcllaz/run/JvPascalInterpreter/JvInterpreter.pas index 3bfe0e8fc..2e24b5787 100644 --- a/components/jvcllaz/run/JvPascalInterpreter/JvInterpreter.pas +++ b/components/jvcllaz/run/JvPascalInterpreter/JvInterpreter.pas @@ -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 diff --git a/components/jvcllaz/run/JvPascalInterpreter/JvInterpreterFm.pas b/components/jvcllaz/run/JvPascalInterpreter/JvInterpreterFm.pas index 54d2f5400..98ad9cf0b 100644 --- a/components/jvcllaz/run/JvPascalInterpreter/JvInterpreterFm.pas +++ b/components/jvcllaz/run/JvPascalInterpreter/JvInterpreterFm.pas @@ -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 diff --git a/components/jvcllaz/run/JvPascalInterpreter/JvInterpreterParser.pas b/components/jvcllaz/run/JvPascalInterpreter/JvInterpreterParser.pas index 6a35fdf01..205b18a51 100644 --- a/components/jvcllaz/run/JvPascalInterpreter/JvInterpreterParser.pas +++ b/components/jvcllaz/run/JvPascalInterpreter/JvInterpreterParser.pas @@ -263,9 +263,6 @@ implementation uses JvJCLUtils, JvInterpreter, JvInterpreterConst, JvConsts; -const - K = ''''; - {*********************** tokenizer ***********************} { modified algorithm from mozilla source }