支持`range.insertfile`
This commit is contained in:
parent
1ac447c94e
commit
3ba20a7c5e
Binary file not shown.
|
|
@ -84,7 +84,7 @@ Begin
|
|||
paragraph := Range.InsertNewParagraph();
|
||||
pic := docx_.AddPicture(picture, paragraph.Object());
|
||||
document_.Paragraphs.AddParagraph(paragraph.Index(), pic.Root());
|
||||
paragraph.Range.Clear(true);
|
||||
paragraph.Range.Delete();
|
||||
self.SerializeInlineShapes();
|
||||
run := pic.Root().FirstChildElement("w:r");
|
||||
trun := TOfficeObj("TRun");
|
||||
|
|
|
|||
|
|
@ -785,3 +785,13 @@ Function TSDocxRange.ReadStart();
|
|||
Begin
|
||||
return range_obj_.GetStart();
|
||||
End;
|
||||
|
||||
Function TSDocxRange.InsertFile(FileName, Range, ConfirmConversions, Link, Attachment);
|
||||
Begin
|
||||
alias := "";
|
||||
paragraph := self.InsertNewParagraph();
|
||||
docx_.InsertFile(alias, FileName, paragraph.Root());
|
||||
paragraph.Range.Delete();
|
||||
document_.Paragraphs.Init(docx_);
|
||||
End;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue