新增修改docx页码接口UpdateDocxPageNumpages,以及保存修改docx文件接口SaveDocxFile

This commit is contained in:
csh
2024-11-20 17:08:13 +08:00
parent 8ab1670eea
commit 0437961953
2 changed files with 60 additions and 13 deletions
+21 -6
View File
@@ -316,15 +316,30 @@ function TSPdfParagraphRange.HyperlinkToTextRange(hyperlink: Hyperlink; ppr: PPr
begin
i := length(range_array_);
rs := hyperlink.Rs();
char_type := false;
separate := false;
for _,r in rs do
begin
if r.FldChar.FldCharType = "begin" then break;
if r.FldChar.FldCharType = "begin" then char_type := true;
// TODOofficexml项目是否应该保留赋值接口,如何统一
if ifnil(r.XmlChildRPr) then r.XmlChildRPr := new RPr();
// r.RPr := new RPr();
{self.}SetRPr(r.RPr, ppr_unit_decorator_);
r.RPr.Color.Val := nil;
{self.}RToTextRange(r, hyperlink.Anchor);
if char_type then
begin
if r.FldChar.FldCharType = "separate" then
begin
separate := true;
continue;
end
if r.FldChar.FldCharType = "end" then
separate := char_type := false;
if separate then
docx_to_pdf_.AddDocxPage(hyperlink.Anchor, r);
end
else begin
if ifnil(r.XmlChildRPr) then r.XmlChildRPr := new RPr();
{self.}SetRPr(r.RPr, ppr_unit_decorator_);
r.RPr.Color.Val := nil;
{self.}RToTextRange(r, hyperlink.Anchor);
end
end
arr := array();
while i < length(range_array_) do