@@ -13,7 +13,10 @@ var _ = []SheetPrOption{
13
13
EnableFormatConditionsCalculation (false ),
14
14
Published (false ),
15
15
FitToPage (true ),
16
- TabColor ("#FFFF00" ),
16
+ TabColorIndexed (42 ),
17
+ TabColorRGB ("#FFFF00" ),
18
+ TabColorTheme (TabColorThemeLight2 ),
19
+ TabColorTint (0.5 ),
17
20
AutoPageBreaks (true ),
18
21
OutlineSummaryBelow (true ),
19
22
}
@@ -23,7 +26,10 @@ var _ = []SheetPrOptionPtr{
23
26
(* EnableFormatConditionsCalculation )(nil ),
24
27
(* Published )(nil ),
25
28
(* FitToPage )(nil ),
26
- (* TabColor )(nil ),
29
+ (* TabColorIndexed )(nil ),
30
+ (* TabColorRGB )(nil ),
31
+ (* TabColorTheme )(nil ),
32
+ (* TabColorTint )(nil ),
27
33
(* AutoPageBreaks )(nil ),
28
34
(* OutlineSummaryBelow )(nil ),
29
35
}
@@ -37,7 +43,10 @@ func ExampleFile_SetSheetPrOptions() {
37
43
EnableFormatConditionsCalculation (false ),
38
44
Published (false ),
39
45
FitToPage (true ),
40
- TabColor ("#FFFF00" ),
46
+ TabColorIndexed (42 ),
47
+ TabColorRGB ("#FFFF00" ),
48
+ TabColorTheme (TabColorThemeLight2 ),
49
+ TabColorTint (0.5 ),
41
50
AutoPageBreaks (true ),
42
51
OutlineSummaryBelow (false ),
43
52
); err != nil {
@@ -55,7 +64,10 @@ func ExampleFile_GetSheetPrOptions() {
55
64
enableFormatConditionsCalculation EnableFormatConditionsCalculation
56
65
published Published
57
66
fitToPage FitToPage
58
- tabColor TabColor
67
+ tabColorIndexed TabColorIndexed
68
+ tabColorRGB TabColorRGB
69
+ tabColorTheme TabColorTheme
70
+ tabColorTint TabColorTint
59
71
autoPageBreaks AutoPageBreaks
60
72
outlineSummaryBelow OutlineSummaryBelow
61
73
)
@@ -65,7 +77,10 @@ func ExampleFile_GetSheetPrOptions() {
65
77
& enableFormatConditionsCalculation ,
66
78
& published ,
67
79
& fitToPage ,
68
- & tabColor ,
80
+ & tabColorIndexed ,
81
+ & tabColorRGB ,
82
+ & tabColorTheme ,
83
+ & tabColorTint ,
69
84
& autoPageBreaks ,
70
85
& outlineSummaryBelow ,
71
86
); err != nil {
@@ -76,7 +91,10 @@ func ExampleFile_GetSheetPrOptions() {
76
91
fmt .Println ("- enableFormatConditionsCalculation:" , enableFormatConditionsCalculation )
77
92
fmt .Println ("- published:" , published )
78
93
fmt .Println ("- fitToPage:" , fitToPage )
79
- fmt .Printf ("- tabColor: %q\n " , tabColor )
94
+ fmt .Printf ("- tabColorIndexed: %d\n " , tabColorIndexed )
95
+ fmt .Printf ("- tabColorRGB: %q\n " , tabColorRGB )
96
+ fmt .Printf ("- tabColorTheme: %d\n " , tabColorTheme )
97
+ fmt .Printf ("- tabColorTint: %f\n " , tabColorTint )
80
98
fmt .Println ("- autoPageBreaks:" , autoPageBreaks )
81
99
fmt .Println ("- outlineSummaryBelow:" , outlineSummaryBelow )
82
100
// Output:
@@ -85,7 +103,10 @@ func ExampleFile_GetSheetPrOptions() {
85
103
// - enableFormatConditionsCalculation: true
86
104
// - published: true
87
105
// - fitToPage: false
88
- // - tabColor: ""
106
+ // - tabColorIndexed: -1
107
+ // - tabColorRGB: ""
108
+ // - tabColorTheme: -1
109
+ // - tabColorTint: 0.000000
89
110
// - autoPageBreaks: false
90
111
// - outlineSummaryBelow: true
91
112
}
@@ -101,7 +122,10 @@ func TestSheetPrOptions(t *testing.T) {
101
122
{new (EnableFormatConditionsCalculation ), EnableFormatConditionsCalculation (false )},
102
123
{new (Published ), Published (false )},
103
124
{new (FitToPage ), FitToPage (true )},
104
- {new (TabColor ), TabColor ("FFFF00" )},
125
+ {new (TabColorIndexed ), TabColorIndexed (42 )},
126
+ {new (TabColorRGB ), TabColorRGB ("FFFF00" )},
127
+ {new (TabColorTheme ), TabColorTheme (TabColorThemeLight2 )},
128
+ {new (TabColorTint ), TabColorTint (0.5 )},
105
129
{new (AutoPageBreaks ), AutoPageBreaks (true )},
106
130
{new (OutlineSummaryBelow ), OutlineSummaryBelow (false )},
107
131
}
@@ -154,7 +178,7 @@ func TestSheetPrOptions(t *testing.T) {
154
178
155
179
func TestSetSheetPrOptions (t * testing.T ) {
156
180
f := NewFile ()
157
- assert .NoError (t , f .SetSheetPrOptions ("Sheet1" , TabColor ("" )))
181
+ assert .NoError (t , f .SetSheetPrOptions ("Sheet1" , TabColorRGB ("" )))
158
182
// Test SetSheetPrOptions on not exists worksheet.
159
183
assert .EqualError (t , f .SetSheetPrOptions ("SheetN" ), "sheet SheetN is not exist" )
160
184
}
0 commit comments