TLogEntry.GetFileList takes an optional parameter BaseDir

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@116 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
vsnijders
2007-03-05 07:29:39 +00:00
parent 7a193d82da
commit 280e661bef

View File

@ -149,11 +149,11 @@ type
function GetLogPath(index: integer): TLogPath; function GetLogPath(index: integer): TLogPath;
function GetLogPathCount: integer; function GetLogPathCount: integer;
procedure LoadFromNode(ANode: TDOMElement); procedure LoadFromNode(ANode: TDOMElement);
procedure SortPaths;
public public
constructor Create; constructor Create;
destructor Destroy; override; destructor Destroy; override;
function GetFileList: TStrings; function GetFileList(const BaseDir: string = ''): TStrings;
procedure SortPaths;
property Author: string read FAuthor write FAuthor; property Author: string read FAuthor write FAuthor;
property CommonPath: string read GetCommonPath; property CommonPath: string read GetCommonPath;
property Date: string read FDate write FDate; property Date: string read FDate write FDate;
@ -460,13 +460,13 @@ begin
end; end;
end; end;
function TLogEntry.GetFileList: TStrings; function TLogEntry.GetFileList(const BaseDir: string = ''): TStrings;
var var
i: integer; i: integer;
begin begin
Result := TStringList.Create; Result := TStringList.Create;
for i:= 0 to PathCount -1 do for i:= 0 to PathCount -1 do
Result.Add(Path[i].Path); Result.Add(BaseDir + Path[i].Path);
end; end;
function TLogEntry.GetLogPathCount: integer; function TLogEntry.GetLogPathCount: integer;
@ -596,6 +596,7 @@ begin
Lines := TStringList.Create; Lines := TStringList.Create;
try try
Lines.LoadFromStream(s); Lines.LoadFromStream(s);
writeln(Lines.Text);
i := 0; i := 0;
while (i<Lines.Count) do begin while (i<Lines.Count) do begin
Line := Lines[i]; Line := Lines[i];