jvcllaz: Make sure that "Maximize compatibility" is checked in each package. Less hints and warnings.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8071 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-08-14 10:09:24 +00:00
parent 329c200276
commit af883f35f2
38 changed files with 102 additions and 51 deletions

View File

@ -14,7 +14,7 @@
</SearchPaths> </SearchPaths>
</CompilerOptions> </CompilerOptions>
<Description Value="JVCL application forms (design time) containing form enhancement components: <Description Value="JVCL application forms (design time) containing form enhancement components:
- animated icons, animated title, form wallpaper" /> - animated icons, animated title, form wallpaper"/>
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/> <License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
<Version Major="1" Release="7"/> <Version Major="1" Release="7"/>
<Files Count="1"> <Files Count="1">
@ -24,6 +24,7 @@
<UnitName Value="JvAppFrmReg"/> <UnitName Value="JvAppFrmReg"/>
</Item1> </Item1>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="3"> <RequiredPkgs Count="3">
<Item1> <Item1>
<PackageName Value="JvAppFrmLazR"/> <PackageName Value="JvAppFrmLazR"/>

View File

@ -13,7 +13,7 @@
</SearchPaths> </SearchPaths>
</CompilerOptions> </CompilerOptions>
<Description Value="JVCL Application Forms (Runtime) containing form enhancement components: <Description Value="JVCL Application Forms (Runtime) containing form enhancement components:
- animated icons, animated title, form wallpaper" /> - animated icons, animated title, form wallpaper"/>
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/> <License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
<Version Major="1" Release="7"/> <Version Major="1" Release="7"/>
<Files Count="4"> <Files Count="4">
@ -34,6 +34,7 @@
<UnitName Value="JvAnimTitle"/> <UnitName Value="JvAnimTitle"/>
</Item4> </Item4>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="2"> <RequiredPkgs Count="2">
<Item1> <Item1>
<PackageName Value="JvCoreLazR"/> <PackageName Value="JvCoreLazR"/>

View File

@ -3,7 +3,6 @@
<Package Version="5"> <Package Version="5">
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Name Value="JvCoreLazR"/> <Name Value="JvCoreLazR"/>
<AddToProjectUsesSection Value="True"/>
<Author Value="Lazarus port by Sergio Samayoa"/> <Author Value="Lazarus port by Sergio Samayoa"/>
<CompilerOptions> <CompilerOptions>
<Version Value="11"/> <Version Value="11"/>

View File

@ -34,6 +34,7 @@ Movable bevel and panel, ruler, expandable panel (RollOut), group header, hypert
<UnitName Value="JvHTHintForm"/> <UnitName Value="JvHTHintForm"/>
</Item3> </Item3>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="3"> <RequiredPkgs Count="3">
<Item1> <Item1>
<PackageName Value="IDEIntf"/> <PackageName Value="IDEIntf"/>

View File

@ -63,6 +63,7 @@ Movable bevel and panel, ruler, exandable panel (RollOut), group header, hyperte
<UnitName Value="JvBehaviorLabel"/> <UnitName Value="JvBehaviorLabel"/>
</Item11> </Item11>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="3"> <RequiredPkgs Count="3">
<Item1> <Item1>
<PackageName Value="JvStdCtrlsLazR"/> <PackageName Value="JvStdCtrlsLazR"/>

View File

@ -37,6 +37,7 @@ TimeLine, OutlookBar, Thumbnail viewer, ImageViewer, ImageListViewer, OwnerDrawV
<UnitName Value="JvOutlookBarForm"/> <UnitName Value="JvOutlookBarForm"/>
</Item4> </Item4>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="3"> <RequiredPkgs Count="3">
<Item1> <Item1>
<PackageName Value="IDEIntf"/> <PackageName Value="IDEIntf"/>

View File

@ -70,6 +70,7 @@ TimeLine, OutlookBar, Thumbnail viewer, ImageViewer, ImageListViewer, OwnerDrawV
<UnitName Value="JvGammaPanel"/> <UnitName Value="JvGammaPanel"/>
</Item13> </Item13>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="2"> <RequiredPkgs Count="2">
<Item1> <Item1>
<PackageName Value="JvCoreLazR"/> <PackageName Value="JvCoreLazR"/>

View File

@ -27,6 +27,7 @@
<UnitName Value="JvDBReg"/> <UnitName Value="JvDBReg"/>
</Item1> </Item1>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="5"> <RequiredPkgs Count="5">
<Item1> <Item1>
<PackageName Value="JvStdCtrlsLazR"/> <PackageName Value="JvStdCtrlsLazR"/>

View File

@ -54,7 +54,8 @@
<UnitName Value="JvDBConst"/> <UnitName Value="JvDBConst"/>
</Item8> </Item8>
</Files> </Files>
<RequiredPkgs Count="4"> <CompatibilityMode Value="True"/>
<RequiredPkgs Count="3">
<Item1> <Item1>
<PackageName Value="JvStdCtrlsLazR"/> <PackageName Value="JvStdCtrlsLazR"/>
</Item1> </Item1>
@ -64,9 +65,6 @@
<Item3> <Item3>
<PackageName Value="JvCoreLazR"/> <PackageName Value="JvCoreLazR"/>
</Item3> </Item3>
<Item4>
<PackageName Value="FCL"/>
</Item4>
</RequiredPkgs> </RequiredPkgs>
<UsageOptions> <UsageOptions>
<UnitPath Value="$(PkgOutDir)"/> <UnitPath Value="$(PkgOutDir)"/>

