diff options
Diffstat (limited to 'picture.go')
-rw-r--r-- | picture.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -479,7 +479,7 @@ func (f *File) getPicture(row, col int, drawingXML, drawingRelationships string) ok bool anchor *xdrCellAnchor deWsDr *decodeWsDr - xxRelationship *xlsxRelationship + drawRel *xlsxRelationship deTwoCellAnchor *decodeTwoCellAnchor ) @@ -487,10 +487,10 @@ func (f *File) getPicture(row, col int, drawingXML, drawingRelationships string) for _, anchor = range wsDr.TwoCellAnchor { if anchor.From != nil && anchor.Pic != nil { if anchor.From.Col == col && anchor.From.Row == row { - xxRelationship = f.getDrawingRelationships(drawingRelationships, + drawRel = f.getDrawingRelationships(drawingRelationships, anchor.Pic.BlipFill.Blip.Embed) - if _, ok = supportImageTypes[filepath.Ext(xxRelationship.Target)]; ok { - ret, buf = filepath.Base(xxRelationship.Target), []byte(f.XLSX[strings.Replace(xxRelationship.Target, "..", "xl", -1)]) + if _, ok = supportImageTypes[filepath.Ext(drawRel.Target)]; ok { + ret, buf = filepath.Base(drawRel.Target), []byte(f.XLSX[strings.Replace(drawRel.Target, "..", "xl", -1)]) return } } @@ -512,9 +512,9 @@ func (f *File) getPicture(row, col int, drawingXML, drawingRelationships string) } if err = nil; deTwoCellAnchor.From != nil && deTwoCellAnchor.Pic != nil { if deTwoCellAnchor.From.Col == col && deTwoCellAnchor.From.Row == row { - xxRelationship = f.getDrawingRelationships(drawingRelationships, deTwoCellAnchor.Pic.BlipFill.Blip.Embed) - if _, ok = supportImageTypes[filepath.Ext(xxRelationship.Target)]; ok { - ret, buf = filepath.Base(xxRelationship.Target), []byte(f.XLSX[strings.Replace(xxRelationship.Target, "..", "xl", -1)]) + drawRel = f.getDrawingRelationships(drawingRelationships, deTwoCellAnchor.Pic.BlipFill.Blip.Embed) + if _, ok = supportImageTypes[filepath.Ext(drawRel.Target)]; ok { + ret, buf = filepath.Base(drawRel.Target), []byte(f.XLSX[strings.Replace(drawRel.Target, "..", "xl", -1)]) return } } |