|
@@ -1939,16 +1939,22 @@ end;
|
|
|
|
|
|
function TStringList.Add(const S: string): Integer;
|
|
|
|
|
|
+begin
|
|
|
+ Result := AddObject(S, nil);
|
|
|
+end;
|
|
|
+
|
|
|
+function TStringList.AddObject(const S: string; AObject: TObject): Integer;
|
|
|
+
|
|
|
begin
|
|
|
If (SortStyle<>sslAuto) then
|
|
|
Result:=FCount
|
|
|
else
|
|
|
If Find (S,Result) then
|
|
|
- Case DUplicates of
|
|
|
+ Case Duplicates of
|
|
|
DupIgnore : Exit;
|
|
|
DupError : Error(SDuplicateString,0)
|
|
|
end;
|
|
|
- InsertItem (Result,S);
|
|
|
+ InsertItem (Result,S,AObject);
|
|
|
end;
|
|
|
|
|
|
procedure TStringList.Clear;
|