Skip to content

Commit

Permalink
fix inserted Picture not shown in docx
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyqus committed Sep 27, 2020
1 parent b5617ca commit 26c38ef
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OpenXmlFormats/Drawing/WordprocessingDrawing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public static CT_NonVisualDrawingProps Parse(XmlNode node, XmlNamespaceManager n
internal void Write(StreamWriter sw, string nodeName)
{
sw.Write(string.Format("<wp:{0}", nodeName));
XmlHelper.WriteAttribute(sw, "id", this.id);
XmlHelper.WriteAttribute(sw, "id", this.id, true);
XmlHelper.WriteAttribute(sw, "name", this.name);
XmlHelper.WriteAttribute(sw, "descr", this.descr);
if(this.hidden)
Expand Down
1 change: 0 additions & 1 deletion OpenXmlFormats/Wordprocessing/Document.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ public class CT_Body

public CT_Body()
{
this.sectPrField = new CT_SectPr();
this.itemsElementNameField = new List<DocumentBodyItemChoiceType>();
this.itemsField = new ArrayList();
}
Expand Down
2 changes: 1 addition & 1 deletion ooxml/XWPF/Usermodel/XWPFDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class XWPFDocument : POIXMLDocument, Document, IBody
/**
* Keeps track on all id-values used in this document and included parts, like headers, footers, etc.
*/
private IdentifierManager drawingIdManager = new IdentifierManager(0L, 4294967295L);
private IdentifierManager drawingIdManager = new IdentifierManager(1L, 4294967295L);
protected List<XWPFFooter> footers = new List<XWPFFooter>();
protected List<XWPFHeader> headers = new List<XWPFHeader>();
protected List<XWPFComment> comments = new List<XWPFComment>();
Expand Down

0 comments on commit 26c38ef

Please sign in to comment.