summaryrefslogtreecommitdiff
path: root/xmlDecodeDrawing.go
diff options
context:
space:
mode:
authorRi Xu <xuri.me@gmail.com>2017-03-01 11:00:42 +0800
committerRi Xu <xuri.me@gmail.com>2017-03-01 11:00:42 +0800
commit109d8adae3f5ca5a24905c6b2581ae8c42095d51 (patch)
tree826cdc0502154e8c633a14de7720216d052e268b /xmlDecodeDrawing.go
parent1e340aea40085133ffb98ed7635d937aa977f177 (diff)
Fix missing `oneCellAnchor` element after add picture in some cases.
Diffstat (limited to 'xmlDecodeDrawing.go')
-rw-r--r--xmlDecodeDrawing.go19
1 files changed, 10 insertions, 9 deletions
diff --git a/xmlDecodeDrawing.go b/xmlDecodeDrawing.go
index 136975e..3d01719 100644
--- a/xmlDecodeDrawing.go
+++ b/xmlDecodeDrawing.go
@@ -2,11 +2,11 @@ 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 {
+// decodeCellAnchor directly maps the oneCellAnchor (One Cell Anchor Shape Size)
+// and 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 decodeCellAnchor struct {
EditAs string `xml:"editAs,attr,omitempty"`
Content string `xml:",innerxml"`
}
@@ -16,8 +16,9 @@ type decodeTwoCellAnchor struct {
// 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"`
+ A string `xml:"xmlns a,attr"`
+ Xdr string `xml:"xmlns xdr,attr"`
+ OneCellAnchor []*decodeCellAnchor `xml:"oneCellAnchor,omitempty"`
+ TwoCellAnchor []*decodeCellAnchor `xml:"twoCellAnchor,omitempty"`
+ XMLName xml.Name `xml:"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing wsDr,omitempty"`
}