You've already forked lazarus-ccr
RxFPC: remove deprecated property TRxMemoryData.OnFilterRecordEx
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3968 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -41,7 +41,6 @@
|
|||||||
{.$DEFINE RXDBGRID_OPTIONS_WO_CANCEL_ON_EXIT}
|
{.$DEFINE RXDBGRID_OPTIONS_WO_CANCEL_ON_EXIT}
|
||||||
{.$DEFINE USED_BiDi}
|
{.$DEFINE USED_BiDi}
|
||||||
{$DEFINE DEFAULT_POPUP_CALENDAR}
|
{$DEFINE DEFAULT_POPUP_CALENDAR}
|
||||||
{.$DEFINE FIX_TRxMemoryData_Filter}
|
|
||||||
{.$DEFINE FIX_BUG_FieldNo}
|
{.$DEFINE FIX_BUG_FieldNo}
|
||||||
|
|
||||||
{.DEFINE USE_TRXXPManifest}
|
{.DEFINE USE_TRXXPManifest}
|
||||||
|
@ -1150,8 +1150,8 @@ procedure TRxCustomDBLookupCombo.CalculatePreferredSize(var PreferredWidth,
|
|||||||
var
|
var
|
||||||
tmpCanvas: TCanvas;
|
tmpCanvas: TCanvas;
|
||||||
begin
|
begin
|
||||||
inherited CalculatePreferredSize(PreferredWidth, PreferredHeight,
|
inherited CalculatePreferredSize(PreferredWidth, PreferredHeight, WithThemeSpace);
|
||||||
WithThemeSpace);
|
|
||||||
// ignore width
|
// ignore width
|
||||||
PreferredWidth:=0;
|
PreferredWidth:=0;
|
||||||
tmpCanvas := GetWorkingCanvas(Canvas);
|
tmpCanvas := GetWorkingCanvas(Canvas);
|
||||||
|
@ -51,9 +51,6 @@ type
|
|||||||
|
|
||||||
TRxMemoryData = class(TDataSet)
|
TRxMemoryData = class(TDataSet)
|
||||||
private
|
private
|
||||||
{$IFDEF FIX_TRxMemoryData_Filter}
|
|
||||||
FOnFilterRecordEx: TFilterRecordEvent;
|
|
||||||
{$ENDIF}
|
|
||||||
FRecordPos: Integer;
|
FRecordPos: Integer;
|
||||||
FRecordSize: Integer;
|
FRecordSize: Integer;
|
||||||
FBookmarkOfs: Integer;
|
FBookmarkOfs: Integer;
|
||||||
@ -82,13 +79,11 @@ type
|
|||||||
|
|
||||||
function AddRecord: TMemoryRecord;
|
function AddRecord: TMemoryRecord;
|
||||||
procedure CopyRecord(RecordData, Buffer: PChar);
|
procedure CopyRecord(RecordData, Buffer: PChar);
|
||||||
function GetOnFilterRecordEx: TFilterRecordEvent;
|
|
||||||
function InsertRecord(Index: Integer): TMemoryRecord;
|
function InsertRecord(Index: Integer): TMemoryRecord;
|
||||||
function FindRecordID(ID: Integer): TMemoryRecord;
|
function FindRecordID(ID: Integer): TMemoryRecord;
|
||||||
procedure CreateIndexList(const FieldNames: string);
|
procedure CreateIndexList(const FieldNames: string);
|
||||||
procedure FreeIndexList;
|
procedure FreeIndexList;
|
||||||
procedure QuickSort(L, R: Integer; Compare: TCompareRecords);
|
procedure QuickSort(L, R: Integer; Compare: TCompareRecords);
|
||||||
procedure SetOnFilterRecordEx(const AValue: TFilterRecordEvent);
|
|
||||||
procedure Sort;
|
procedure Sort;
|
||||||
function CalcRecordSize: Integer;
|
function CalcRecordSize: Integer;
|
||||||
function FindFieldData(Buffer: Pointer; Field: TField): Pointer;overload;
|
function FindFieldData(Buffer: Pointer; Field: TField): Pointer;overload;
|
||||||
@ -207,7 +202,6 @@ type
|
|||||||
property OnDeleteError;
|
property OnDeleteError;
|
||||||
property OnEditError;
|
property OnEditError;
|
||||||
property OnFilterRecord;
|
property OnFilterRecord;
|
||||||
property OnFilterRecordEx: TFilterRecordEvent read GetOnFilterRecordEx write SetOnFilterRecordEx;
|
|
||||||
property OnNewRecord;
|
property OnNewRecord;
|
||||||
property OnPostError;
|
property OnPostError;
|
||||||
|
|
||||||
@ -264,7 +258,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
uses CustApp, rxdconst, LazUTF8, dbutils, dbconst, Variants, math;
|
uses CustApp, rxdconst, LazUTF8, dbutils, dbconst, Variants, math, LResources;
|
||||||
|
|
||||||
const
|
const
|
||||||
ftBlobTypes = [ftBlob, ftMemo, ftGraphic, ftFmtMemo, ftParadoxOle,
|
ftBlobTypes = [ftBlob, ftMemo, ftGraphic, ftFmtMemo, ftParadoxOle,
|
||||||
@ -522,15 +516,6 @@ begin
|
|||||||
Result := TMemoryRecord.Create(Self);
|
Result := TMemoryRecord.Create(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRxMemoryData.GetOnFilterRecordEx: TFilterRecordEvent;
|
|
||||||
begin
|
|
||||||
{$IFDEF FIX_TRxMemoryData_Filter}
|
|
||||||
Result:=FOnFilterRecordEx;
|
|
||||||
{$ELSE}
|
|
||||||
Result:=OnFilterRecord;
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TRxMemoryData.FindRecordID(ID: Integer): TMemoryRecord;
|
function TRxMemoryData.FindRecordID(ID: Integer): TMemoryRecord;
|
||||||
var
|
var
|
||||||
I: Integer;
|
I: Integer;
|
||||||
@ -1004,24 +989,15 @@ var
|
|||||||
SaveState: TDataSetState;
|
SaveState: TDataSetState;
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
{$IFDEF FIX_TRxMemoryData_Filter}
|
|
||||||
if Assigned(OnFilterRecordEx) then
|
|
||||||
{$ELSE}
|
|
||||||
if Assigned(OnFilterRecord) then
|
if Assigned(OnFilterRecord) then
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
if (FRecordPos >= 0) and (FRecordPos < RecordCount) then
|
if (FRecordPos >= 0) and (FRecordPos < RecordCount) then
|
||||||
begin
|
begin
|
||||||
SaveState := SetTempState(dsFilter);
|
SaveState := SetTempState(dsFilter);
|
||||||
try
|
try
|
||||||
RecordToBuffer(Records[FRecordPos], TempBuffer);
|
RecordToBuffer(Records[FRecordPos], TempBuffer);
|
||||||
{$IFDEF FIX_TRxMemoryData_Filter}
|
|
||||||
OnFilterRecordEx(Self, Result);
|
|
||||||
{$ELSE}
|
|
||||||
OnFilterRecord(Self, Result);
|
OnFilterRecord(Self, Result);
|
||||||
{$ENDIF}
|
|
||||||
except
|
except
|
||||||
// Application.HandleException(Self);
|
|
||||||
CustomApplication.HandleException(Self);
|
CustomApplication.HandleException(Self);
|
||||||
end;
|
end;
|
||||||
RestoreState(SaveState);
|
RestoreState(SaveState);
|
||||||
@ -1722,16 +1698,6 @@ begin
|
|||||||
until I >= R;
|
until I >= R;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxMemoryData.SetOnFilterRecordEx(const AValue: TFilterRecordEvent);
|
|
||||||
begin
|
|
||||||
{$IFDEF FIX_TRxMemoryData_Filter}
|
|
||||||
CheckBiDirectional;
|
|
||||||
FOnFilterRecordEx:=AValue;
|
|
||||||
{$ELSE}
|
|
||||||
OnFilterRecord:=AValue;
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TRxMemoryData.CompareRecords(Item1, Item2: TMemoryRecord): Integer;
|
function TRxMemoryData.CompareRecords(Item1, Item2: TMemoryRecord): Integer;
|
||||||
var
|
var
|
||||||
Data1, Data2: PChar;
|
Data1, Data2: PChar;
|
||||||
@ -2102,4 +2068,6 @@ begin
|
|||||||
Result := Length(GetBlobFromRecord(FField))
|
Result := Length(GetBlobFromRecord(FField))
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
initialization
|
||||||
|
RegisterPropertyToSkip(TRxMemoryData, 'OnFilterRecordEx', 'Old property', '');
|
||||||
end.
|
end.
|
||||||
|
Reference in New Issue
Block a user