summaryrefslogtreecommitdiff
path: root/chart.go
diff options
context:
space:
mode:
authorRi Xu <xuri.me@gmail.com>2017-05-25 11:15:38 +0800
committerRi Xu <xuri.me@gmail.com>2017-05-25 11:15:38 +0800
commit7c3f91ada483194018fca95c6caae03b22247d52 (patch)
treeed0bb11ff00d25b5c984863c06890a5c96d78e41 /chart.go
parentfbc3d1cd01ed24f8a8f56bed947af14ed346f60a (diff)
Fix non-visual canvas properties ID calculator.
Diffstat (limited to 'chart.go')
-rw-r--r--chart.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/chart.go b/chart.go
index 3ff92b8..b8464ad 100644
--- a/chart.go
+++ b/chart.go
@@ -806,7 +806,8 @@ func (f *File) drawPlotAreaTxPr() *cTxPr {
// problem that the label structure is changed after serialization and
// deserialization, two different structures: decodeWsDr and encodeWsDr are
// defined.
-func (f *File) drawingParser(drawingXML string, cNvPrID int, content *xlsxWsDr) {
+func (f *File) drawingParser(drawingXML string, content *xlsxWsDr) int {
+ cNvPrID := 1
_, ok := f.XLSX[drawingXML]
if ok { // Append Model
decodeWsDr := decodeWsDr{}
@@ -825,6 +826,7 @@ func (f *File) drawingParser(drawingXML string, cNvPrID int, content *xlsxWsDr)
})
}
}
+ return cNvPrID
}
// addDrawingChart provides function to add chart graphic frame by given sheet,
@@ -841,8 +843,7 @@ func (f *File) addDrawingChart(sheet, drawingXML, cell string, width, height, rI
content := xlsxWsDr{}
content.A = NameSpaceDrawingML
content.Xdr = NameSpaceDrawingMLSpreadSheet
- cNvPrID := 1
- f.drawingParser(drawingXML, cNvPrID, &content)
+ cNvPrID := f.drawingParser(drawingXML, &content)
twoCellAnchor := xdrCellAnchor{}
twoCellAnchor.EditAs = "oneCell"
from := xlsxFrom{}