diff options
author | xuri <xuri.me@gmail.com> | 2021-02-23 00:05:19 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-02-23 00:05:19 +0800 |
commit | d84050921eddf5c4221f8723477be2ac93f56ecc (patch) | |
tree | ac3fdf2326fafc7de687a5f912e00ab63e65969e /cell.go | |
parent | bbb8ebfa8cc648ec09094d16eddebb03240baecf (diff) |
check empty rich text run properties; new formula fn: LEFT, LEFTB, RIGHT, RIGHTB
Diffstat (limited to 'cell.go')
-rw-r--r-- | cell.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -522,13 +522,13 @@ func (f *File) GetCellRichText(sheet, cell string) (runs []RichTextRun, err erro font := Font{} font.Bold = v.RPr.B != nil font.Italic = v.RPr.I != nil - if nil != v.RPr.U { + if v.RPr.U != nil && v.RPr.U.Val != nil { font.Underline = *v.RPr.U.Val } - if nil != v.RPr.RFont { + if v.RPr.RFont != nil && v.RPr.RFont.Val != nil { font.Family = *v.RPr.RFont.Val } - if nil != v.RPr.Sz { + if v.RPr.Sz != nil && v.RPr.Sz.Val != nil { font.Size = *v.RPr.Sz.Val } font.Strike = v.RPr.Strike != nil |