summaryrefslogtreecommitdiff
path: root/cell.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-02-24 00:37:44 +0800
committerxuri <xuri.me@gmail.com>2021-02-24 00:37:44 +0800
commit5a0d885315521a4e703f9de401e2dda834285d5f (patch)
treea11d403343e2a4f1fc9fdfb3f22440ce349b022f /cell.go
parentd84050921eddf5c4221f8723477be2ac93f56ecc (diff)
handle default underline type on get rich text; #65 fn: CODE, COLUMN, FIND, FINDB
Diffstat (limited to 'cell.go')
-rw-r--r--cell.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/cell.go b/cell.go
index 892a906..912ee6a 100644
--- a/cell.go
+++ b/cell.go
@@ -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