-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ftr.go
399 lines (391 loc) · 24.5 KB
/
Ftr.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
package wml
import (
"encoding/xml"
"go.devnw.com/ooxml"
"go.devnw.com/ooxml/schema/soo/ofc/math"
)
type Ftr struct {
CT_HdrFtr
}
func NewFtr() *Ftr {
ret := &Ftr{}
ret.CT_HdrFtr = *NewCT_HdrFtr()
return ret
}
func (m *Ftr) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns"}, Value: "http://schemas.openxmlformats.org/wordprocessingml/2006/main"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:a"}, Value: "http://schemas.openxmlformats.org/drawingml/2006/main"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:m"}, Value: "http://schemas.openxmlformats.org/officeDocument/2006/math"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:ma"}, Value: "http://schemas.openxmlformats.org/schemaLibrary/2006/main"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:pic"}, Value: "http://schemas.openxmlformats.org/drawingml/2006/picture"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:r"}, Value: "http://schemas.openxmlformats.org/officeDocument/2006/relationships"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:s"}, Value: "http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:w"}, Value: "http://schemas.openxmlformats.org/wordprocessingml/2006/main"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:wp"}, Value: "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:xml"}, Value: "http://www.w3.org/XML/1998/namespace"})
start.Name.Local = "w:ftr"
return m.CT_HdrFtr.MarshalXML(e, start)
}
func (m *Ftr) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
// initialize to default
m.CT_HdrFtr = *NewCT_HdrFtr()
lFtr:
for {
tok, err := d.Token()
if err != nil {
return err
}
switch el := tok.(type) {
case xml.StartElement:
switch el.Name {
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "altChunk"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "altChunk"}:
tmp := NewCT_AltChunk()
if err := d.DecodeElement(tmp, &el); err != nil {
return err
}
m.AltChunk = append(m.AltChunk, tmp)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "customXml"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "customXml"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmpcontentblockcontent.CustomXml = NewCT_CustomXmlBlock()
if err := d.DecodeElement(tmpcontentblockcontent.CustomXml, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "sdt"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "sdt"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmpcontentblockcontent.Sdt = NewCT_SdtBlock()
if err := d.DecodeElement(tmpcontentblockcontent.Sdt, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "p"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "p"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmp := NewCT_P()
if err := d.DecodeElement(tmp, &el); err != nil {
return err
}
tmpcontentblockcontent.P = append(tmpcontentblockcontent.P, tmp)
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "tbl"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "tbl"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmp := NewCT_Tbl()
if err := d.DecodeElement(tmp, &el); err != nil {
return err
}
tmpcontentblockcontent.Tbl = append(tmpcontentblockcontent.Tbl, tmp)
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "proofErr"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "proofErr"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprunlevelelts.ProofErr = NewCT_ProofErr()
if err := d.DecodeElement(tmprunlevelelts.ProofErr, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "permStart"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "permStart"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprunlevelelts.PermStart = NewCT_PermStart()
if err := d.DecodeElement(tmprunlevelelts.PermStart, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "permEnd"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "permEnd"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprunlevelelts.PermEnd = NewCT_Perm()
if err := d.DecodeElement(tmprunlevelelts.PermEnd, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "ins"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "ins"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprunlevelelts.Ins = NewCT_RunTrackChange()
if err := d.DecodeElement(tmprunlevelelts.Ins, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "del"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "del"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprunlevelelts.Del = NewCT_RunTrackChange()
if err := d.DecodeElement(tmprunlevelelts.Del, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "moveFrom"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "moveFrom"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprunlevelelts.MoveFrom = NewCT_RunTrackChange()
if err := d.DecodeElement(tmprunlevelelts.MoveFrom, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "moveTo"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "moveTo"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprunlevelelts.MoveTo = NewCT_RunTrackChange()
if err := d.DecodeElement(tmprunlevelelts.MoveTo, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "bookmarkStart"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "bookmarkStart"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.BookmarkStart = NewCT_Bookmark()
if err := d.DecodeElement(tmprangemarkupelements.BookmarkStart, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "bookmarkEnd"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "bookmarkEnd"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.BookmarkEnd = NewCT_MarkupRange()
if err := d.DecodeElement(tmprangemarkupelements.BookmarkEnd, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "moveFromRangeStart"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "moveFromRangeStart"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.MoveFromRangeStart = NewCT_MoveBookmark()
if err := d.DecodeElement(tmprangemarkupelements.MoveFromRangeStart, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "moveFromRangeEnd"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "moveFromRangeEnd"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.MoveFromRangeEnd = NewCT_MarkupRange()
if err := d.DecodeElement(tmprangemarkupelements.MoveFromRangeEnd, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "moveToRangeStart"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "moveToRangeStart"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.MoveToRangeStart = NewCT_MoveBookmark()
if err := d.DecodeElement(tmprangemarkupelements.MoveToRangeStart, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "moveToRangeEnd"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "moveToRangeEnd"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.MoveToRangeEnd = NewCT_MarkupRange()
if err := d.DecodeElement(tmprangemarkupelements.MoveToRangeEnd, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "commentRangeStart"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "commentRangeStart"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.CommentRangeStart = NewCT_MarkupRange()
if err := d.DecodeElement(tmprangemarkupelements.CommentRangeStart, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "commentRangeEnd"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "commentRangeEnd"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.CommentRangeEnd = NewCT_MarkupRange()
if err := d.DecodeElement(tmprangemarkupelements.CommentRangeEnd, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "customXmlInsRangeStart"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "customXmlInsRangeStart"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.CustomXmlInsRangeStart = NewCT_TrackChange()
if err := d.DecodeElement(tmprangemarkupelements.CustomXmlInsRangeStart, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "customXmlInsRangeEnd"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "customXmlInsRangeEnd"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.CustomXmlInsRangeEnd = NewCT_Markup()
if err := d.DecodeElement(tmprangemarkupelements.CustomXmlInsRangeEnd, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "customXmlDelRangeStart"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "customXmlDelRangeStart"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.CustomXmlDelRangeStart = NewCT_TrackChange()
if err := d.DecodeElement(tmprangemarkupelements.CustomXmlDelRangeStart, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "customXmlDelRangeEnd"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "customXmlDelRangeEnd"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.CustomXmlDelRangeEnd = NewCT_Markup()
if err := d.DecodeElement(tmprangemarkupelements.CustomXmlDelRangeEnd, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "customXmlMoveFromRangeStart"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "customXmlMoveFromRangeStart"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.CustomXmlMoveFromRangeStart = NewCT_TrackChange()
if err := d.DecodeElement(tmprangemarkupelements.CustomXmlMoveFromRangeStart, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "customXmlMoveFromRangeEnd"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "customXmlMoveFromRangeEnd"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.CustomXmlMoveFromRangeEnd = NewCT_Markup()
if err := d.DecodeElement(tmprangemarkupelements.CustomXmlMoveFromRangeEnd, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "customXmlMoveToRangeStart"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "customXmlMoveToRangeStart"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.CustomXmlMoveToRangeStart = NewCT_TrackChange()
if err := d.DecodeElement(tmprangemarkupelements.CustomXmlMoveToRangeStart, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", Local: "customXmlMoveToRangeEnd"},
xml.Name{Space: "http://purl.oclc.org/ooxml/wordprocessingml/main", Local: "customXmlMoveToRangeEnd"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmprangemarkupelements := NewEG_RangeMarkupElements()
tmprangemarkupelements.CustomXmlMoveToRangeEnd = NewCT_Markup()
if err := d.DecodeElement(tmprangemarkupelements.CustomXmlMoveToRangeEnd, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_RangeMarkupElements = append(tmprunlevelelts.EG_RangeMarkupElements, tmprangemarkupelements)
case xml.Name{Space: "http://schemas.openxmlformats.org/officeDocument/2006/math", Local: "oMathPara"},
xml.Name{Space: "http://purl.oclc.org/ooxml/officeDocument/math", Local: "oMathPara"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmpmathcontent := NewEG_MathContent()
tmpmathcontent.OMathPara = math.NewOMathPara()
if err := d.DecodeElement(tmpmathcontent.OMathPara, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_MathContent = append(tmprunlevelelts.EG_MathContent, tmpmathcontent)
case xml.Name{Space: "http://schemas.openxmlformats.org/officeDocument/2006/math", Local: "oMath"},
xml.Name{Space: "http://purl.oclc.org/ooxml/officeDocument/math", Local: "oMath"}:
tmpcontentblockcontent := NewEG_ContentBlockContent()
tmprunlevelelts := NewEG_RunLevelElts()
tmpmathcontent := NewEG_MathContent()
tmpmathcontent.OMath = math.NewOMath()
if err := d.DecodeElement(tmpmathcontent.OMath, &el); err != nil {
return err
}
m.EG_ContentBlockContent = append(m.EG_ContentBlockContent, tmpcontentblockcontent)
tmpcontentblockcontent.EG_RunLevelElts = append(tmpcontentblockcontent.EG_RunLevelElts, tmprunlevelelts)
tmprunlevelelts.EG_MathContent = append(tmprunlevelelts.EG_MathContent, tmpmathcontent)
default:
office.Log("skipping unsupported element on Ftr %v", el.Name)
if err := d.Skip(); err != nil {
return err
}
}
case xml.EndElement:
break lFtr
case xml.CharData:
}
}
return nil
}
// Validate validates the Ftr and its children
func (m *Ftr) Validate() error {
return m.ValidateWithPath("Ftr")
}
// ValidateWithPath validates the Ftr and its children, prefixing error messages with path
func (m *Ftr) ValidateWithPath(path string) error {
if err := m.CT_HdrFtr.ValidateWithPath(path); err != nil {
return err
}
return nil
}