diff options
author | xuri <xuri.me@gmail.com> | 2021-02-24 00:37:44 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-02-24 00:37:44 +0800 |
commit | 5a0d885315521a4e703f9de401e2dda834285d5f (patch) | |
tree | a11d403343e2a4f1fc9fdfb3f22440ce349b022f /cell.go | |
parent | d84050921eddf5c4221f8723477be2ac93f56ecc (diff) |
handle default underline type on get rich text; #65 fn: CODE, COLUMN, FIND, FINDB
Diffstat (limited to 'cell.go')
-rw-r--r-- | cell.go | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -519,11 +519,14 @@ func (f *File) GetCellRichText(sheet, cell string) (runs []RichTextRun, err erro Text: v.T.Val, } if nil != v.RPr { - font := Font{} + font := Font{Underline: "none"} font.Bold = v.RPr.B != nil font.Italic = v.RPr.I != nil - if v.RPr.U != nil && v.RPr.U.Val != nil { - font.Underline = *v.RPr.U.Val + if v.RPr.U != nil { + font.Underline = "single" + if v.RPr.U.Val != nil { + font.Underline = *v.RPr.U.Val + } } if v.RPr.RFont != nil && v.RPr.RFont.Val != nil { font.Family = *v.RPr.RFont.Val |