mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 00:29:19 +02:00
* Release expression nodes for variables
git-svn-id: trunk@38441 -
This commit is contained in:
parent
eecce3d8f4
commit
32c36ea1d5
@ -1412,6 +1412,7 @@ type
|
|||||||
Procedure SaveValue; virtual;
|
Procedure SaveValue; virtual;
|
||||||
Procedure RestoreValue; virtual;
|
Procedure RestoreValue; virtual;
|
||||||
Protected
|
Protected
|
||||||
|
Procedure ReleaseExpressionNodes;
|
||||||
Procedure GetRTValue(Var Result : TFPExpressionResult; ConstRef AName : ShortString); virtual;
|
Procedure GetRTValue(Var Result : TFPExpressionResult; ConstRef AName : ShortString); virtual;
|
||||||
procedure GetRTExpressionValue(Var Result : TFPExpressionResult; ConstRef AName : ShortString); virtual;
|
procedure GetRTExpressionValue(Var Result : TFPExpressionResult; ConstRef AName : ShortString); virtual;
|
||||||
Public
|
Public
|
||||||
@ -2933,8 +2934,7 @@ begin
|
|||||||
FAggregateValues.Delete(FAggregateValues.Count-1);
|
FAggregateValues.Delete(FAggregateValues.Count-1);
|
||||||
end;
|
end;
|
||||||
FAggregateValues.Free;
|
FAggregateValues.Free;
|
||||||
FExpressionNode.Free;
|
ReleaseExpressionNodes;
|
||||||
FResetValueExpressionNode.Free;
|
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2948,6 +2948,12 @@ begin
|
|||||||
FValue:=FSavedValue;
|
FValue:=FSavedValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFPReportVariable.ReleaseExpressionNodes;
|
||||||
|
begin
|
||||||
|
FreeAndNil(FExpressionNode);
|
||||||
|
FreeAndNil(FResetValueExpressionNode);
|
||||||
|
end;
|
||||||
|
|
||||||
function TFPReportVariable.GetValue: String;
|
function TFPReportVariable.GetValue: String;
|
||||||
begin
|
begin
|
||||||
Case DataType of
|
Case DataType of
|
||||||
@ -4256,7 +4262,7 @@ var
|
|||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
for i := 0 to Length(ExpressionNodes)-1 do
|
for i := 0 to Length(ExpressionNodes)-1 do
|
||||||
ExpressionNodes[i].ExprNode.Free;
|
FreeAndNil(ExpressionNodes[i].ExprNode);
|
||||||
SetLength(ExpressionNodes, 0);
|
SetLength(ExpressionNodes, 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -4393,7 +4399,7 @@ end;
|
|||||||
|
|
||||||
function TFPReportCustomMemo.GetExpr: TFPExpressionParser;
|
function TFPReportCustomMemo.GetExpr: TFPExpressionParser;
|
||||||
begin
|
begin
|
||||||
Result := TFPReportCustomBand(Parent).Page.Report.FExpr;
|
Result:=Report.FExpr;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFPReportCustomMemo.CreateTextBlock(const IsURL: boolean): TFPTextBlock;
|
function TFPReportCustomMemo.CreateTextBlock(const IsURL: boolean): TFPTextBlock;
|
||||||
@ -7643,6 +7649,7 @@ begin
|
|||||||
For I:=0 to FVariables.Count-1 do
|
For I:=0 to FVariables.Count-1 do
|
||||||
begin
|
begin
|
||||||
v:=FVariables[I];
|
v:=FVariables[I];
|
||||||
|
v.ReleaseExpressionNodes;
|
||||||
if v.Expression<>'' then
|
if v.Expression<>'' then
|
||||||
begin
|
begin
|
||||||
FExpr.Expression:=v.Expression;
|
FExpr.Expression:=v.Expression;
|
||||||
|
Loading…
Reference in New Issue
Block a user