From f0cb29cf6668ab96992b1e48278d9f5b1f9e4976 Mon Sep 17 00:00:00 2001 From: xuri Date: Sat, 5 Mar 2022 14:48:34 +0800 Subject: This closes #1162, improve the compatibility with alternate content Preserve alternate content in the workbook, worksheet, and drawingML --- xmlDecodeDrawing.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'xmlDecodeDrawing.go') diff --git a/xmlDecodeDrawing.go b/xmlDecodeDrawing.go index 9091440..fb920be 100644 --- a/xmlDecodeDrawing.go +++ b/xmlDecodeDrawing.go @@ -63,12 +63,13 @@ type decodeCNvSpPr struct { // changed after serialization and deserialization, two different structures // are defined. decodeWsDr just for deserialization. type decodeWsDr struct { - A string `xml:"xmlns a,attr"` - Xdr string `xml:"xmlns xdr,attr"` - R string `xml:"xmlns r,attr"` - OneCellAnchor []*decodeCellAnchor `xml:"oneCellAnchor,omitempty"` - TwoCellAnchor []*decodeCellAnchor `xml:"twoCellAnchor,omitempty"` - XMLName xml.Name `xml:"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing wsDr,omitempty"` + XMLName xml.Name `xml:"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing wsDr,omitempty"` + A string `xml:"xmlns a,attr"` + Xdr string `xml:"xmlns xdr,attr"` + R string `xml:"xmlns r,attr"` + AlternateContent []*xlsxInnerXML `xml:"http://schemas.openxmlformats.org/markup-compatibility/2006 AlternateContent"` + OneCellAnchor []*decodeCellAnchor `xml:"oneCellAnchor,omitempty"` + TwoCellAnchor []*decodeCellAnchor `xml:"twoCellAnchor,omitempty"` } // decodeTwoCellAnchor directly maps the oneCellAnchor (One Cell Anchor Shape -- cgit v1.2.1