View File

@ -27,6 +27,7 @@
<UnitName Value="JvHMIReg"/> <UnitName Value="JvHMIReg"/>
</Item1> </Item1>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="2"> <RequiredPkgs Count="2">
<Item1> <Item1>
<PackageName Value="JvCoreLazD"/> <PackageName Value="JvCoreLazD"/>

View File

@ -29,6 +29,7 @@
<UnitName Value="JvLED"/> <UnitName Value="JvLED"/>
</Item2> </Item2>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="1"> <RequiredPkgs Count="1">
<Item1> <Item1>
<PackageName Value="JvCoreLazR"/> <PackageName Value="JvCoreLazR"/>

View File

@ -25,6 +25,7 @@
<UnitName Value="JvJansReg"/> <UnitName Value="JvJansReg"/>
</Item1> </Item1>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="2"> <RequiredPkgs Count="2">
<Item1> <Item1>
<PackageName Value="JvCoreLazD"/> <PackageName Value="JvCoreLazD"/>

View File

@ -71,6 +71,7 @@
<UnitName Value="JvGridFilter"/> <UnitName Value="JvGridFilter"/>
</Item13> </Item13>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="1"> <RequiredPkgs Count="1">
<Item1> <Item1>
<PackageName Value="JvCoreLazR"/> <PackageName Value="JvCoreLazR"/>

View File

@ -24,6 +24,7 @@
<UnitName Value="JvNetReg"/> <UnitName Value="JvNetReg"/>
</Item1> </Item1>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="2"> <RequiredPkgs Count="2">
<Item1> <Item1>
<PackageName Value="JvCoreLazD"/> <PackageName Value="JvCoreLazD"/>

View File

@ -33,6 +33,7 @@
<UnitName Value="JvStrToHtml"/> <UnitName Value="JvStrToHtml"/>
</Item4> </Item4>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="1"> <RequiredPkgs Count="1">
<Item1> <Item1>
<PackageName Value="JvCoreLazR"/> <PackageName Value="JvCoreLazR"/>

View File

@ -35,6 +35,7 @@
<UnitName Value="JvPageLinkEditorForm"/> <UnitName Value="JvPageLinkEditorForm"/>
</Item4> </Item4>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="3"> <RequiredPkgs Count="3">
<Item1> <Item1>
<PackageName Value="IDEIntf"/> <PackageName Value="IDEIntf"/>

View File

@ -41,6 +41,7 @@
<UnitName Value="JvTabBarXPPainter"/> <UnitName Value="JvTabBarXPPainter"/>
</Item6> </Item6>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="2"> <RequiredPkgs Count="2">
<Item1> <Item1>
<PackageName Value="JvStdCtrlsLazR"/> <PackageName Value="JvStdCtrlsLazR"/>

View File

@ -15,7 +15,7 @@
</CompilerOptions> </CompilerOptions>
<Description Value="Pascal scripting engine of the JVCL library (https://sourceforge.net/projects/jvcl/) (designime code)."/> <Description Value="Pascal scripting engine of the JVCL library (https://sourceforge.net/projects/jvcl/) (designime code)."/>
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/> <License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
<Version Major="1" Release="6"/> <Version Major="1" Release="7"/>
<Files Count="1"> <Files Count="1">
<Item1> <Item1>
<Filename Value="..\design\JvPascalInterpreter\jvpascalinterpreterreg.pas"/> <Filename Value="..\design\JvPascalInterpreter\jvpascalinterpreterreg.pas"/>
@ -23,6 +23,7 @@
<UnitName Value="JvPascalInterpreterReg"/> <UnitName Value="JvPascalInterpreterReg"/>
</Item1> </Item1>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="2"> <RequiredPkgs Count="2">
<Item1> <Item1>
<PackageName Value="JvCoreLazD"/> <PackageName Value="JvCoreLazD"/>

View File

