mirror of
https://github.com/fumiama/go-docx.git
synced 2026-06-13 04:13:15 +08:00
hide rsid
This commit is contained in:
@@ -163,10 +163,10 @@ func (p *ParagraphProperties) UnmarshalXML(d *xml.Decoder, start xml.StartElemen
|
|||||||
type Paragraph struct {
|
type Paragraph struct {
|
||||||
XMLName xml.Name `xml:"w:p,omitempty"`
|
XMLName xml.Name `xml:"w:p,omitempty"`
|
||||||
|
|
||||||
RsidR string `xml:"w:rsidR,attr,omitempty"`
|
// RsidR string `xml:"w:rsidR,attr,omitempty"`
|
||||||
RsidRPr string `xml:"w:rsidRPr,attr,omitempty"`
|
// RsidRPr string `xml:"w:rsidRPr,attr,omitempty"`
|
||||||
RsidRDefault string `xml:"w:rsidRDefault,attr,omitempty"`
|
// RsidRDefault string `xml:"w:rsidRDefault,attr,omitempty"`
|
||||||
RsidP string `xml:"w:rsidP,attr,omitempty"`
|
// RsidP string `xml:"w:rsidP,attr,omitempty"`
|
||||||
|
|
||||||
Properties *ParagraphProperties
|
Properties *ParagraphProperties
|
||||||
Children []interface{}
|
Children []interface{}
|
||||||
@@ -220,7 +220,7 @@ func (p *Paragraph) String() string {
|
|||||||
|
|
||||||
// UnmarshalXML ...
|
// UnmarshalXML ...
|
||||||
func (p *Paragraph) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
|
func (p *Paragraph) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
|
||||||
for _, attr := range start.Attr {
|
/*for _, attr := range start.Attr {
|
||||||
switch attr.Name.Local {
|
switch attr.Name.Local {
|
||||||
case "rsidR":
|
case "rsidR":
|
||||||
p.RsidR = attr.Value
|
p.RsidR = attr.Value
|
||||||
@@ -233,7 +233,7 @@ func (p *Paragraph) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
|
|||||||
default:
|
default:
|
||||||
// ignore other attributes
|
// ignore other attributes
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
children := make([]interface{}, 0, 64)
|
children := make([]interface{}, 0, 64)
|
||||||
for {
|
for {
|
||||||
t, err := d.Token()
|
t, err := d.Token()
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ import (
|
|||||||
type Run struct {
|
type Run struct {
|
||||||
XMLName xml.Name `xml:"w:r,omitempty"`
|
XMLName xml.Name `xml:"w:r,omitempty"`
|
||||||
Space string `xml:"xml:space,attr,omitempty"`
|
Space string `xml:"xml:space,attr,omitempty"`
|
||||||
RsidR string `xml:"w:rsidR,attr,omitempty"`
|
// RsidR string `xml:"w:rsidR,attr,omitempty"`
|
||||||
RsidRPr string `xml:"w:rsidRPr,attr,omitempty"`
|
// RsidRPr string `xml:"w:rsidRPr,attr,omitempty"`
|
||||||
|
|
||||||
RunProperties *RunProperties `xml:"w:rPr,omitempty"`
|
RunProperties *RunProperties `xml:"w:rPr,omitempty"`
|
||||||
|
|
||||||
@@ -51,10 +51,10 @@ func (r *Run) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
|
|||||||
switch attr.Name.Local {
|
switch attr.Name.Local {
|
||||||
case "space":
|
case "space":
|
||||||
r.Space = attr.Value
|
r.Space = attr.Value
|
||||||
case "rsidR":
|
/*case "rsidR":
|
||||||
r.RsidR = attr.Value
|
r.RsidR = attr.Value
|
||||||
case "rsidRPr":
|
case "rsidRPr":
|
||||||
r.RsidRPr = attr.Value
|
r.RsidRPr = attr.Value*/
|
||||||
default:
|
default:
|
||||||
// ignore other attributes
|
// ignore other attributes
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -401,10 +401,10 @@ func (g *WGridCol) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err err
|
|||||||
|
|
||||||
// WTableRow represents a row within a table.
|
// WTableRow represents a row within a table.
|
||||||
type WTableRow struct {
|
type WTableRow struct {
|
||||||
XMLName xml.Name `xml:"w:tr,omitempty"`
|
XMLName xml.Name `xml:"w:tr,omitempty"`
|
||||||
RsidR string `xml:"w:rsidR,attr,omitempty"`
|
// RsidR string `xml:"w:rsidR,attr,omitempty"`
|
||||||
RsidRPr string `xml:"w:rsidRPr,attr,omitempty"`
|
// RsidRPr string `xml:"w:rsidRPr,attr,omitempty"`
|
||||||
RsidTr string `xml:"w:rsidTr,attr,omitempty"`
|
// RsidTr string `xml:"w:rsidTr,attr,omitempty"`
|
||||||
TableRowProperties *WTableRowProperties
|
TableRowProperties *WTableRowProperties
|
||||||
TableCells []*WTableCell
|
TableCells []*WTableCell
|
||||||
|
|
||||||
@@ -413,7 +413,7 @@ type WTableRow struct {
|
|||||||
|
|
||||||
// UnmarshalXML ...
|
// UnmarshalXML ...
|
||||||
func (w *WTableRow) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
|
func (w *WTableRow) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
|
||||||
for _, attr := range start.Attr {
|
/*for _, attr := range start.Attr {
|
||||||
switch attr.Name.Local {
|
switch attr.Name.Local {
|
||||||
case "rsidR":
|
case "rsidR":
|
||||||
w.RsidR = attr.Value
|
w.RsidR = attr.Value
|
||||||
@@ -424,7 +424,7 @@ func (w *WTableRow) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
|
|||||||
default:
|
default:
|
||||||
// ignore other attributes
|
// ignore other attributes
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
for {
|
for {
|
||||||
t, err := d.Token()
|
t, err := d.Token()
|
||||||
|
|||||||
Reference in New Issue
Block a user