mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 06:59:14 +02:00
fpvectorial-html: Sets border to none when there is no border attribute
git-svn-id: trunk@48923 -
This commit is contained in:
parent
389df5cdfe
commit
662f81c5c1
@ -317,12 +317,26 @@ var
|
|||||||
// attributes
|
// attributes
|
||||||
i, lBorderNr: Integer;
|
i, lBorderNr: Integer;
|
||||||
lAttrName, lAttrValue: DOMString;
|
lAttrName, lAttrValue: DOMString;
|
||||||
|
|
||||||
|
procedure SetBorderLineType(AType: TvTableBorderType);
|
||||||
|
begin
|
||||||
|
CurTable.Borders.Left.LineType := AType;
|
||||||
|
CurTable.Borders.Right.LineType := AType;
|
||||||
|
CurTable.Borders.Top.LineType := AType;
|
||||||
|
CurTable.Borders.Bottom.LineType := AType;
|
||||||
|
CurTable.Borders.InsideHoriz.LineType := AType;
|
||||||
|
CurTable.Borders.InsideVert.LineType := AType;
|
||||||
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := nil;
|
Result := nil;
|
||||||
CurTable := AData.AddTable();
|
CurTable := AData.AddTable();
|
||||||
CurTable.CellSpacingLeft := 3;
|
CurTable.CellSpacingLeft := 3;
|
||||||
CurTable.CellSpacingTop := 2;
|
CurTable.CellSpacingTop := 2;
|
||||||
|
|
||||||
|
// Default to no border without "border" attribute
|
||||||
|
SetBorderLineType(tbtNone);
|
||||||
|
|
||||||
// table attributes
|
// table attributes
|
||||||
for i := 0 to ANode.Attributes.Length - 1 do
|
for i := 0 to ANode.Attributes.Length - 1 do
|
||||||
begin
|
begin
|
||||||
@ -342,14 +356,7 @@ begin
|
|||||||
CurTable.Borders.InsideVert.Width := lBorderNr;
|
CurTable.Borders.InsideVert.Width := lBorderNr;
|
||||||
|
|
||||||
if lBorderNr = 0 then
|
if lBorderNr = 0 then
|
||||||
begin
|
SetBorderLineType(tbtNone);
|
||||||
CurTable.Borders.Left.LineType := tbtNone;
|
|
||||||
CurTable.Borders.Right.LineType := tbtNone;
|
|
||||||
CurTable.Borders.Top.LineType := tbtNone;
|
|
||||||
CurTable.Borders.Bottom.LineType := tbtNone;
|
|
||||||
CurTable.Borders.InsideHoriz.LineType := tbtNone;
|
|
||||||
CurTable.Borders.InsideVert.LineType := tbtNone;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user