Compare commits
No commits in common. "3b16e6969fccb829bf6ab8be03fba9bd12f3be1a" and "b1cb66fd48e6268b0a8cd4bfc4d5c419189f08b6" have entirely different histories.
3b16e6969f
...
b1cb66fd48
|
|
@ -269,8 +269,7 @@ begin
|
||||||
current_page_ := new TSPage();
|
current_page_ := new TSPage();
|
||||||
current_page_.Index := len;
|
current_page_.Index := len;
|
||||||
current_page_.PdfPage := page;
|
current_page_.PdfPage := page;
|
||||||
current_page_.Number := flag ? ifnil(sect_ware_.SectPr.PgNumType.Start) ? 1 : sect_ware_.SectPr.PgNumType.Start : page_array_[len-1].Number + 1;
|
current_page_.Number := flag ? sect_ware_.SectPr.PgNumType.Start : page_array_[len-1].Number + 1;
|
||||||
// println("len = {}, Number = {}", len, current_page_.Number);
|
|
||||||
page_array_[len] := current_page_;
|
page_array_[len] := current_page_;
|
||||||
|
|
||||||
// 页眉页脚
|
// 页眉页脚
|
||||||
|
|
|
||||||
|
|
@ -268,26 +268,22 @@ begin
|
||||||
begin
|
begin
|
||||||
if tbl_pr_.TblBorders.Top then
|
if tbl_pr_.TblBorders.Top then
|
||||||
begin
|
begin
|
||||||
if not tc_pr_unit_decorator_.TcBorders.Top then
|
tc_pr_unit_decorator_.TcBorders.Top.Copy(tbl_pr_.TblBorders.Top);
|
||||||
tc_pr_unit_decorator_.TcBorders.Top.Copy(tbl_pr_.TblBorders.Top);
|
|
||||||
range.Top := true;
|
range.Top := true;
|
||||||
end
|
end
|
||||||
if tbl_pr_.TblBorders.InsideH and {self.}VMerge <> parent_.Rows()-1 then
|
if tbl_pr_.TblBorders.InsideH and {self.}VMerge <> parent_.Rows()-1 then
|
||||||
begin
|
begin
|
||||||
if not tc_pr_unit_decorator_.TcBorders.Bottom then
|
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.InsideH);
|
||||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.InsideH);
|
|
||||||
range.Bottom := true;
|
range.Bottom := true;
|
||||||
end
|
end
|
||||||
if tbl_pr_.TblBorders.InsideV and {self.}Col <> parent_.Cols()-1 then
|
if tbl_pr_.TblBorders.InsideV and {self.}Col <> parent_.Cols()-1 then
|
||||||
begin
|
begin
|
||||||
if not tc_pr_unit_decorator_.TcBorders.Right then
|
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.InsideV);
|
||||||
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.InsideV);
|
|
||||||
range.Right := true;
|
range.Right := true;
|
||||||
end
|
end
|
||||||
if tbl_pr_.TblBorders.Bottom and {self.}VMerge = parent_.Rows()-1 then
|
if tbl_pr_.TblBorders.Bottom and {self.}VMerge = parent_.Rows()-1 then
|
||||||
begin
|
begin
|
||||||
if not tc_pr_unit_decorator_.TcBorders.Bottom then
|
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.Bottom);
|
||||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.Bottom);
|
|
||||||
range.Bottom := true;
|
range.Bottom := true;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -295,34 +291,29 @@ begin
|
||||||
begin
|
begin
|
||||||
if tbl_pr_.TblBorders.Bottom then
|
if tbl_pr_.TblBorders.Bottom then
|
||||||
begin
|
begin
|
||||||
if not tc_pr_unit_decorator_.TcBorders.Bottom then
|
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.Bottom);
|
||||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.Bottom);
|
|
||||||
range.Bottom := true;
|
range.Bottom := true;
|
||||||
end
|
end
|
||||||
if tbl_pr_.TblBorders.InsideV and {self.}Col <> parent_.Cols()-1 then
|
if tbl_pr_.TblBorders.InsideV and {self.}Col <> parent_.Cols()-1 then
|
||||||
begin
|
begin
|
||||||
if not tc_pr_unit_decorator_.TcBorders.Right then
|
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.InsideV);
|
||||||
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.InsideV);
|
|
||||||
range.Right := true;
|
range.Right := true;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
if tbl_pr_.TblBorders.Bottom and {self.}VMerge = parent_.Rows()-1 then
|
if tbl_pr_.TblBorders.Bottom and {self.}VMerge = parent_.Rows()-1 then
|
||||||
begin
|
begin
|
||||||
if not tc_pr_unit_decorator_.TcBorders.Bottom then
|
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.Bottom);
|
||||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.Bottom);
|
|
||||||
range.Bottom := true;
|
range.Bottom := true;
|
||||||
end
|
end
|
||||||
if tbl_pr_.TblBorders.InsideH and {self.}VMerge <> parent_.Rows()-1 then
|
if tbl_pr_.TblBorders.InsideH and {self.}VMerge <> parent_.Rows()-1 then
|
||||||
begin
|
begin
|
||||||
if not tc_pr_unit_decorator_.TcBorders.Bottom then
|
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.InsideH);
|
||||||
tc_pr_unit_decorator_.TcBorders.Bottom.Copy(tbl_pr_.TblBorders.InsideH);
|
|
||||||
range.Bottom := true;
|
range.Bottom := true;
|
||||||
end
|
end
|
||||||
if tbl_pr_.TblBorders.InsideV and {self.}Col <> parent_.Cols()-1 then
|
if tbl_pr_.TblBorders.InsideV and {self.}Col <> parent_.Cols()-1 then
|
||||||
begin
|
begin
|
||||||
if not tc_pr_unit_decorator_.TcBorders.Right then
|
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.InsideV);
|
||||||
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.InsideV);
|
|
||||||
range.Right := true;
|
range.Right := true;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -331,8 +322,7 @@ begin
|
||||||
begin
|
begin
|
||||||
if tbl_pr_.TblBorders.Left then
|
if tbl_pr_.TblBorders.Left then
|
||||||
begin
|
begin
|
||||||
if not tc_pr_unit_decorator_.TcBorders.Left then
|
tc_pr_unit_decorator_.TcBorders.Left.Copy(tbl_pr_.TblBorders.Left);
|
||||||
tc_pr_unit_decorator_.TcBorders.Left.Copy(tbl_pr_.TblBorders.Left);
|
|
||||||
range.Left := true;
|
range.Left := true;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -340,8 +330,7 @@ begin
|
||||||
begin
|
begin
|
||||||
if tbl_pr_.TblBorders.Right then
|
if tbl_pr_.TblBorders.Right then
|
||||||
begin
|
begin
|
||||||
if not tc_pr_unit_decorator_.TcBorders.Right then
|
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.Right);
|
||||||
tc_pr_unit_decorator_.TcBorders.Right.Copy(tbl_pr_.TblBorders.Right);
|
|
||||||
range.Right := true;
|
range.Right := true;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -28,29 +28,16 @@ end;
|
||||||
function TSPdfBordersRange.Do();override;
|
function TSPdfBordersRange.Do();override;
|
||||||
begin
|
begin
|
||||||
// println("Left = {}, Top = {}, Right = {}, Bottom = {}, Tl2Br = {}, Tr2Bl = {}", Left, Top, Right, Bottom, Tl2Br, Tr2Bl);
|
// println("Left = {}, Top = {}, Right = {}, Bottom = {}, Tl2Br = {}, Tr2Bl = {}", Left, Top, Right, Bottom, Tl2Br, Tr2Bl);
|
||||||
borders := {self.}TcPr.TcBorders;
|
|
||||||
if {self.}TcPr.Shd.Fill and {self.}TcPr.Shd.Fill <> "auto" then
|
if {self.}TcPr.Shd.Fill and {self.}TcPr.Shd.Fill <> "auto" then
|
||||||
begin
|
begin
|
||||||
[r, g, b] := TSColorToolKit.HexToRGB({self.}TcPr.Shd.Fill);
|
[r, g, b] := TSColorToolKit.HexToRGB({self.}TcPr.Shd.Fill);
|
||||||
{self.}TSPage.PdfPage.SetRGBFill(r/255, g/255, b/255);
|
{self.}TSPage.PdfPage.SetRGBFill(r/255, g/255, b/255);
|
||||||
x := {self.}EndX;
|
{self.}TSPage.PdfPage.Rectangle({self.}EndX, {self.}EndY - {self.}DynamicHeight, {self.}Width, {self.}DynamicHeight);
|
||||||
y := {self.}EndY - {self.}DynamicHeight;
|
|
||||||
w := {self.}Width;
|
|
||||||
h := {self.}DynamicHeight;
|
|
||||||
tmp := borders.Left.Sz ? borders.Left.Sz / 2 : 0.25;
|
|
||||||
x += tmp;
|
|
||||||
w -= tmp;
|
|
||||||
w -= borders.Right.Sz ? borders.Right.Sz / 2 : 0.25;
|
|
||||||
tmp := borders.Bottom.Sz ? borders.Bottom.Sz / 2 : 0.25;
|
|
||||||
y += tmp;
|
|
||||||
h -= tmp;
|
|
||||||
h -= borders.Top.Sz ? borders.Top.Sz / 2 : 0.25;
|
|
||||||
|
|
||||||
{self.}TSPage.PdfPage.Rectangle(x, y, w, h);
|
|
||||||
{self.}TSPage.PdfPage.Fill();
|
{self.}TSPage.PdfPage.Fill();
|
||||||
{self.}TSPage.PdfPage.SetRGBFill(0, 0, 0);
|
{self.}TSPage.PdfPage.SetRGBFill(0, 0, 0);
|
||||||
{self.}Left := true;
|
{self.}Left := true;
|
||||||
end
|
end
|
||||||
|
borders := {self.}TcPr.TcBorders;
|
||||||
if {self.}Left then
|
if {self.}Left then
|
||||||
{self.}DrawLine(borders.Left, {self.}EndX, {self.}EndY, {self.}EndX, {self.}EndY - {self.}DynamicHeight);
|
{self.}DrawLine(borders.Left, {self.}EndX, {self.}EndY, {self.}EndX, {self.}EndY - {self.}DynamicHeight);
|
||||||
if {self.}Top then
|
if {self.}Top then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue