1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-11 02:50:27 +08:00

optimize(drawing): use implicit a:graphicFrameLocks

This commit is contained in:
源文雨
2024-09-17 21:41:46 +09:00
parent 3e5e3f4b1e
commit f03badc77c
3 changed files with 11 additions and 3 deletions

View File

@@ -450,6 +450,7 @@ func (w *WPCNvGraphicFramePr) UnmarshalXML(d *xml.Decoder, _ xml.StartElement) e
if tt, ok := t.(xml.StartElement); ok {
switch tt.Name.Local {
case "graphicFrameLocks":
w.Locks.XMLA = getAtt(tt.Attr, "a")
v := getAtt(tt.Attr, "noChangeAspect")
if v == "" {
continue
@@ -472,7 +473,8 @@ func (w *WPCNvGraphicFramePr) UnmarshalXML(d *xml.Decoder, _ xml.StartElement) e
// AGraphicFrameLocks represents the locks applied to a graphic frame.
type AGraphicFrameLocks struct {
XMLName xml.Name `xml:"http://schemas.openxmlformats.org/drawingml/2006/main graphicFrameLocks,omitempty"`
XMLName xml.Name `xml:"a:graphicFrameLocks,omitempty"`
XMLA string `xml:"xmlns:a,attr,omitempty"`
NoChangeAspect int `xml:"noChangeAspect,attr,omitempty"`
}