@@ -20,7 +20,7 @@ type vmlDrawing struct {
2020 XMLNSv string `xml:"xmlns:v,attr"`
2121 XMLNSo string `xml:"xmlns:o,attr"`
2222 XMLNSx string `xml:"xmlns:x,attr"`
23- XMLNSmv string `xml:"xmlns:mv,attr"`
23+ XMLNSmv string `xml:"xmlns:mv,attr,omitempty "`
2424 ShapeLayout * xlsxShapeLayout `xml:"o:shapelayout"`
2525 ShapeType * xlsxShapeType `xml:"v:shapetype"`
2626 Shape []xlsxShape `xml:"v:shape"`
@@ -44,6 +44,7 @@ type xlsxIDmap struct {
4444type xlsxShape struct {
4545 XMLName xml.Name `xml:"v:shape"`
4646 ID string `xml:"id,attr"`
47+ Spid string `xml:"o:spid,attr,omitempty"`
4748 Type string `xml:"type,attr"`
4849 Style string `xml:"style,attr"`
4950 Button string `xml:"o:button,attr,omitempty"`
@@ -57,12 +58,17 @@ type xlsxShape struct {
5758
5859// xlsxShapeType directly maps the shapetype element.
5960type 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"`
6672}
6773
6874// xlsxStroke directly maps the stroke element.
@@ -72,10 +78,28 @@ type xlsxStroke struct {
7278
7379// vPath directly maps the v:path element.
7480type vPath struct {
81+ ExtrusionOK string `xml:"o:extrusionok,attr,omitempty"`
7582 GradientShapeOK string `xml:"gradientshapeok,attr,omitempty"`
7683 ConnectType string `xml:"o:connecttype,attr"`
7784}
7885
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+
79103// vFill directly maps the v:fill element. This element must be defined within a
80104// Shape element.
81105type vFill struct {
@@ -106,6 +130,13 @@ type vTextBox struct {
106130 Div * xlsxDiv `xml:"div"`
107131}
108132
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+
109140// xlsxDiv directly maps the div element.
110141type xlsxDiv struct {
111142 Style string `xml:"style,attr"`
@@ -254,7 +285,9 @@ type encodeShape struct {
254285 Shadow * vShadow `xml:"v:shadow"`
255286 Path * vPath `xml:"v:path"`
256287 TextBox * vTextBox `xml:"v:textbox"`
288+ ImageData * vImageData `xml:"v:imagedata"`
257289 ClientData * xClientData `xml:"x:ClientData"`
290+ Lock * oLock `xml:"o:lock"`
258291}
259292
260293// formCtrlPreset defines the structure used to form control presets.
@@ -301,3 +334,12 @@ type FormControl struct {
301334 Type FormControlType
302335 Format GraphicOptions
303336}
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