diff options
author | Ri Xu <xuri.me@gmail.com> | 2017-06-03 17:36:28 +0800 |
---|---|---|
committer | Ri Xu <xuri.me@gmail.com> | 2017-06-03 17:36:28 +0800 |
commit | c5dc63295186ad35ece6a2c9c940e84665f9f98f (patch) | |
tree | f009632d6837ac4ce98ff5b7fceffabf449336c8 | |
parent | d372bb977f57b244faf635e21af458bf2e8a98ef (diff) |
- Fix missing relationships in drawing content type shall, relate issue #58;
- Add a donation link, related issue #57 ^_^
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | chart.go | 1 | ||||
-rw-r--r-- | xmlDecodeDrawing.go | 1 | ||||
-rw-r--r-- | xmlDrawing.go | 5 |
4 files changed, 6 insertions, 3 deletions
@@ -7,7 +7,7 @@ [](https://goreportcard.com/report/github.com/Luxurioust/excelize) [](https://godoc.org/github.com/Luxurioust/excelize) [](https://opensource.org/licenses/BSD-3-Clause) -[](https://gitter.im/xuri-excelize/Lobby) +[](https://www.paypal.me/xuri) ## Introduction @@ -812,6 +812,7 @@ func (f *File) drawingParser(drawingXML string, content *xlsxWsDr) int { if ok { // Append Model decodeWsDr := decodeWsDr{} xml.Unmarshal([]byte(f.readXML(drawingXML)), &decodeWsDr) + content.R = decodeWsDr.R cNvPrID = len(decodeWsDr.OneCellAnchor) + len(decodeWsDr.TwoCellAnchor) + 1 for _, v := range decodeWsDr.OneCellAnchor { content.OneCellAnchor = append(content.OneCellAnchor, &xdrCellAnchor{ diff --git a/xmlDecodeDrawing.go b/xmlDecodeDrawing.go index bb4cd24..fff6b9d 100644 --- a/xmlDecodeDrawing.go +++ b/xmlDecodeDrawing.go @@ -18,6 +18,7 @@ type decodeCellAnchor struct { 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"` diff --git a/xmlDrawing.go b/xmlDrawing.go index 966ca7b..bf263a5 100644 --- a/xmlDrawing.go +++ b/xmlDrawing.go @@ -198,8 +198,9 @@ type xlsxWsDr struct { XMLName xml.Name `xml:"xdr:wsDr"` OneCellAnchor []*xdrCellAnchor `xml:"xdr:oneCellAnchor"` TwoCellAnchor []*xdrCellAnchor `xml:"xdr:twoCellAnchor"` - Xdr string `xml:"xmlns:xdr,attr"` - A string `xml:"xmlns:a,attr"` + A string `xml:"xmlns:a,attr,omitempty"` + Xdr string `xml:"xmlns:xdr,attr,omitempty"` + R string `xml:"xmlns:r,attr,omitempty"` } // xlsxGraphicFrame (Graphic Frame) directly maps the xdr:graphicFrame element. |