summaryrefslogtreecommitdiff
path: root/picture.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2020-07-11 02:31:02 +0800
committerxuri <xuri.me@gmail.com>2020-07-11 02:31:02 +0800
commit0aa15106947965bdae9daae7571a4a3f569bf32d (patch)
tree212b49784a953a056169351be9d07e3abefb8a55 /picture.go
parent42b1c8148883844cf80b70a3096e6ee67be01f61 (diff)
update docs and improve compatibility
Diffstat (limited to 'picture.go')
-rw-r--r--picture.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/picture.go b/picture.go
index 0e9e3bb..c7f6e27 100644
--- a/picture.go
+++ b/picture.go
@@ -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
+ }
}
}
}