Skip to content

Commit

Permalink
Fix #1067
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyqus committed Aug 23, 2023
1 parent af29ddd commit ae54569
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 2 additions & 4 deletions OpenXmlFormats/Shared/Math.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,7 @@ internal void Write(StreamWriter sw, string nodeName)
{
sw.Write(string.Format("<m:{0}", nodeName));
XmlHelper.WriteAttribute(sw, "m:val", this.val);
sw.Write(">");
sw.Write(string.Format("</m:{0}>", nodeName));
sw.Write("/>");
}

[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
Expand Down Expand Up @@ -448,8 +447,7 @@ internal void Write(StreamWriter sw, string nodeName)
{
sw.Write(string.Format("<m:{0}", nodeName));
XmlHelper.WriteAttribute(sw, "m:val", this.val.ToString());
sw.Write(">");
sw.Write(string.Format("</m:{0}>", nodeName));
sw.Write("/>");
}

private ST_LimLoc valField;
Expand Down
11 changes: 7 additions & 4 deletions OpenXmlFormats/Wordprocessing/HdrFtr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,17 @@ internal void Write(StreamWriter sw, string nodeName)
sw.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
sw.Write(string.Format("<w:{0} ", nodeName));
sw.Write("xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" ");
sw.Write("xmlns:cx=\"http://schemas.microsoft.com/office/drawing/2014/chartex\" xmlns:cx1=\"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex\" xmlns:cx2=\"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex\" xmlns:cx3=\"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex\" xmlns:cx4=\"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex\" xmlns:cx5=\"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex\" xmlns:cx6=\"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex\" xmlns:cx7=\"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex\" xmlns:cx8=\"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex\" ");
sw.Write("xmlns:aink=\"http://schemas.microsoft.com/office/drawing/2016/ink\" xmlns:am3d=\"http://schemas.microsoft.com/office/drawing/2017/model3d\" ");
//sw.Write("xmlns:ve=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" ");
sw.Write("xmlns:o=\"urn:schemas-microsoft-com:office:office\" ");
sw.Write("xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:oel=\"http://schemas.microsoft.com/office/2019/extlst\" ");
sw.Write("xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" ");
sw.Write("xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" ");
sw.Write("xmlns:w10=\"urn:schemas-microsoft-com:office:word\" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" ");
sw.Write("xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" xmlns:w15=\"http://schemas.microsoft.com/office/word/2012/wordml\" ");
sw.Write("xmlns:wpg=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\" xmlns:wpi=\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\" xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\"");
sw.Write(">");
sw.Write("xmlns:w16cex=\"http://schemas.microsoft.com/office/word/2018/wordml/cex\" xmlns:w16cid=\"http://schemas.microsoft.com/office/word/2016/wordml/cid\" xmlns:w16=\"http://schemas.microsoft.com/office/word/2018/wordml\" xmlns:w16du=\"http://schemas.microsoft.com/office/word/2023/wordml/word16du\" xmlns:w16sdtdh=\"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash\" xmlns:w16se=\"http://schemas.microsoft.com/office/word/2015/wordml/symex\" ");
sw.Write("xmlns:wpg=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\" xmlns:wpi=\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\" xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\" xmlns:wps=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\" ");
sw.Write("mc:Ignorable=\"w14 w15 w16se w16cid w16 w16cex w16sdtdh wp14\">");
foreach (object o in this.Items)
{
if (o is CT_TrackChange)
Expand Down Expand Up @@ -1031,7 +1034,7 @@ internal void Write(StreamWriter sw, string nodeName)
{
sw.Write(string.Format("<w:{0}", nodeName));
XmlHelper.WriteAttribute(sw, "w:type", this.type.ToString());
XmlHelper.WriteAttribute(sw, "w:id", this.id);
XmlHelper.WriteAttribute(sw, "w:id", this.id, true);
sw.Write(">");
int i = 0;
foreach (object o in this.Items)
Expand Down

0 comments on commit ae54569

Please sign in to comment.