@@ -20,7 +20,7 @@ type vmlDrawing struct {
20
20
XMLNSv string `xml:"xmlns:v,attr"`
21
21
XMLNSo string `xml:"xmlns:o,attr"`
22
22
XMLNSx string `xml:"xmlns:x,attr"`
23
- XMLNSmv string `xml:"xmlns:mv,attr"`
23
+ XMLNSmv string `xml:"xmlns:mv,attr,omitempty "`
24
24
ShapeLayout * xlsxShapeLayout `xml:"o:shapelayout"`
25
25
ShapeType * xlsxShapeType `xml:"v:shapetype"`
26
26
Shape []xlsxShape `xml:"v:shape"`
@@ -44,6 +44,7 @@ type xlsxIDmap struct {
44
44
type xlsxShape struct {
45
45
XMLName xml.Name `xml:"v:shape"`
46
46
ID string `xml:"id,attr"`
47
+ Spid string `xml:"o:spid,attr,omitempty"`
47
48
Type string `xml:"type,attr"`
48
49
Style string `xml:"style,attr"`
49
50
Button string `xml:"o:button,attr,omitempty"`
@@ -57,12 +58,17 @@ type xlsxShape struct {
57
58
58
59
// xlsxShapeType directly maps the shapetype element.
59
60
type xlsxShapeType struct {
60
- ID string `xml:"id,attr"`
61
- CoordSize string `xml:"coordsize,attr"`
62
- Spt int `xml:"o:spt,attr"`
63
- Path string `xml:"path,attr"`
64
- Stroke * xlsxStroke `xml:"v:stroke"`
65
- VPath * vPath `xml:"v:path"`
61
+ ID string `xml:"id,attr"`
62
+ CoordSize string `xml:"coordsize,attr"`
63
+ Spt int `xml:"o:spt,attr"`
64
+ PreferRelative string `xml:"o:preferrelative,attr,omitempty"`
65
+ Path string `xml:"path,attr"`
66
+ Filled string `xml:"filled,attr,omitempty"`
67
+ Stroked string `xml:"stroked,attr,omitempty"`
68
+ Stroke * xlsxStroke `xml:"v:stroke"`
69
+ VFormulas * vFormulas `xml:"v:formulas"`
70
+ VPath * vPath `xml:"v:path"`
71
+ Lock * oLock `xml:"o:lock"`
66
72
}
67
73
68
74
// xlsxStroke directly maps the stroke element.
@@ -72,10 +78,28 @@ type xlsxStroke struct {
72
78
73
79
// vPath directly maps the v:path element.
74
80
type vPath struct {
81
+ ExtrusionOK string `xml:"o:extrusionok,attr,omitempty"`
75
82
GradientShapeOK string `xml:"gradientshapeok,attr,omitempty"`
76
83
ConnectType string `xml:"o:connecttype,attr"`
77
84
}
78
85
86
+ // oLock directly maps the o:lock element.
87
+ type oLock struct {
88
+ Ext string `xml:"v:ext,attr"`
89
+ Rotation string `xml:"rotation,attr,omitempty"`
90
+ AspectRatio string `xml:"aspectratio,attr,omitempty"`
91
+ }
92
+
93
+ // vFormulas directly maps to the v:formulas element
94
+ type vFormulas struct {
95
+ Formulas []vFormula `xml:"v:f"`
96
+ }
97
+
98
+ // vFormula directly maps to the v:f element
99
+ type vFormula struct {
100
+ Equation string `xml:"eqn,attr"`
101
+ }
102
+
79
103
// vFill directly maps the v:fill element. This element must be defined within a
80
104
// Shape element.
81
105
type vFill struct {
@@ -106,6 +130,13 @@ type vTextBox struct {
106
130
Div * xlsxDiv `xml:"div"`
107
131
}
108
132
133
+ // vImageData directly maps the v:imagedata element. This element must be
134
+ // defined within a Shape element.
135
+ type vImageData struct {
136
+ RelID string `xml:"o:relid,attr"`
137
+ Title string `xml:"o:title,attr,omitempty"`
138
+ }
139
+
109
140
// xlsxDiv directly maps the div element.
110
141
type xlsxDiv struct {
111
142
Style string `xml:"style,attr"`
@@ -254,7 +285,9 @@ type encodeShape struct {
254
285
Shadow * vShadow `xml:"v:shadow"`
255
286
Path * vPath `xml:"v:path"`
256
287
TextBox * vTextBox `xml:"v:textbox"`
288
+ ImageData * vImageData `xml:"v:imagedata"`
257
289
ClientData * xClientData `xml:"x:ClientData"`
290
+ Lock * oLock `xml:"o:lock"`
258
291
}
259
292
260
293
// formCtrlPreset defines the structure used to form control presets.
@@ -301,3 +334,12 @@ type FormControl struct {
301
334
Type FormControlType
302
335
Format GraphicOptions
303
336
}
337
+
338
+ // HeaderFooterGraphics defines the settings for an image to be
339
+ // accessible from the header/footer options.
340
+ type HeaderFooterGraphics struct {
341
+ File []byte
342
+ Extension string
343
+ Width string
344
+ Height string
345
+ }
0 commit comments