1. 修复文档的生成

2. 修复InlineShapes.Count
This commit is contained in:
csh 2024-02-01 15:07:54 +08:00
parent 3ba20a7c5e
commit dffa3f8192
3 changed files with 4 additions and 2 deletions

Binary file not shown.

View File

@ -441,7 +441,8 @@ Begin
if result[0][4] then rw["w"] := 1; if result[0][4] then rw["w"] := 1;
properties[result[0][1]] := rw; properties[result[0][1]] := rw;
end end
if AnsiContainsText(line, "End;") then break; if StartsText("End;", line) then break;
// if AnsiContainsText(line, "End;") then break;
end end
for j:=i to length(lines)-1 do for j:=i to length(lines)-1 do
begin begin

View File

@ -38,6 +38,7 @@ Begin
docx_ := docx; docx_ := docx;
inline_shapes_ := array(); inline_shapes_ := array();
document_ := self.Parent; document_ := self.Parent;
self.SerializeInlineShapes();
End; End;
Function Operator TSDocxInlineShapes.[](index); Function Operator TSDocxInlineShapes.[](index);
@ -54,7 +55,7 @@ Begin
for i:=1 to num do for i:=1 to num do
begin begin
paragraph := paragraphs.Item(i); paragraph := paragraphs.Item(i);
node := paragraph.Object(); node := paragraph.Object().Root();
if ifObj(node) then if ifObj(node) then
begin begin
run := node.FirstChildElement("w:r"); run := node.FirstChildElement("w:r");