Explorar el Código

- Fix missing relationships in drawing content type shall, relate issue #58;
- Add a donation link, related issue #57 ^_^

Ri Xu hace 8 años
padre
commit
c5dc632951
Se han modificado 4 ficheros con 6 adiciones y 3 borrados
  1. 1 1
      README.md
  2. 1 0
      chart.go
  3. 1 0
      xmlDecodeDrawing.go
  4. 3 2
      xmlDrawing.go

+ 1 - 1
README.md

@@ -7,7 +7,7 @@
 [![Go Report Card](https://goreportcard.com/badge/github.com/Luxurioust/excelize)](https://goreportcard.com/report/github.com/Luxurioust/excelize)
 [![GoDoc](https://godoc.org/github.com/Luxurioust/excelize?status.svg)](https://godoc.org/github.com/Luxurioust/excelize)
 [![Licenses](https://img.shields.io/badge/license-bsd-orange.svg)](https://opensource.org/licenses/BSD-3-Clause)
-[![Join the chat at https://gitter.im/xuri-excelize/Lobby](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/xuri-excelize/Lobby)
+[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/xuri)
 
 ## Introduction
 

+ 1 - 0
chart.go

@@ -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{

+ 1 - 0
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"`

+ 3 - 2
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.