* Patch from bug #25062 fixing parsing of coordinates within [] in windows section of hhp

git-svn-id: trunk@25526 -
This commit is contained in:
marco 2013-09-21 12:29:20 +00:00
parent 661e11ecb8
commit 03ac735bb9

View File

@ -486,6 +486,7 @@ var ind,len,
j,k : integer; j,k : integer;
arr : array[0..3] of integer; arr : array[0..3] of integer;
s2 : string; s2 : string;
bArr : Boolean;
begin begin
j:=pos('=',txt); j:=pos('=',txt);
if j>0 then if j>0 then
@ -504,17 +505,35 @@ begin
nav_style :=getnextint(txt,ind,len,flags,valid_navigation_pane_style); nav_style :=getnextint(txt,ind,len,flags,valid_navigation_pane_style);
navpanewidth :=getnextint(txt,ind,len,flags,valid_navigation_pane_width); navpanewidth :=getnextint(txt,ind,len,flags,valid_navigation_pane_width);
buttons :=getnextint(txt,ind,len,flags,valid_buttons); buttons :=getnextint(txt,ind,len,flags,valid_buttons);
(* initialize arr[] *)
arr[0] :=0;
arr[1] :=0;
arr[2] :=0;
arr[3] :=0;
k:=0; k:=0;
repeat bArr := False;
s2:=getnext(txt,ind,len); (* "[" int,int,int,int "]", |, *)
if (length(s2)>0) and (s2[1]='[') then delete(s2,1,1); s2:=getnext(txt,ind,len);
j:=pos(']',s2); if length(s2)>0 then begin
if j>0 then delete(s2,j,1); (* check if first chart is "[" *)
if length(trim(s2))>0 then if (s2[1]='[') then begin
include(flags,valid_tab_position); delete(s2,1,1);
arr[k]:=strtointdef(s2,0); bArr := True;
inc(k); end;
until (j<>0) or (ind>len); (* looking for a max 4 int followed by a closing "]" *)
repeat
if k > 0 then s2:=getnext(txt,ind,len);
j:=pos(']',s2);
if j>0 then delete(s2,j,1);
if length(trim(s2))>0 then
include(flags,valid_tab_position);
arr[k]:=strtointdef(s2,0);
inc(k);
until (bArr <> True) or (j<>0) or (ind>len);
end;
left :=arr[0]; left :=arr[0];
top :=arr[1]; top :=arr[1];
right :=arr[2]; right :=arr[2];