@ -15,7 +15,7 @@
<Description Value="Pascal scripting engine of the JVCL library (https://sourceforge.net/projects/jvcl/) (runtime code) <Description Value="Pascal scripting engine of the JVCL library (https://sourceforge.net/projects/jvcl/) (runtime code)
"/> "/>
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/> <License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
<Version Major="1" Release="6"/> <Version Major="1" Release="7"/>
<Files Count="4"> <Files Count="4">
<Item1> <Item1>
<Filename Value="..\run\JvPascalInterpreter\JvInterpreter.pas"/> <Filename Value="..\run\JvPascalInterpreter\JvInterpreter.pas"/>
@ -34,6 +34,7 @@
<UnitName Value="JvInterpreterFm"/> <UnitName Value="JvInterpreterFm"/>
</Item4> </Item4>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="2"> <RequiredPkgs Count="2">
<Item1> <Item1>
<PackageName Value="JvCoreLazR"/> <PackageName Value="JvCoreLazR"/>

View File

@ -22,6 +22,7 @@
<UnitName Value="JvRuntimeDesignReg"/> <UnitName Value="JvRuntimeDesignReg"/>
</Item1> </Item1>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="2"> <RequiredPkgs Count="2">
<Item1> <Item1>
<PackageName Value="JvCoreLazD"/> <PackageName Value="JvCoreLazD"/>

View File

@ -32,6 +32,7 @@
<UnitName Value="JvDesignUtils"/> <UnitName Value="JvDesignUtils"/>
</Item4> </Item4>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="1"> <RequiredPkgs Count="1">
<Item1> <Item1>
<PackageName Value="JvCoreLazR"/> <PackageName Value="JvCoreLazR"/>

View File

@ -24,6 +24,7 @@ CalcEdit, button, checkbox, panel, linked controls"/>
<UnitName Value="JvStdCtrlsReg"/> <UnitName Value="JvStdCtrlsReg"/>
</Item1> </Item1>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="4"> <RequiredPkgs Count="4">
<Item1> <Item1>
<PackageName Value="IDEIntf"/> <PackageName Value="IDEIntf"/>

View File

@ -43,6 +43,7 @@ CalcEdit, button, checkbox, panel, linked controls
<UnitName Value="JvHotTrackPersistent"/> <UnitName Value="JvHotTrackPersistent"/>
</Item6> </Item6>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="2"> <RequiredPkgs Count="2">
<Item1> <Item1>
<PackageName Value="JvCoreLazR"/> <PackageName Value="JvCoreLazR"/>

View File

@ -24,6 +24,7 @@
<UnitName Value="JvTimeFrameworkReg"/> <UnitName Value="JvTimeFrameworkReg"/>
</Item1> </Item1>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="3"> <RequiredPkgs Count="3">
<Item1> <Item1>
<PackageName Value="JvCoreLazD"/> <PackageName Value="JvCoreLazD"/>

View File

@ -57,6 +57,7 @@
<UnitName Value="JvTFGlanceTextViewer"/> <UnitName Value="JvTFGlanceTextViewer"/>
</Item10> </Item10>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="1"> <RequiredPkgs Count="1">
<Item1> <Item1>
<PackageName Value="JvCoreLazR"/> <PackageName Value="JvCoreLazR"/>

View File

@ -32,6 +32,7 @@
<UnitName Value="JvValidatorsEditorForm"/> <UnitName Value="JvValidatorsEditorForm"/>
</Item3> </Item3>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="3"> <RequiredPkgs Count="3">
<Item1> <Item1>
<PackageName Value="JvValidatorsLazR"/> <PackageName Value="JvValidatorsLazR"/>

View File

@ -25,6 +25,7 @@
<UnitName Value="JvValidators"/> <UnitName Value="JvValidators"/>
</Item2> </Item2>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="1"> <RequiredPkgs Count="1">
<Item1> <Item1>
<PackageName Value="JvCoreLazR"/> <PackageName Value="JvCoreLazR"/>

View File

@ -27,6 +27,7 @@
<UnitName Value="JvWizardReg"/> <UnitName Value="JvWizardReg"/>
</Item2> </Item2>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="3"> <RequiredPkgs Count="3">
<Item1> <Item1>
<PackageName Value="JvWizardLazR"/> <PackageName Value="JvWizardLazR"/>

View File

@ -37,6 +37,7 @@
<UnitName Value="JvWizardRouteMapSteps"/> <UnitName Value="JvWizardRouteMapSteps"/>
</Item5> </Item5>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="1"> <RequiredPkgs Count="1">
<Item1> <Item1>
<PackageName Value="JvCoreLazR"/> <PackageName Value="JvCoreLazR"/>

View File

@ -27,6 +27,7 @@
<UnitName Value="JvXPPropertyEditors"/> <UnitName Value="JvXPPropertyEditors"/>
</Item2> </Item2>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="3"> <RequiredPkgs Count="3">
<Item1> <Item1>
<PackageName Value="JvCoreLazD"/> <PackageName Value="JvCoreLazD"/>

View File

@ -41,6 +41,7 @@
<UnitName Value="JvXPCoreUtils"/> <UnitName Value="JvXPCoreUtils"/>
</Item6> </Item6>
</Files> </Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="2"> <RequiredPkgs Count="2">
<Item1> <Item1>
<PackageName Value="JvStdCtrlsLazR"/> <PackageName Value="JvStdCtrlsLazR"/>

View File

@ -10186,6 +10186,7 @@ begin
{$IFDEF ENDIAN_BIG} {$IFDEF ENDIAN_BIG}
Result := AValue; Result := AValue;
{$ELSE} {$ELSE}
Result := '';
SetLength(Result, Length(AValue)); SetLength(Result, Length(AValue));
for i:=1 to Length(AValue) do for i:=1 to Length(AValue) do
Result[i] := WideChar(BEToN(PDWord(@AValue[i])^)); Result[i] := WideChar(BEToN(PDWord(@AValue[i])^));
@ -10199,6 +10200,7 @@ begin
{$IFDEF ENDIAN_BIG} {$IFDEF ENDIAN_BIG}
Result := AValue; Result := AValue;
{$ELSE} {$ELSE}
Result := '';
SetLength(Result, Length(AValue)); SetLength(Result, Length(AValue));
for i:=1 to Length(AValue) do for i:=1 to Length(AValue) do
Result[i] := WideChar(NtoBE(PDWord(@AValue[i])^)); Result[i] := WideChar(NtoBE(PDWord(@AValue[i])^));

View File

@ -4599,7 +4599,7 @@ type
PQColorList = ^TQColorList; PQColorList = ^TQColorList;
TQColorList = array [0..{$IFDEF RTL230_UP}MaxInt div 16{$ELSE}MaxListSize{$ENDIF RTL230_UP} - 1] of PQColor; TQColorList = array [0..{$IFDEF RTL230_UP}MaxInt div 16{$ELSE}MaxListSize{$ENDIF RTL230_UP} - 1] of PQColor;
PNewColor = ^TNewColor; PNewColor = {%H-}^TNewColor;
TNewColor = record TNewColor = record
RGBMin: TTriple; RGBMin: TTriple;
RGBWidth: TTriple; RGBWidth: TTriple;
@ -5214,7 +5214,7 @@ begin
end; end;
type type
PFreqRecord = ^TFreqRecord; PFreqRecord = {%H-}^TFreqRecord;
TFreqRecord = record TFreqRecord = record
B: Byte; B: Byte;
G: Byte; G: Byte;
@ -5652,6 +5652,7 @@ procedure InternalGetDIBSizes(Bitmap: HBITMAP; var InfoHeaderSize: Integer;
var var
BI: TBitmapInfoHeader; BI: TBitmapInfoHeader;
begin begin
BI := Default(TBitmapInfoHeader);
InitializeBitmapInfoHeader(Bitmap, BI, BitCount); InitializeBitmapInfoHeader(Bitmap, BI, BitCount);
if BI.biBitCount > 8 then if BI.biBitCount > 8 then
begin begin
@ -5703,8 +5704,8 @@ end;
function DIBFromBit(Src: HBITMAP; Pal: HPALETTE; PixelFormat: TPixelFormat; function DIBFromBit(Src: HBITMAP; Pal: HPALETTE; PixelFormat: TPixelFormat;
var Length: Longint): Pointer; var Length: Longint): Pointer;
var var
HeaderSize: Integer; HeaderSize: Integer = 0;
ImageSize: Longint; ImageSize: Longint = 0;
FileHeader: PBitmapFileHeader; FileHeader: PBitmapFileHeader;
BI: PBitmapInfoHeader; BI: PBitmapInfoHeader;
Bits: Pointer; Bits: Pointer;
@ -5723,8 +5724,8 @@ begin
bfSize := Length; bfSize := Length;
bfOffBits := SizeOf(FileHeader^) + HeaderSize; bfOffBits := SizeOf(FileHeader^) + HeaderSize;
end; end;
BI := PBitmapInfoHeader(Longint(FileHeader) + SizeOf(FileHeader^)); BI := PBitmapInfoHeader(PtrInt(FileHeader) + SizeOf(FileHeader^));
Bits := Pointer(Longint(BI) + HeaderSize); Bits := Pointer(PtrInt(BI) + HeaderSize);
InternalGetDIB(Src, Pal, BI^, Bits^, PixelFormat); InternalGetDIB(Src, Pal, BI^, Bits^, PixelFormat);
except except
FreeMem(Result); FreeMem(Result);
@ -5741,8 +5742,10 @@ var
BI, NewBI: PBitmapInfoHeader; BI, NewBI: PBitmapInfoHeader;
Bits: Pointer; Bits: Pointer;
NewPalette: PRGBPalette; NewPalette: PRGBPalette;
NewHeaderSize: Integer; NewHeaderSize: Integer = 0;
ImageSize, Length, Len: Longint; ImageSize: LongInt = 0;
Length: LongInt = 0;
Len: Longint = 0;
P, InitData: Pointer; P, InitData: Pointer;
ColorCount: Integer; ColorCount: Integer;
SourceBitmapFormat: TPixelFormat; SourceBitmapFormat: TPixelFormat;

View File

@ -40,7 +40,7 @@ interface
uses uses
LCLType, LCLType,
Classes, Controls, Forms, Graphics, LMessages, SysUtils, Classes, Controls, Forms, Graphics, SysUtils,
JvResources; JvResources;
const const

View File

@ -19,7 +19,9 @@ You may retrieve the latest version of this file at the Project JEDI's JVCL home
located at http://jvcl.delphi-jedi.org located at http://jvcl.delphi-jedi.org
Known Issues: Known Issues:
GIF support is native for VisualCLX so this file is VCL only GIF support is native for VisualCLX so this file is VCL only // <-- wp: really?
Transparency does not seem to work
-----------------------------------------------------------------------------} -----------------------------------------------------------------------------}
// $Id$ // $Id$
@ -106,15 +108,15 @@ type
procedure NewImage; procedure NewImage;
procedure UniqueImage; procedure UniqueImage;
procedure ReadData(Stream: TStream); override; procedure ReadData(Stream: TStream); override;
procedure SetHeight(Value: Integer); override; procedure SetHeight({%H-}Value: Integer); override;
procedure SetTransparent(Value: Boolean); override; procedure SetTransparent(Value: Boolean); override;
procedure SetWidth(Value: Integer); override; procedure SetWidth({%H-}Value: Integer); override;
procedure WriteData(Stream: TStream); override; procedure WriteData(Stream: TStream); override;
property Bitmap: TBitmap read GetBitmap; { volatile } property Bitmap: TBitmap read GetBitmap; { volatile }
public public
constructor Create; override; constructor Create; override;
destructor Destroy; override; destructor Destroy; override;
procedure Clear; procedure Clear; override;
procedure DecodeAllFrames; procedure DecodeAllFrames;
procedure EncodeAllFrames; procedure EncodeAllFrames;
procedure Assign(Source: TPersistent); override; procedure Assign(Source: TPersistent); override;
@ -126,10 +128,8 @@ type
procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle; procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle;
var APalette: HPALETTE); override; var APalette: HPALETTE); override;
**********************************) **********************************)
procedure LoadFromResourceName(Instance: THandle; const ResName: string; procedure LoadFromResourceName(Instance: THandle; const ResName: string); override;
ResType: PChar); procedure LoadFromResourceID(Instance: THandle; ResID: Integer); override;
procedure LoadFromResourceID(Instance: THandle; ResID: Integer;
ResType: PChar);
function AddFrame(Value: TGraphic): Integer; virtual; function AddFrame(Value: TGraphic): Integer; virtual;
procedure DeleteFrame(Index: Integer); procedure DeleteFrame(Index: Integer);
procedure MoveFrame(CurIndex, NewIndex: Integer); procedure MoveFrame(CurIndex, NewIndex: Integer);
@ -207,7 +207,7 @@ type
property Width: Integer read GetWidth; property Width: Integer read GetWidth;
end; end;
TGIFData = class(TSharedImage) TGIFData = class(TSharedRasterImage) //was: TSharedImage)
private private
FComment: TStringList; FComment: TStringList;
FAspectRatio: Byte; FAspectRatio: Byte;
@ -217,11 +217,11 @@ type
protected protected
procedure FreeHandle; override; procedure FreeHandle; override;
public public
constructor Create; constructor Create; override;
destructor Destroy; override; destructor Destroy; override;
end; end;
TGIFItem = class(TSharedImage) TGIFItem = class(TSharedRasterImage) //was: TSharedImage)
private private
FImageData: TMemoryStream; FImageData: TMemoryStream;
FSize: TPoint; FSize: TPoint;
@ -526,7 +526,7 @@ begin
(Length(FData[0]) >= 3) and (Byte(FData[0][1]) = AE_LOOPING); (Length(FData[0]) >= 3) and (Byte(FData[0][1]) = AE_LOOPING);
end; end;
procedure FreeExtensions(Extensions: TList); near; procedure FreeExtensions(Extensions: TList); {near;}
begin begin
if Extensions <> nil then if Extensions <> nil then
begin begin
@ -595,7 +595,7 @@ type
PIntCodeTable = ^TIntCodeTable; PIntCodeTable = ^TIntCodeTable;
TIntCodeTable = array [0..CODE_TABLE_SIZE - 1] of Word; TIntCodeTable = array [0..CODE_TABLE_SIZE - 1] of Word;
PReadContext = ^TReadContext; PReadContext = {%H-}^TReadContext;
TReadContext = record TReadContext = record
Inx: Longint; Inx: Longint;
Size: Longint; Size: Longint;
@ -604,7 +604,7 @@ type
ReadMask: Longint; ReadMask: Longint;
end; end;
PWriteContext = ^TWriteContext; PWriteContext = {%H-}^TWriteContext;
TWriteContext = record TWriteContext = record
Inx: Longint; Inx: Longint;
CodeSize: Longint; CodeSize: Longint;
@ -678,7 +678,8 @@ procedure ReadImageStream(Stream, Dest: TStream; var Desc: TImageDescriptor;
var Interlaced, LocalColors, Corrupted: Boolean; var BitsPerPixel: Byte; var Interlaced, LocalColors, Corrupted: Boolean; var BitsPerPixel: Byte;
var ColorTable: TGIFColorTable); var ColorTable: TGIFColorTable);
var var
CodeSize, BlockSize: Byte; CodeSize: Byte = 0;
BlockSize: Byte = 0;
begin begin
Corrupted := False; Corrupted := False;
Stream.ReadBuffer(Desc, SizeOf(TImageDescriptor)); Stream.ReadBuffer(Desc, SizeOf(TImageDescriptor));
@ -737,7 +738,7 @@ function ReadCode(Stream: TStream; var Context: TReadContext): Longint;
var var
RawCode: Longint; RawCode: Longint;
ByteIndex: Longint; ByteIndex: Longint;
Bytes: Byte; Bytes: Byte = 0;
BytesToLose: Longint; BytesToLose: Longint;
begin begin
while (Context.Inx + Context.CodeSize > Context.Size) and while (Context.Inx + Context.CodeSize > Context.Size) and
@ -809,7 +810,8 @@ procedure ReadGIFData(Stream: TStream; const Header: TBitmapInfoHeader;
Interlaced, LoadCorrupt: Boolean; IntBitPerPixel: Byte; Data: Pointer; Interlaced, LoadCorrupt: Boolean; IntBitPerPixel: Byte; Data: Pointer;
var Corrupted: Boolean; ProgressProc: TProgressProc); var Corrupted: Boolean; ProgressProc: TProgressProc);
var var
MinCodeSize, Temp: Byte; MinCodeSize: Byte = 0;
Temp: Byte;
MaxCode, BitMask, InitCodeSize: Longint; MaxCode, BitMask, InitCodeSize: Longint;
ClearCode, EndingCode, FirstFreeCode, FreeCode: Word; ClearCode, EndingCode, FirstFreeCode, FreeCode: Word;
I, OutCount, Code: Longint; I, OutCount, Code: Longint;
@ -1757,7 +1759,7 @@ var
BitFile: TBitmapFileHeader; BitFile: TBitmapFileHeader;
Colors: TRGBPalette; Colors: TRGBPalette;
Bits: Pointer; Bits: Pointer;
Corrupt: Boolean; Corrupt: Boolean = false;
begin begin
with BI do with BI do
begin begin
@ -1794,6 +1796,7 @@ begin
end; end;
Stream.Write(BitFile, SizeOf(TBitmapFileHeader)); Stream.Write(BitFile, SizeOf(TBitmapFileHeader));
Stream.Write(BI, SizeOf(TBitmapInfoHeader)); Stream.Write(BI, SizeOf(TBitmapInfoHeader));
Colors := Default(TRGBPalette);
FillRGBPalette(FImage.FColorMap, Colors); FillRGBPalette(FImage.FColorMap, Colors);
Stream.Write(Colors, SizeOf(TRGBQuad) * (1 shl BI.biBitCount)); Stream.Write(Colors, SizeOf(TRGBQuad) * (1 shl BI.biBitCount));
@ -1839,6 +1842,7 @@ var
begin begin
FImage.FImageData := TMemoryStream.Create; FImage.FImageData := TMemoryStream.Create;
try try
ImageDesc := Default(TImageDescriptor);
ReadImageStream(Stream, FImage.FImageData, ImageDesc, FInterlaced, ReadImageStream(Stream, FImage.FImageData, ImageDesc, FInterlaced,
FLocalColors, FCorrupted, FImage.FBitsPerPixel, FImage.FColorMap); FLocalColors, FCorrupted, FImage.FBitsPerPixel, FImage.FColorMap);
if FCorrupted and not GIFLoadCorrupted then if FCorrupted and not GIFLoadCorrupted then
@ -2321,11 +2325,12 @@ begin
ReadStream(Stream.Size - Stream.Position, Stream, True); ReadStream(Stream.Size - Stream.Position, Stream, True);
end; end;
procedure TJvGIFImage.LoadFromResourceName(Instance: THandle; const ResName: string; procedure TJvGIFImage.LoadFromResourceName(Instance: THandle; const ResName: string);
ResType: PChar);
var var
Stream: TStream; Stream: TStream;
ResType: TResourceType;
begin begin
ResType := GetResourceType;
Stream := TResourceStream.Create(Instance, ResName, ResType); Stream := TResourceStream.Create(Instance, ResName, ResType);
try try
ReadStream(Stream.Size - Stream.Position, Stream, True); ReadStream(Stream.Size - Stream.Position, Stream, True);
@ -2334,11 +2339,12 @@ begin
end; end;
end; end;
procedure TJvGIFImage.LoadFromResourceID(Instance: THandle; ResID: Integer; procedure TJvGIFImage.LoadFromResourceID(Instance: THandle; ResID: Integer);
ResType: PChar);
var var
ResType: TResourceType;
Stream: TStream; Stream: TStream;
begin begin
ResType := GetResourceType;
Stream := TResourceStream.CreateFromID(Instance, ResID, ResType); Stream := TResourceStream.CreateFromID(Instance, ResID, ResType);
try try
ReadStream(Stream.Size - Stream.Position, Stream, True); ReadStream(Stream.Size - Stream.Position, Stream, True);
@ -2506,7 +2512,7 @@ end;
procedure TJvGIFImage.ReadData(Stream: TStream); procedure TJvGIFImage.ReadData(Stream: TStream);
var var
Size: Longint; Size: Longint = 0;
begin begin
Stream.Read(Size, SizeOf(Size)); Stream.Read(Size, SizeOf(Size));
ReadStream(Size, Stream, True); ReadStream(Size, Stream, True);
@ -2518,6 +2524,7 @@ var
S: TGifSignature; S: TGifSignature;
begin begin
FVersion := gvUnknown; FVersion := gvUnknown;
S := Default(TGifSignature);
Stream.Read(S[0], 3); Stream.Read(S[0], 3);
if not CompareMem(@GIFSignature[0], @S[0], 3) then if not CompareMem(@GIFSignature[0], @S[0], 3) then
GifError(RsEGIFVersion); GifError(RsEGIFVersion);
@ -2570,8 +2577,8 @@ var
function ReadDataBlock(Stream: TStream): TStringList; function ReadDataBlock(Stream: TStream): TStringList;
var var
BlockSize: Byte; BlockSize: Byte = 0;
S: AnsiString; S: AnsiString = '';
begin begin
Result := TStringList.Create; Result := TStringList.Create;
try try
@ -2592,7 +2599,7 @@ var
function ReadExtension(Stream: TStream): TExtension; function ReadExtension(Stream: TStream): TExtension;
var var
ExtensionLabel: Byte; ExtensionLabel: Byte = 0;
begin begin
Result := TExtension.Create; Result := TExtension.Create;
try try

