diff options
author | xuri <xuri.me@gmail.com> | 2020-07-11 02:31:02 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2020-07-11 02:31:02 +0800 |
commit | 0aa15106947965bdae9daae7571a4a3f569bf32d (patch) | |
tree | 212b49784a953a056169351be9d07e3abefb8a55 /picture.go | |
parent | 42b1c8148883844cf80b70a3096e6ee67be01f61 (diff) |
update docs and improve compatibility
Diffstat (limited to 'picture.go')
-rw-r--r-- | picture.go | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -549,11 +549,12 @@ func (f *File) getPictureFromWsDr(row, col int, drawingRelationships string, wsD for _, anchor = range wsDr.TwoCellAnchor { if anchor.From != nil && anchor.Pic != nil { if anchor.From.Col == col && anchor.From.Row == row { - drawRel = f.getDrawingRelationships(drawingRelationships, - anchor.Pic.BlipFill.Blip.Embed) - if _, ok = supportImageTypes[filepath.Ext(drawRel.Target)]; ok { - ret, buf = filepath.Base(drawRel.Target), f.XLSX[strings.Replace(drawRel.Target, "..", "xl", -1)] - return + if drawRel = f.getDrawingRelationships(drawingRelationships, + anchor.Pic.BlipFill.Blip.Embed); drawRel != nil { + if _, ok = supportImageTypes[filepath.Ext(drawRel.Target)]; ok { + ret, buf = filepath.Base(drawRel.Target), f.XLSX[strings.Replace(drawRel.Target, "..", "xl", -1)] + return + } } } } |