xmlDecodeDrawing.go 1.1 KB

123456789101112131415161718192021222324
  1. package excelize
  2. import "encoding/xml"
  3. // decodeCellAnchor directly maps the oneCellAnchor (One Cell Anchor Shape Size)
  4. // and twoCellAnchor (Two Cell Anchor Shape Size). This element specifies a two
  5. // cell anchor placeholder for a group, a shape, or a drawing element. It moves
  6. // with cells and its extents are in EMU units.
  7. type decodeCellAnchor struct {
  8. EditAs string `xml:"editAs,attr,omitempty"`
  9. Content string `xml:",innerxml"`
  10. }
  11. // decodeWsDr directly maps the root element for a part of this content type
  12. // shall wsDr. In order to solve the problem that the label structure is changed
  13. // after serialization and deserialization, two different structures are
  14. // defined. decodeWsDr just for deserialization.
  15. type decodeWsDr struct {
  16. A string `xml:"xmlns a,attr"`
  17. Xdr string `xml:"xmlns xdr,attr"`
  18. OneCellAnchor []*decodeCellAnchor `xml:"oneCellAnchor,omitempty"`
  19. TwoCellAnchor []*decodeCellAnchor `xml:"twoCellAnchor,omitempty"`
  20. XMLName xml.Name `xml:"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing wsDr,omitempty"`
  21. }