View File

@ -1543,6 +1543,7 @@ var
liLen: integer; liLen: integer;
lp: PByte; lp: PByte;
begin begin
Result := nil;
liLen := VarArrayHighBound(V, 1) - VarArrayLowBound(V, 1) + 1; liLen := VarArrayHighBound(V, 1) - VarArrayLowBound(V, 1) + 1;
SetLength(result, liLen); SetLength(result, liLen);
lp := VarArrayLock(V); lp := VarArrayLock(V);
@ -1749,7 +1750,7 @@ end;
function StringLoadFromStream(Stream: TStream): string; function StringLoadFromStream(Stream: TStream): string;
var var
L: Integer = 0; L: Integer = 0;
UTF8Str: UTF8String; UTF8Str: UTF8String = '';
begin begin
Stream.ReadBuffer(L, SizeOf(L)); Stream.ReadBuffer(L, SizeOf(L));
SetLength(UTF8Str, L); SetLength(UTF8Str, L);
@ -2768,6 +2769,7 @@ begin
Ret := ': ' + ResTypName; Ret := ': ' + ResTypName;
end; end;
Param := '';
for I := 0 to ParamCount - 1 do for I := 0 to ParamCount - 1 do
begin begin
if (ParamTypes[I] and varByRef) = varByRef then if (ParamTypes[I] and varByRef) = varByRef then
@ -4383,6 +4385,7 @@ var
JvInterpreterSrcUnit: TJvInterpreterSrcUnit; JvInterpreterSrcUnit: TJvInterpreterSrcUnit;
FParams: TTypeArray; FParams: TTypeArray;
begin begin
FParams := Default(TTypeArray);
for I := 0 to FSrcUnitList.Count - 1 do for I := 0 to FSrcUnitList.Count - 1 do
begin begin
JvInterpreterSrcUnit := TJvInterpreterSrcUnit(FSrcUnitList[I]); JvInterpreterSrcUnit := TJvInterpreterSrcUnit(FSrcUnitList[I]);
@ -5601,6 +5604,7 @@ var
function PopExp: Variant; function PopExp: Variant;
begin begin
Result := Default(Variant);
if FExpStackPtr = -1 then if FExpStackPtr = -1 then
JvInterpreterError(ieInternal, -1); JvInterpreterError(ieInternal, -1);
JvInterpreterVarCopy(Result, FExpStack[FExpStackPtr]); JvInterpreterVarCopy(Result, FExpStack[FExpStackPtr]);
@ -5888,6 +5892,7 @@ begin
else else
begin begin
FCurrArgs.Clear; FCurrArgs.Clear;
V1 := Default(Variant);
InternalGetValue(nil, 0, V1); InternalGetValue(nil, 0, V1);
if not VarIsOrdinal(V1) then if not VarIsOrdinal(V1) then
JvInterpreterError(ieIntegerRequired, PosBeg); JvInterpreterError(ieIntegerRequired, PosBeg);
@ -6067,6 +6072,7 @@ begin
UpdateVarParams; UpdateVarParams;
if FCurrArgs.Indexed and not FCurrArgs.ReturnIndexed then if FCurrArgs.Indexed and not FCurrArgs.ReturnIndexed then
begin begin
V := Default(Variant);
JvInterpreterVarCopy(V, Result); JvInterpreterVarCopy(V, Result);
if not GetElement(V, Result, FCurrArgs) then if not GetElement(V, Result, FCurrArgs) then
{ problem } { problem }
@ -6129,7 +6135,7 @@ begin
if TVarData(Variable).VType = varArray then if TVarData(Variable).VType = varArray then
begin begin
{Get array value} {Get array value}
PP := PJvInterpreterArrayRec(PtrInt(JvInterpreterVarAsType(Variable, varInteger))); PP := {%H-}PJvInterpreterArrayRec(PtrInt(JvInterpreterVarAsType(Variable, varInteger)));
if Args.Count > PP.Dimension then if Args.Count > PP.Dimension then
JvInterpreterError(ieArrayTooManyParams, -1) JvInterpreterError(ieArrayTooManyParams, -1)
else else
@ -6208,7 +6214,7 @@ begin
if TVarData(Variable).VType = varArray then if TVarData(Variable).VType = varArray then
begin begin
{ Get array value } { Get array value }
PP := PJvInterpreterArrayRec(PtrInt(JvInterpreterVarAsType(Variable, varInteger))); PP := {%H-}PJvInterpreterArrayRec(PtrInt(JvInterpreterVarAsType(Variable, varInteger)));
if Args.Count > PP.Dimension then if Args.Count > PP.Dimension then
JvInterpreterError(ieArrayTooManyParams, -1) JvInterpreterError(ieArrayTooManyParams, -1)
else else
@ -6407,6 +6413,7 @@ var
begin begin
FCurrArgs.FHasVars := False; FCurrArgs.FHasVars := False;
FCurrArgs.Types := FunctionDesc.FParamTypes; FCurrArgs.Types := FunctionDesc.FParamTypes;
V := Default(Variant);
for I := 0 to FCurrArgs.Count - 1 do for I := 0 to FCurrArgs.Count - 1 do
begin begin
if (FunctionDesc.FParamTypes[I] and varByRef) <> 0 then if (FunctionDesc.FParamTypes[I] and varByRef) <> 0 then
@ -6937,6 +6944,7 @@ begin
MyArgs.Obj := FCurrArgs.Obj; MyArgs.Obj := FCurrArgs.Obj;
MyArgs.ObjTyp := FCurrArgs.ObjTyp; MyArgs.ObjTyp := FCurrArgs.ObjTyp;
try try
Variable := Default(Variant);
if GetValue(Identifier, Variable, MyArgs) then if GetValue(Identifier, Variable, MyArgs) then
begin begin
if not SetElement(Variable, FVResult, FCurrArgs) then if not SetElement(Variable, FVResult, FCurrArgs) then
@ -7342,6 +7350,7 @@ begin
NextToken; NextToken;
TypName := Token; TypName := Token;
DT := ParseDataType; DT := ParseDataType;
Value := Default(variant);
for I := 0 to FSS.Count - 1 do for I := 0 to FSS.Count - 1 do
begin begin
DT.Init(Value); DT.Init(Value);
@ -7612,6 +7621,7 @@ begin
raise EJvInterpreterError.Create(ieRaise, PosBeg, '', ''); raise EJvInterpreterError.Create(ieRaise, PosBeg, '', '');
ttIdentifier: ttIdentifier:
begin begin
V := Default(variant);
InternalGetValue(nil, 0, V); InternalGetValue(nil, 0, V);
if VarType(V) <> varObject then if VarType(V) <> varObject then
JvInterpreterError(ieClassRequired, PosBeg {?}); JvInterpreterError(ieClassRequired, PosBeg {?});
@ -7976,7 +7986,7 @@ procedure TJvInterpreterUnit.ReadUnit(const UnitName: string);
var var
OldUnitName: string; OldUnitName: string;
OldSource: string; OldSource: string;
S: string; S: string = '';
begin begin
if FAdapter.UnitExists(UnitName) then if FAdapter.UnitExists(UnitName) then
Exit; Exit;
@ -8346,7 +8356,7 @@ end;
procedure TJvInterpreterUnit.ExecFunction(Fun: TJvInterpreterFunctionDesc); procedure TJvInterpreterUnit.ExecFunction(Fun: TJvInterpreterFunctionDesc);
var var
OldUnitName: string; OldUnitName: string;
S: string; S: string = '';
begin begin
PushState; PushState;
FAllowAssignment := True; FAllowAssignment := True;
@ -8488,7 +8498,7 @@ end;
procedure TJvInterpreterProgram.Run; procedure TJvInterpreterProgram.Run;
var var
UsesList: string; UsesList: string = '';
begin begin
// (rom) Does this always work? After "program" a line end or tab is allowed. // (rom) Does this always work? After "program" a line end or tab is allowed.
if AnsiStrLIComp(PChar(FParser.Source), 'program ', Length('program ')) <> 0 then if AnsiStrLIComp(PChar(FParser.Source), 'program ', Length('program ')) <> 0 then
@ -8681,7 +8691,7 @@ end;
procedure TJvInterpreterArrayDataType.Init(var V: Variant); procedure TJvInterpreterArrayDataType.Init(var V: Variant);
begin begin
V := NativeInt(JvInterpreterArrayInit(FDimension, FArrayBegin, FArrayEnd, FArrayType, FDT)); V := {%H-}NativeInt(JvInterpreterArrayInit(FDimension, FArrayBegin, FArrayEnd, FArrayType, FDT));
TVarData(V).VType := varArray; TVarData(V).VType := varArray;
end; end;

View File

@ -620,6 +620,7 @@ var
UnitName: string; UnitName: string;
S: string = ''; S: string = '';
begin begin
Result := Default(Variant);
FFileName := FileName; FFileName := FileName;
try try
UnitName := ChangeFileExt(ExtractFileName(FFileName), ''); UnitName := ChangeFileExt(ExtractFileName(FFileName), '');

View File

@ -2290,6 +2290,7 @@ var
Appt: TJvTFAppt; Appt: TJvTFAppt;
I: Integer; I: Integer;
begin begin
Result := Default(TDynApptArray);
SetLength(Result, 0); SetLength(Result, 0);
for I := 0 to ApptCount - 1 do for I := 0 to ApptCount - 1 do
begin begin
@ -2317,6 +2318,7 @@ var
Appt: TJvTFAppt; Appt: TJvTFAppt;
I: Integer; I: Integer;
begin begin
Result := Default(TDynApptArray);
SetLength(Result, 0); SetLength(Result, 0);
for I := 0 to ApptCount - 1 do for I := 0 to ApptCount - 1 do
begin begin