forked from ChotiwatMajor/go-docx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_properties.go
43 lines (35 loc) · 903 Bytes
/
run_properties.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
package docx
import "encoding/xml"
const (
HYPERLINK_STYLE = "a1"
)
type RunProperties struct {
XMLName xml.Name `xml:"w:rPr"`
Color *Color `xml:"w:color,omitempty"`
Size *Size `xml:"w:sz,omitempty"`
Bold *Bold `xml:"w:b,omitempty"`
Font *Font `xml:"w:rFonts,omitempty"`
RunStyle *RunStyle `xml:"w:rStyle,omitempty"`
}
type RunStyle struct {
XMLName xml.Name `xml:"w:rStyle"`
Val string `xml:"w:val,attr"`
}
type Color struct {
XMLName xml.Name `xml:"w:color"`
Val string `xml:"w:val,attr"`
}
type Size struct {
XMLName xml.Name `xml:"w:sz"`
Val int `xml:"w:val,attr"`
}
type Bold struct {
XMLName xml.Name `xml:"w:b"`
Val bool `xml:"w:val,attr"`
}
type Font struct {
XMLName xml.Name `xml:"w:rFonts"`
Ascii string `xml:"w:ascii,attr"`
HAnsi string `xml:"w:hAnsi,attr"`
Cs string `xml:"w:cs,attr"`
}