summaryrefslogtreecommitdiff
path: root/picture.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2019-09-26 22:28:14 +0800
committerxuri <xuri.me@gmail.com>2019-09-26 22:28:14 +0800
commiteb520ae27757d4bca276fa2894bf461d75df9b37 (patch)
tree5fa25471b3b6590f5314445b49f909002b2962cb /picture.go
parent475fbf3856dd83c4813874570ae5ae2cb48ed421 (diff)
Improve compatibility for charts
Diffstat (limited to 'picture.go')
-rw-r--r--picture.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/picture.go b/picture.go
index 4470fa1..ff40863 100644
--- a/picture.go
+++ b/picture.go
@@ -272,7 +272,7 @@ func (f *File) addDrawingPicture(sheet, drawingXML, cell, file string, width, he
twoCellAnchor.To = &to
pic := xlsxPic{}
pic.NvPicPr.CNvPicPr.PicLocks.NoChangeAspect = formatSet.NoChangeAspect
- pic.NvPicPr.CNvPr.ID = len(content.OneCellAnchor) + len(content.TwoCellAnchor) + 2
+ pic.NvPicPr.CNvPr.ID = cNvPrID
pic.NvPicPr.CNvPr.Descr = file
pic.NvPicPr.CNvPr.Name = "Picture " + strconv.Itoa(cNvPrID)
if hyperlinkRID != 0 {