added macro functionality to shape (#1182)

This commit is contained in:
David 2022-04-15 03:13:41 -04:00 committed by GitHub
parent 66776730b6
commit 5a279321bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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
@ -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,

View File

@ -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"`