summaryrefslogtreecommitdiff
path: root/xmlDrawing.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 /xmlDrawing.go
parent1e340aea40085133ffb98ed7635d937aa977f177 (diff)
Fix missing `oneCellAnchor` element after add picture in some cases.
Diffstat (limited to 'xmlDrawing.go')
-rw-r--r--xmlDrawing.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/xmlDrawing.go b/xmlDrawing.go
index f4b0f02..a91e7d7 100644
--- a/xmlDrawing.go
+++ b/xmlDrawing.go
@@ -162,11 +162,11 @@ type xlsxClientData struct {
FPrintsWithSheet bool `xml:"fPrintsWithSheet,attr"`
}
-// xlsxTwoCellAnchor 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 xlsxTwoCellAnchor struct {
+// xlsxCellAnchor 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 xlsxCellAnchor struct {
EditAs string `xml:"editAs,attr,omitempty"`
From *xlsxFrom `xml:"xdr:from"`
To *xlsxTo `xml:"xdr:to"`
@@ -178,9 +178,10 @@ type xlsxTwoCellAnchor struct {
// xlsxWsDr directly maps the root element for a part of this content type shall
// wsDr.
type xlsxWsDr struct {
- TwoCellAnchor []*xlsxTwoCellAnchor `xml:"xdr:twoCellAnchor"`
- Xdr string `xml:"xmlns:xdr,attr"`
- A string `xml:"xmlns:a,attr"`
+ OneCellAnchor []*xlsxCellAnchor `xml:"xdr:oneCellAnchor"`
+ TwoCellAnchor []*xlsxCellAnchor `xml:"xdr:twoCellAnchor"`
+ Xdr string `xml:"xmlns:xdr,attr"`
+ A string `xml:"xmlns:a,attr"`
}
// encodeWsDr directly maps the element xdr:wsDr.