修复一个表格跨页bug

This commit is contained in:
csh 2024-06-26 14:26:05 +08:00
parent b042283ebb
commit 011774cfc1
1 changed files with 1 additions and 4 deletions

View File

@ -104,8 +104,6 @@ begin
range := nil; range := nil;
if element.LocalName = "p" then if element.LocalName = "p" then
begin begin
if element.w14paraId="5CEC646C" then
println("???????????");
range := new TSPdfParagraphRange(docx_to_pdf_, page_, docx_components_, sect_ware_, element); range := new TSPdfParagraphRange(docx_to_pdf_, page_, docx_components_, sect_ware_, element);
range.SetExtraStyleId(tbl_pr.TblStyle.Val); range.SetExtraStyleId(tbl_pr.TblStyle.Val);
end end
@ -131,14 +129,13 @@ begin
// 判定是否跨页 // 判定是否跨页
total_height := max_height + tbl_pr.TblCellMar.Top.W + tbl_pr.TblCellMar.Bottom.W; total_height := max_height + tbl_pr.TblCellMar.Top.W + tbl_pr.TblCellMar.Bottom.W;
surplus := total_height - (point_.Y - sect_ware_.SectPr.PgMar.Bottom); surplus := total_height - (point_.Y - sect_ware_.SectPr.PgMar.Bottom);
if not tc_h and not self.H and surplus > 0 then if not self.H and surplus > 0 then
begin begin
for _,range in rows_range_array do for _,range in rows_range_array do
range.H := point_.Y - sect_ware_.SectPr.PgMar.Bottom; range.H := point_.Y - sect_ware_.SectPr.PgMar.Bottom;
span := sect_ware_.SectPr.PgSz.H - sect_ware_.SectPr.PgMar.Top - sect_ware_.SectPr.PgMar.Bottom; span := sect_ware_.SectPr.PgSz.H - sect_ware_.SectPr.PgMar.Top - sect_ware_.SectPr.PgMar.Bottom;
quotient := surplus div span; quotient := surplus div span;
remainder := surplus % span; remainder := surplus % span;
println("page_ = {}, quotient = {}, remainder = {}", page_, quotient, remainder);
page := page_; page := page_;
tc_y := point_.Y; tc_y := point_.Y;
i := 0; i := 0;