Skip to content

Commit

Permalink
added macro functionality to shape (qax-os#1182)
Browse files Browse the repository at this point in the history
  • Loading branch information
JDavidVR committed Apr 15, 2022
1 parent af5ebde commit 8a3cd6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shape.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ func parseFormatShapeSet(formatSet string) (*formatShape, error) {
XScale: 1.0,
YScale: 1.0,
},
Line: formatLine{Width: 1},
Line: formatLine{Width: 1},
Macro: "",
}
err := json.Unmarshal([]byte(formatSet), &format)
return &format, err
Expand Down Expand Up @@ -369,6 +370,7 @@ func (f *File) addDrawingShape(sheet, drawingXML, cell string, formatSet *format
twoCellAnchor.From = &from
twoCellAnchor.To = &to
shape := xdrSp{
Macro: formatSet.Macro,
NvSpPr: &xdrNvSpPr{
CNvPr: &xlsxCNvPr{
ID: cNvPrID,
Expand Down
1 change: 1 addition & 0 deletions xmlDrawing.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ type formatPicture struct {

// formatShape directly maps the format settings of the shape.
type formatShape struct {
Macro string `json:"macro"`
Type string `json:"type"`
Width int `json:"width"`
Height int `json:"height"`
Expand Down

0 comments on commit 8a3cd6f

Please sign in to comment.