1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-09 01:30:25 +08:00

add: anchor drawing & some attrs

This commit is contained in:
源文雨
2023-02-22 17:09:04 +08:00
parent d2666ec617
commit 9f0dbc43d1
8 changed files with 617 additions and 112 deletions

View File

@@ -36,19 +36,19 @@ func (r *Run) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
switch tt.Name.Local {
case "rPr":
var value RunProperties
d.DecodeElement(&value, &start)
d.DecodeElement(&value, &tt)
r.RunProperties = &value
case "instrText":
var value string
d.DecodeElement(&value, &start)
d.DecodeElement(&value, &tt)
r.InstrText = value
case "t":
var value Text
d.DecodeElement(&value, &start)
d.DecodeElement(&value, &tt)
r.Text = &value
case "drawing":
var value Drawing
d.DecodeElement(&value, &start)
d.DecodeElement(&value, &tt)
r.Drawing = &value
case "tab":
if r.InstrText == "" && r.Text == nil && r.Drawing == nil {