From ae545693a978e6c1ecbccc081e1b3886defea0e7 Mon Sep 17 00:00:00 2001 From: Tony Qu Date: Sat, 12 Aug 2023 07:49:10 +0800 Subject: [PATCH] Fix #1067 --- OpenXmlFormats/Shared/Math.cs | 6 ++---- OpenXmlFormats/Wordprocessing/HdrFtr.cs | 11 +++++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/OpenXmlFormats/Shared/Math.cs b/OpenXmlFormats/Shared/Math.cs index b49742489..6fce24915 100644 --- a/OpenXmlFormats/Shared/Math.cs +++ b/OpenXmlFormats/Shared/Math.cs @@ -407,8 +407,7 @@ internal void Write(StreamWriter sw, string nodeName) { sw.Write(string.Format(""); - sw.Write(string.Format("", nodeName)); + sw.Write("/>"); } [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)] @@ -448,8 +447,7 @@ internal void Write(StreamWriter sw, string nodeName) { sw.Write(string.Format(""); - sw.Write(string.Format("", nodeName)); + sw.Write("/>"); } private ST_LimLoc valField; diff --git a/OpenXmlFormats/Wordprocessing/HdrFtr.cs b/OpenXmlFormats/Wordprocessing/HdrFtr.cs index 23e287052..be64b4773 100644 --- a/OpenXmlFormats/Wordprocessing/HdrFtr.cs +++ b/OpenXmlFormats/Wordprocessing/HdrFtr.cs @@ -191,14 +191,17 @@ internal void Write(StreamWriter sw, string nodeName) sw.WriteLine(""); sw.Write(string.Format(""); + 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) @@ -1031,7 +1034,7 @@ internal void Write(StreamWriter sw, string nodeName) { sw.Write(string.Format(""); int i = 0; foreach (object o in this.Items)