mirror of
https://github.com/fumiama/go-docx.git
synced 2026-06-19 09:00:31 +08:00
@@ -111,6 +111,12 @@ type VertAlign struct {
|
|||||||
Val string `xml:"w:val,attr"`
|
Val string `xml:"w:val,attr"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Strike ...
|
||||||
|
type Strike struct {
|
||||||
|
XMLName xml.Name `xml:"w:strike,omitempty"`
|
||||||
|
Val string `xml:"w:val,attr"`
|
||||||
|
}
|
||||||
|
|
||||||
// Shade is an element that represents a shading pattern applied to a document element.
|
// Shade is an element that represents a shading pattern applied to a document element.
|
||||||
type Shade struct {
|
type Shade struct {
|
||||||
XMLName xml.Name `xml:"w:shd,omitempty"`
|
XMLName xml.Name `xml:"w:shd,omitempty"`
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ type RunProperties struct {
|
|||||||
Kern *Kern
|
Kern *Kern
|
||||||
Underline *Underline
|
Underline *Underline
|
||||||
VertAlign *VertAlign
|
VertAlign *VertAlign
|
||||||
|
Strike *Strike
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnmarshalXML ...
|
// UnmarshalXML ...
|
||||||
@@ -297,6 +298,10 @@ func (r *RunProperties) UnmarshalXML(d *xml.Decoder, _ xml.StartElement) error {
|
|||||||
var value VertAlign
|
var value VertAlign
|
||||||
value.Val = getAtt(tt.Attr, "val")
|
value.Val = getAtt(tt.Attr, "val")
|
||||||
r.VertAlign = &value
|
r.VertAlign = &value
|
||||||
|
case "strike":
|
||||||
|
var value Strike
|
||||||
|
value.Val = getAtt(tt.Attr, "val")
|
||||||
|
r.Strike = &value
|
||||||
default:
|
default:
|
||||||
err = d.Skip() // skip unsupported tags
|
err = d.Skip() // skip unsupported tags
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user