diff options
author | Ri Xu <xuri.me@gmail.com> | 2017-01-17 19:06:42 +0800 |
---|---|---|
committer | Ri Xu <xuri.me@gmail.com> | 2017-01-17 19:06:42 +0800 |
commit | a99f0227b085d8f417f77864941650ef0e6273e4 (patch) | |
tree | d1b8fd8c323614c9defeaa6c9d10f6f432019e50 /xmlDecodeDrawing.go | |
parent | 53d8c4bb3aca921d7dd0a4ac3233887208513bfb (diff) |
- New function `AddPicture()` added, support to add picture into excel cell;
- go test updated;
- fix typo and `gofmt -s` formatted
Diffstat (limited to 'xmlDecodeDrawing.go')
-rw-r--r-- | xmlDecodeDrawing.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/xmlDecodeDrawing.go b/xmlDecodeDrawing.go new file mode 100644 index 0000000..7965a14 --- /dev/null +++ b/xmlDecodeDrawing.go @@ -0,0 +1,21 @@ +package excelize + +import "encoding/xml" + +// decodeTwoCellAnchor directly maps the twoCellAnchor (Two Cell Anchor Shape Size). This element +// specifies a two cell anchor placeholder for a group, a shape, or a drawing element. It moves +// with cells and its extents are in EMU units. +type decodeTwoCellAnchor struct { + EditAs string `xml:"editAs,attr,omitempty"` + Content string `xml:",innerxml"` +} + +// decodeWsDr directly maps the root element for a part of this content type shall wsDr. +// In order to solve the problem that the label structure is 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"` + TwoCellAnchor []*decodeTwoCellAnchor `xml:"twoCellAnchor,omitempty"` + XMLName xml.Name `xml:"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing wsDr,omitempty"` +} |