表格边框优化
This commit is contained in:
@@ -268,22 +268,26 @@ begin
|
||||
begin
|
||||
if tbl_pr_.TblBorders.Top then
|
||||
begin
|
||||
tc_pr_unit_decorator_.TcBorders.Top.Copy(tbl_pr_.TblBorders.Top);
|
||||
if not tc_pr_unit_decorator_.TcBorders.Top then
|
||||
tc_pr_unit_decorator_.TcBorders.Top.Copy(tbl_pr_.TblBorders.Top);
|
||||
range.Top := true;
|
||||
end
|
||||
if tbl_pr_.TblBorders.InsideH and {self.}VMerge <> parent_.Rows()-1 then
|
||||
begin
|
||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.InsideH);
|
||||
if not tc_pr_unit_decorator_.TcBorders.Bottom then
|
||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.InsideH);
|
||||
range.Bottom := true;
|
||||
end
|
||||
if tbl_pr_.TblBorders.InsideV and {self.}Col <> parent_.Cols()-1 then
|
||||
begin
|
||||
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.InsideV);
|
||||
if not tc_pr_unit_decorator_.TcBorders.Right then
|
||||
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.InsideV);
|
||||
range.Right := true;
|
||||
end
|
||||
if tbl_pr_.TblBorders.Bottom and {self.}VMerge = parent_.Rows()-1 then
|
||||
begin
|
||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.Bottom);
|
||||
if not tc_pr_unit_decorator_.TcBorders.Bottom then
|
||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.Bottom);
|
||||
range.Bottom := true;
|
||||
end
|
||||
end
|
||||
@@ -291,29 +295,34 @@ begin
|
||||
begin
|
||||
if tbl_pr_.TblBorders.Bottom then
|
||||
begin
|
||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.Bottom);
|
||||
if not tc_pr_unit_decorator_.TcBorders.Bottom then
|
||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.Bottom);
|
||||
range.Bottom := true;
|
||||
end
|
||||
if tbl_pr_.TblBorders.InsideV and {self.}Col <> parent_.Cols()-1 then
|
||||
begin
|
||||
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.InsideV);
|
||||
if not tc_pr_unit_decorator_.TcBorders.Right then
|
||||
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.InsideV);
|
||||
range.Right := true;
|
||||
end
|
||||
end
|
||||
else begin
|
||||
if tbl_pr_.TblBorders.Bottom and {self.}VMerge = parent_.Rows()-1 then
|
||||
begin
|
||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.Bottom);
|
||||
if not tc_pr_unit_decorator_.TcBorders.Bottom then
|
||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.Bottom);
|
||||
range.Bottom := true;
|
||||
end
|
||||
if tbl_pr_.TblBorders.InsideH and {self.}VMerge <> parent_.Rows()-1 then
|
||||
begin
|
||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.InsideH);
|
||||
if not tc_pr_unit_decorator_.TcBorders.Bottom then
|
||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.InsideH);
|
||||
range.Bottom := true;
|
||||
end
|
||||
if tbl_pr_.TblBorders.InsideV and {self.}Col <> parent_.Cols()-1 then
|
||||
begin
|
||||
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.InsideV);
|
||||
if not tc_pr_unit_decorator_.TcBorders.Right then
|
||||
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.InsideV);
|
||||
range.Right := true;
|
||||
end
|
||||
end
|
||||
@@ -322,7 +331,8 @@ begin
|
||||
begin
|
||||
if tbl_pr_.TblBorders.Left then
|
||||
begin
|
||||
tc_pr_unit_decorator_.TcBorders.Left.Copy(tbl_pr_.TblBorders.Left);
|
||||
if not tc_pr_unit_decorator_.TcBorders.Left then
|
||||
tc_pr_unit_decorator_.TcBorders.Left.Copy(tbl_pr_.TblBorders.Left);
|
||||
range.Left := true;
|
||||
end
|
||||
end
|
||||
@@ -330,7 +340,8 @@ begin
|
||||
begin
|
||||
if tbl_pr_.TblBorders.Right then
|
||||
begin
|
||||
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.Right);
|
||||
if not tc_pr_unit_decorator_.TcBorders.Right then
|
||||
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.Right);
|
||||
range.Right := true;
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user