@@ -13,7 +13,10 @@ var _ = []SheetPrOption{
1313 EnableFormatConditionsCalculation (false ),
1414 Published (false ),
1515 FitToPage (true ),
16- TabColor ("#FFFF00" ),
16+ TabColorIndexed (42 ),
17+ TabColorRGB ("#FFFF00" ),
18+ TabColorTheme (TabColorThemeLight2 ),
19+ TabColorTint (0.5 ),
1720 AutoPageBreaks (true ),
1821 OutlineSummaryBelow (true ),
1922}
@@ -23,7 +26,10 @@ var _ = []SheetPrOptionPtr{
2326 (* EnableFormatConditionsCalculation )(nil ),
2427 (* Published )(nil ),
2528 (* FitToPage )(nil ),
26- (* TabColor )(nil ),
29+ (* TabColorIndexed )(nil ),
30+ (* TabColorRGB )(nil ),
31+ (* TabColorTheme )(nil ),
32+ (* TabColorTint )(nil ),
2733 (* AutoPageBreaks )(nil ),
2834 (* OutlineSummaryBelow )(nil ),
2935}
@@ -37,7 +43,10 @@ func ExampleFile_SetSheetPrOptions() {
3743 EnableFormatConditionsCalculation (false ),
3844 Published (false ),
3945 FitToPage (true ),
40- TabColor ("#FFFF00" ),
46+ TabColorIndexed (42 ),
47+ TabColorRGB ("#FFFF00" ),
48+ TabColorTheme (TabColorThemeLight2 ),
49+ TabColorTint (0.5 ),
4150 AutoPageBreaks (true ),
4251 OutlineSummaryBelow (false ),
4352 ); err != nil {
@@ -55,7 +64,10 @@ func ExampleFile_GetSheetPrOptions() {
5564 enableFormatConditionsCalculation EnableFormatConditionsCalculation
5665 published Published
5766 fitToPage FitToPage
58- tabColor TabColor
67+ tabColorIndexed TabColorIndexed
68+ tabColorRGB TabColorRGB
69+ tabColorTheme TabColorTheme
70+ tabColorTint TabColorTint
5971 autoPageBreaks AutoPageBreaks
6072 outlineSummaryBelow OutlineSummaryBelow
6173 )
@@ -65,7 +77,10 @@ func ExampleFile_GetSheetPrOptions() {
6577 & enableFormatConditionsCalculation ,
6678 & published ,
6779 & fitToPage ,
68- & tabColor ,
80+ & tabColorIndexed ,
81+ & tabColorRGB ,
82+ & tabColorTheme ,
83+ & tabColorTint ,
6984 & autoPageBreaks ,
7085 & outlineSummaryBelow ,
7186 ); err != nil {
@@ -76,7 +91,10 @@ func ExampleFile_GetSheetPrOptions() {
7691 fmt .Println ("- enableFormatConditionsCalculation:" , enableFormatConditionsCalculation )
7792 fmt .Println ("- published:" , published )
7893 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 )
8098 fmt .Println ("- autoPageBreaks:" , autoPageBreaks )
8199 fmt .Println ("- outlineSummaryBelow:" , outlineSummaryBelow )
82100 // Output:
@@ -85,7 +103,10 @@ func ExampleFile_GetSheetPrOptions() {
85103 // - enableFormatConditionsCalculation: true
86104 // - published: true
87105 // - fitToPage: false
88- // - tabColor: ""
106+ // - tabColorIndexed: -1
107+ // - tabColorRGB: ""
108+ // - tabColorTheme: -1
109+ // - tabColorTint: 0.000000
89110 // - autoPageBreaks: false
90111 // - outlineSummaryBelow: true
91112}
@@ -101,7 +122,10 @@ func TestSheetPrOptions(t *testing.T) {
101122 {new (EnableFormatConditionsCalculation ), EnableFormatConditionsCalculation (false )},
102123 {new (Published ), Published (false )},
103124 {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 )},
105129 {new (AutoPageBreaks ), AutoPageBreaks (true )},
106130 {new (OutlineSummaryBelow ), OutlineSummaryBelow (false )},
107131 }
@@ -154,7 +178,7 @@ func TestSheetPrOptions(t *testing.T) {
154178
155179func TestSetSheetPrOptions (t * testing.T ) {
156180 f := NewFile ()
157- assert .NoError (t , f .SetSheetPrOptions ("Sheet1" , TabColor ("" )))
181+ assert .NoError (t , f .SetSheetPrOptions ("Sheet1" , TabColorRGB ("" )))
158182 // Test SetSheetPrOptions on not exists worksheet.
159183 assert .EqualError (t , f .SetSheetPrOptions ("SheetN" ), "sheet SheetN is not exist" )
160184}
0 commit comments