mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 09:59:29 +02:00
* Fixed bug #14858 where chmsitemap could not properly read a file
git-svn-id: trunk@13947 -
This commit is contained in:
parent
2dd66cc265
commit
dd72603442
@ -124,6 +124,7 @@ type
|
||||
FUseFolderImages: Boolean;
|
||||
FWindowName: String;
|
||||
FLevel: Integer;
|
||||
FLevelForced: Boolean;
|
||||
FWindowStyles: LongInt;
|
||||
procedure SetItems(const AValue: TChmSiteMapItems);
|
||||
protected
|
||||
@ -202,7 +203,7 @@ begin
|
||||
else begin // looking for /HTML
|
||||
if TagName = '/HTML' then Exclude(FSiteMapTags, smtHTML);
|
||||
end;}
|
||||
|
||||
|
||||
//if (smtHTML in FSiteMapTags) then begin
|
||||
if not (smtBODY in FSiteMapTags) then begin
|
||||
if TagName = 'BODY' then Include(FSiteMapTags, smtBODY);
|
||||
@ -210,7 +211,7 @@ begin
|
||||
else begin
|
||||
if TagName = '/BODY' then Exclude(FSiteMapTags, smtBODY);
|
||||
end;
|
||||
|
||||
|
||||
if (smtBODY in FSiteMapTags) then begin
|
||||
//WriteLn('GOT TAG: ', AActualTag);
|
||||
if TagName = 'UL' then begin
|
||||
@ -221,16 +222,26 @@ begin
|
||||
//WriteLN('Dec Level');
|
||||
DecreaseULevel;
|
||||
end
|
||||
else if (TagName = 'LI') and (FLevel = 0) then
|
||||
FLevelForced := True
|
||||
else if TagName = 'OBJECT' then begin
|
||||
Include(FSiteMapBodyTags, smbtOBJECT);
|
||||
if FLevelForced then
|
||||
IncreaseULevel;
|
||||
If FLevel > 0 then // if it is zero it is the site properties
|
||||
NewSiteMapItem;
|
||||
end
|
||||
else if TagName = '/OBJECT' then begin
|
||||
Exclude(FSiteMapBodyTags, smbtOBJECT);
|
||||
if FLevelForced then
|
||||
begin
|
||||
DecreaseULevel;
|
||||
FLevelForced := False;
|
||||
end;
|
||||
end
|
||||
else begin // we are the properties of the object tag
|
||||
if (smbtOBJECT in FSiteMapBodyTags) then begin
|
||||
if (FLevel > 0 ) and (smbtOBJECT in FSiteMapBodyTags) then begin
|
||||
|
||||
if LowerCase(GetTagName(AActualTag)) = 'param' then begin
|
||||
|
||||
TagAttributeName := GetVal(AActualTag, 'name');
|
||||
|
Loading…
Reference in New Issue
Block a user