mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 14:31:35 +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;
|
FUseFolderImages: Boolean;
|
||||||
FWindowName: String;
|
FWindowName: String;
|
||||||
FLevel: Integer;
|
FLevel: Integer;
|
||||||
|
FLevelForced: Boolean;
|
||||||
FWindowStyles: LongInt;
|
FWindowStyles: LongInt;
|
||||||
procedure SetItems(const AValue: TChmSiteMapItems);
|
procedure SetItems(const AValue: TChmSiteMapItems);
|
||||||
protected
|
protected
|
||||||
@ -221,16 +222,26 @@ begin
|
|||||||
//WriteLN('Dec Level');
|
//WriteLN('Dec Level');
|
||||||
DecreaseULevel;
|
DecreaseULevel;
|
||||||
end
|
end
|
||||||
|
else if (TagName = 'LI') and (FLevel = 0) then
|
||||||
|
FLevelForced := True
|
||||||
else if TagName = 'OBJECT' then begin
|
else if TagName = 'OBJECT' then begin
|
||||||
Include(FSiteMapBodyTags, smbtOBJECT);
|
Include(FSiteMapBodyTags, smbtOBJECT);
|
||||||
|
if FLevelForced then
|
||||||
|
IncreaseULevel;
|
||||||
If FLevel > 0 then // if it is zero it is the site properties
|
If FLevel > 0 then // if it is zero it is the site properties
|
||||||
NewSiteMapItem;
|
NewSiteMapItem;
|
||||||
end
|
end
|
||||||
else if TagName = '/OBJECT' then begin
|
else if TagName = '/OBJECT' then begin
|
||||||
Exclude(FSiteMapBodyTags, smbtOBJECT);
|
Exclude(FSiteMapBodyTags, smbtOBJECT);
|
||||||
|
if FLevelForced then
|
||||||
|
begin
|
||||||
|
DecreaseULevel;
|
||||||
|
FLevelForced := False;
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
else begin // we are the properties of the object tag
|
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
|
if LowerCase(GetTagName(AActualTag)) = 'param' then begin
|
||||||
|
|
||||||
TagAttributeName := GetVal(AActualTag, 'name');
|
TagAttributeName := GetVal(AActualTag, 'name');
|
||||||
|
Loading…
Reference in New Issue
Block a user