Skip to content

Commit 1111de2

Browse files
committedSep 3, 2020
improve compatibility for phonetic hint and sheet tab color
1 parent 98f1a69 commit 1111de2

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed
 

‎xmlComments.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ type xlsxText struct {
6969
type xlsxPhoneticRun struct {
7070
Sb uint32 `xml:"sb,attr"`
7171
Eb uint32 `xml:"eb,attr"`
72-
T string `xml:"t,attr"`
72+
T string `xml:"t"`
7373
}
7474

7575
// formatComment directly maps the format settings of the comment.

‎xmlSharedStrings.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ type xlsxSST struct {
3838
// level - then the string item shall consist of multiple rich text runs which
3939
// collectively are used to express the string.
4040
type xlsxSI struct {
41-
T *xlsxT `xml:"t,omitempty"`
42-
R []xlsxR `xml:"r"`
41+
T *xlsxT `xml:"t,omitempty"`
42+
R []xlsxR `xml:"r"`
43+
RPh []*xlsxPhoneticRun `xml:"rPh"`
44+
PhoneticPr *xlsxPhoneticPr `xml:"phoneticPr"`
4345
}
4446

4547
// String extracts characters from a string item.

‎xmlWorksheet.go

+10-5
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,11 @@ type xlsxSheetPr struct {
234234
SyncVertical bool `xml:"syncVertical,attr,omitempty"`
235235
SyncRef string `xml:"syncRef,attr,omitempty"`
236236
TransitionEvaluation bool `xml:"transitionEvaluation,attr,omitempty"`
237+
TransitionEntry bool `xml:"transitionEntry,attr,omitempty"`
237238
Published *bool `xml:"published,attr"`
238239
CodeName string `xml:"codeName,attr,omitempty"`
239240
FilterMode bool `xml:"filterMode,attr,omitempty"`
240241
EnableFormatConditionsCalculation *bool `xml:"enableFormatConditionsCalculation,attr"`
241-
TransitionEntry bool `xml:"transitionEntry,attr,omitempty"`
242242
TabColor *xlsxTabColor `xml:"tabColor,omitempty"`
243243
OutlinePr *xlsxOutlinePr `xml:"outlinePr,omitempty"`
244244
PageSetUpPr *xlsxPageSetUpPr `xml:"pageSetUpPr,omitempty"`
@@ -247,7 +247,10 @@ type xlsxSheetPr struct {
247247
// xlsxOutlinePr maps to the outlinePr element. SummaryBelow allows you to
248248
// adjust the direction of grouper controls.
249249
type xlsxOutlinePr struct {
250-
SummaryBelow bool `xml:"summaryBelow,attr"`
250+
ApplyStyles *bool `xml:"applyStyles,attr"`
251+
SummaryBelow bool `xml:"summaryBelow,attr,omitempty"`
252+
SummaryRight bool `xml:"summaryRight,attr,omitempty"`
253+
ShowOutlineSymbols bool `xml:"showOutlineSymbols,attr,omitempty"`
251254
}
252255

253256
// xlsxPageSetUpPr expresses page setup properties of the worksheet.
@@ -258,9 +261,11 @@ type xlsxPageSetUpPr struct {
258261

259262
// xlsxTabColor represents background color of the sheet tab.
260263
type xlsxTabColor struct {
261-
RGB string `xml:"rgb,attr,omitempty"`
262-
Theme int `xml:"theme,attr,omitempty"`
263-
Tint float64 `xml:"tint,attr,omitempty"`
264+
Auto bool `xml:"auto,attr,omitempty"`
265+
Indexed int `xml:"indexed,attr,omitempty"`
266+
RGB string `xml:"rgb,attr,omitempty"`
267+
Theme int `xml:"theme,attr,omitempty"`
268+
Tint float64 `xml:"tint,attr,omitempty"`
264269
}
265270

266271
// xlsxCols defines column width and column formatting for one or more columns

0 commit comments

Comments
 (0)