summaryrefslogtreecommitdiff
path: root/file.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-07-04 12:13:06 +0800
committerxuri <xuri.me@gmail.com>2021-07-04 12:13:06 +0800
commit0e02329bedf6648259fd219642bb907bdb07fd21 (patch)
tree16551d2174313dad46c3e276a6e27ffee5213bda /file.go
parent5ec61310dc55c9af93d66e6d225f721738416d1f (diff)
This closes #861, support concurrency get cell picture and remove unused internal function `getSheetNameByID`
Diffstat (limited to 'file.go')
-rw-r--r--file.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/file.go b/file.go
index 495718a..fa73ec8 100644
--- a/file.go
+++ b/file.go
@@ -17,6 +17,7 @@ import (
"fmt"
"io"
"os"
+ "sync"
)
// NewFile provides a function to create new file by default template. For
@@ -40,13 +41,13 @@ func NewFile() *File {
f.CalcChain = f.calcChainReader()
f.Comments = make(map[string]*xlsxComments)
f.ContentTypes = f.contentTypesReader()
- f.Drawings = make(map[string]*xlsxWsDr)
+ f.Drawings = sync.Map{}
f.Styles = f.stylesReader()
f.DecodeVMLDrawing = make(map[string]*decodeVmlDrawing)
f.VMLDrawing = make(map[string]*vmlDrawing)
f.WorkBook = f.workbookReader()
- f.Relationships = make(map[string]*xlsxRelationships)
- f.Relationships["xl/_rels/workbook.xml.rels"] = f.relsReader("xl/_rels/workbook.xml.rels")
+ f.Relationships = sync.Map{}
+ f.Relationships.Store("xl/_rels/workbook.xml.rels", f.relsReader("xl/_rels/workbook.xml.rels"))
f.Sheet["xl/worksheets/sheet1.xml"], _ = f.workSheetReader("Sheet1")
f.sheetMap["Sheet1"] = "xl/worksheets/sheet1.xml"
f.Theme = f.themeReader()