支持range.insertfile
This commit is contained in:
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user