From 14d68fcc97ddeaf814ca3e7b24cc31473f28f6ed Mon Sep 17 00:00:00 2001 From: Tony Qu Date: Tue, 3 Jun 2025 20:20:43 +0800 Subject: [PATCH] fix #1498 --- OpenXmlFormats/Drawing/BaseTypes.cs | 10 +++------- OpenXmlFormats/Drawing/SpreadsheetDrawing.cs | 2 +- OpenXmlFormats/Drawing/WordprocessingDrawing.cs | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/OpenXmlFormats/Drawing/BaseTypes.cs b/OpenXmlFormats/Drawing/BaseTypes.cs index 88af3cc0f..ae95e0fd6 100644 --- a/OpenXmlFormats/Drawing/BaseTypes.cs +++ b/OpenXmlFormats/Drawing/BaseTypes.cs @@ -270,11 +270,7 @@ namespace NPOI.OpenXmlFormats.Dml internal void Write(StreamWriter sw, string nodeName) { - if (name == null) - sw.Write(string.Format(""); @@ -2353,11 +2349,11 @@ namespace NPOI.OpenXmlFormats.Dml XmlHelper.WriteAttribute(sw, "flipV", this.flipV,false); sw.Write(">"); if (this.off != null) - this.off.Write(sw, "off"); + this.off.Write(sw, "a:off"); if (this.ext != null) this.ext.Write(sw, "a:ext"); if (this.chOff != null) - this.chOff.Write(sw, "chOff"); + this.chOff.Write(sw, "a:chOff"); if (this.chExt != null) this.chExt.Write(sw, "a:chExt"); sw.Write(string.Format("", nodeName)); diff --git a/OpenXmlFormats/Drawing/SpreadsheetDrawing.cs b/OpenXmlFormats/Drawing/SpreadsheetDrawing.cs index c04219fab..c01bb341b 100644 --- a/OpenXmlFormats/Drawing/SpreadsheetDrawing.cs +++ b/OpenXmlFormats/Drawing/SpreadsheetDrawing.cs @@ -1703,7 +1703,7 @@ namespace NPOI.OpenXmlFormats.Dml.Spreadsheet { sw.Write(""); if (this.pos!=null) - this.pos.Write(sw, "pos"); + this.pos.Write(sw, "p:pos"); if (this.sp != null) sp.Write(sw, "sp"); else if (this.connector != null) diff --git a/OpenXmlFormats/Drawing/WordprocessingDrawing.cs b/OpenXmlFormats/Drawing/WordprocessingDrawing.cs index 5e9c488e6..3b7ed368e 100644 --- a/OpenXmlFormats/Drawing/WordprocessingDrawing.cs +++ b/OpenXmlFormats/Drawing/WordprocessingDrawing.cs @@ -1281,7 +1281,7 @@ namespace NPOI.OpenXmlFormats.Dml.WordProcessing XmlHelper.WriteAttribute(sw, "wp14:editId", this.editIdField); sw.Write(">"); if (this.simplePos != null) - this.simplePos.Write(sw, "simplePos"); + this.simplePos.Write(sw, "wp:simplePos"); if (this.positionH != null) this.positionH.Write(sw, "positionH"); if (this.positionV != null)