diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-08-19 07:24:31 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-08-19 07:24:31 +0000 |
commit | 8b29db2fe290a060c76be753caac0fee2f317bd3 (patch) | |
tree | aa4c638344ac595f690ba49f0c580ee3c7b8565f | |
parent | f4a6acb0958dbb229df1085aa7e580dc7728d1ce (diff) | |
download | fpGUI-8b29db2fe290a060c76be753caac0fee2f317bd3.tar.xz |
* Fixed bad type casting in tiRtfReport which was not 64bit friendly. Patch supplied by Michael van Canneyt.
-rw-r--r-- | extras/tiopf/gui/tiRtfReport.pas | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/extras/tiopf/gui/tiRtfReport.pas b/extras/tiopf/gui/tiRtfReport.pas index 5d8d9c53..dfceb5f8 100644 --- a/extras/tiopf/gui/tiRtfReport.pas +++ b/extras/tiopf/gui/tiRtfReport.pas @@ -2893,7 +2893,7 @@ begin if Token <> etDataset then raise TRtfException.Create('variable is not a dataset'); - ADataset := TRtfDataset(integer(Value)); + ADataset := TRtfDataset(ptrint(Value)); ADataset := ADataset.ResolveNestedFields(ADataset, AFieldName, AFieldName); if AFieldName = '' then begin //Its a (nested) dataset @@ -3738,7 +3738,7 @@ begin ARecord := nil; AHeader := nil; AFooter := nil; - ADataset := TRtfDataset(integer(AResultValue)); //Dirty! + ADataset := TRtfDataset(PtrInt(AResultValue)); //Dirty! for i := 0 to AItem.Count - 1 do begin ATemp := AItem[i]; @@ -4047,7 +4047,7 @@ begin if VarIsEmpty(AArgument.Value) then raise TRtfException.Create('OnCreateDataset did not return a dataset object'); - AObject := TObject(integer(AArgument.Value)); + AObject := TObject(Ptrint(AArgument.Value)); ADataset := Datasets.Add(AObject, AAliasname, true); AArgument.Token := etDataset; AArgument.Value := integer(ADataset); @@ -4149,7 +4149,7 @@ var ATable: TRtfDataset; begin if not AArgument.Check(0,[etDataset]) then raise TRtfException.Create(rsUnexpectedParameterType); - ATable := TRtfDataset(integer(AArgument[0].Value)); + ATable := TRtfDataset(Ptrint(AArgument[0].Value)); if ATable.Bof then begin AArgument.Token := etLitTrue; @@ -4167,7 +4167,7 @@ var ATable: TRtfDataset; begin if not AArgument.Check(0,[etDataset]) then raise TRtfException.Create(rsUnexpectedParameterType); - ATable := TRtfDataset(integer(AArgument[0].Value)); + ATable := TRtfDataset(Ptrint(AArgument[0].Value)); if ATable.Eof then begin AArgument.Token := etLitTrue; @@ -4186,7 +4186,7 @@ var ATable: TRtfDataset; begin if not AArgument.Check(0,[etDataset]) then raise TRtfException.Create(rsUnexpectedParameterType); - ATable := TRtfDataset(integer(AArgument[0].Value)); + ATable := TRtfDataset(Ptrint(AArgument[0].Value)); AArgument.Token := etLitInt; AArgument.Value := ATable.RecordCount end; @@ -4196,7 +4196,7 @@ var ATable: TRtfDataset; begin if not AArgument.Check(0,[etDataset]) then raise TRtfException.Create(rsUnexpectedParameterType); - ATable := TRtfDataset(integer(AArgument[0].Value)); + ATable := TRtfDataset(Ptrint(AArgument[0].Value)); if ATable.IsEmpty then begin AArgument.Token := etLitTrue; AArgument.Value := true; @@ -4211,7 +4211,7 @@ var ATable: TRtfDataset; begin if not AArgument.Check(0,[etDataset]) then raise TRtfException.Create(rsUnexpectedParameterType); - ATable := TRtfDataset(integer(AArgument[0].Value)); + ATable := TRtfDataset(Ptrint(AArgument[0].Value)); ATable.First; end; @@ -4220,7 +4220,7 @@ var ATable: TRtfDataset; begin if not AArgument.Check(0,[etDataset]) then raise TRtfException.Create(rsUnexpectedParameterType); - ATable := TRtfDataset(integer(AArgument[0].Value)); + ATable := TRtfDataset(Ptrint(AArgument[0].Value)); ATable.Last; end; @@ -4229,7 +4229,7 @@ var ATable: TRtfDataset; begin if not AArgument.Check(0,[etDataset]) then raise TRtfException.Create(rsUnexpectedParameterType); - ATable := TRtfDataset(integer(AArgument[0].Value)); + ATable := TRtfDataset(Ptrint(AArgument[0].Value)); ATable.Next; end; @@ -4238,7 +4238,7 @@ var ATable: TRtfDataset; begin if not AArgument.Check(0,[etDataset]) then raise TRtfException.Create(rsUnexpectedParameterType); - ATable := TRtfDataset(integer(AArgument[0].Value)); + ATable := TRtfDataset(Ptrint(AArgument[0].Value)); ATable.Open; end; @@ -4247,7 +4247,7 @@ var ATable: TRtfDataset; begin if not AArgument.Check(0,[etDataset]) then raise TRtfException.Create(rsUnexpectedParameterType); - ATable := TRtfDataset(integer(AArgument[0].Value)); + ATable := TRtfDataset(Ptrint(AArgument[0].Value)); ATable.Prior; end; |