From 5a279321bb494141fb12ac010a33da4a78c6a309 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 15 Apr 2022 03:13:41 -0400 Subject: added macro functionality to shape (#1182) --- shape.go | 4 +++- xmlDrawing.go | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/shape.go b/shape.go index 514171a..8aefeea 100644 --- a/shape.go +++ b/shape.go @@ -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, diff --git a/xmlDrawing.go b/xmlDrawing.go index 4bf43ec..d6d6135 100644 --- a/xmlDrawing.go +++ b/xmlDrawing.go @@ -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"` -- cgit v1.2.1