mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 11:09:36 +02:00
* Added AddText as suggested in bug ID #24764
git-svn-id: trunk@25129 -
This commit is contained in:
parent
4b93fa1323
commit
4afefd6cbe
@ -627,6 +627,7 @@ type
|
||||
procedure SetQuoteChar(c:Char);
|
||||
procedure SetNameValueSeparator(c:Char);
|
||||
procedure WriteData(Writer: TWriter);
|
||||
procedure DoSetTextStr(const Value: string; DoClear : Boolean);
|
||||
protected
|
||||
procedure DefineProperties(Filer: TFiler); override;
|
||||
procedure Error(const Msg: string; Data: Integer);
|
||||
@ -655,6 +656,7 @@ type
|
||||
procedure Append(const S: string);
|
||||
procedure AddStrings(TheStrings: TStrings); overload; virtual;
|
||||
procedure AddStrings(const TheStrings: array of string); overload; virtual;
|
||||
Procedure AddText(Const S : String); virtual;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
procedure BeginUpdate;
|
||||
procedure Clear; virtual; abstract;
|
||||
|
@ -557,7 +557,7 @@ begin
|
||||
Result:=True;
|
||||
end;
|
||||
|
||||
Procedure TStrings.SetTextStr(const Value: string);
|
||||
Procedure TStrings.DoSetTextStr(const Value: string; DoClear : Boolean);
|
||||
|
||||
Var
|
||||
S : String;
|
||||
@ -566,7 +566,8 @@ Var
|
||||
begin
|
||||
Try
|
||||
beginUpdate;
|
||||
Clear;
|
||||
if DoClear then
|
||||
Clear;
|
||||
P:=1;
|
||||
While GetNextLine (Value,S,P) do
|
||||
Add(S);
|
||||
@ -575,7 +576,17 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
Procedure TStrings.SetTextStr(const Value: string);
|
||||
|
||||
begin
|
||||
DoSetTextStr(Value,True);
|
||||
end;
|
||||
|
||||
Procedure TStrings.AddText(const S: string);
|
||||
|
||||
begin
|
||||
DoSetTextStr(S,False);
|
||||
end;
|
||||
|
||||
Procedure TStrings.SetUpdateState(Updating: Boolean);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user