DamianSzkuat před 6 roky
rodič
revize
e7808e5231
3 změnil soubory, kde provedl 6 přidání a 6 odebrání
  1. 2 2
      stream_style.go
  2. 3 3
      stream_style_test.go
  3. 1 1
      style.go

+ 2 - 2
stream_style.go

@@ -77,7 +77,7 @@ func init() {
 }
 
 // MakeStyle creates a new StreamStyle and add it to the styles that will be streamed.
-func MakeStyle(formatStyleId int, font *Font, fill *Fill, alignment *Alignment, border *Border) StreamStyle {
+func MakeStyle(numFormatId int, font *Font, fill *Fill, alignment *Alignment, border *Border) StreamStyle {
 	newStyle := NewStyle()
 
 	newStyle.Font = *font
@@ -91,7 +91,7 @@ func MakeStyle(formatStyleId int, font *Font, fill *Fill, alignment *Alignment,
 	newStyle.ApplyBorder = true
 
 	newStreamStyle := StreamStyle{
-		xNumFmtId: formatStyleId,
+		xNumFmtId: numFormatId,
 		style:     newStyle,
 	}
 

+ 3 - 3
stream_style_test.go

@@ -485,15 +485,15 @@ func (s *StreamSuite) TestMakeNewStylesAndUseIt(t *C) {
 	}
 
 	timesNewRoman12 := NewFont(12, TimesNewRoman)
-	timesNewRoman12.Color = RGB_Dard_Green
+	timesNewRoman12.Color = RGB_Dark_Green
 	courier12 := NewFont(12, Courier)
 	courier12.Color = RGB_Dark_Red
 
 	greenFill := NewFill(Solid_Cell_Fill, RGB_Light_Green, RGB_White)
 	redFill := NewFill(Solid_Cell_Fill, RGB_Light_Red, RGB_White)
 
-	greenStyle := MakeStyle(0, timesNewRoman12, greenFill, DefaultAlignment(), DefaultBorder())
-	redStyle := MakeStyle(0, courier12, redFill, DefaultAlignment(), DefaultBorder())
+	greenStyle := MakeStyle(GeneralFormat, timesNewRoman12, greenFill, DefaultAlignment(), DefaultBorder())
+	redStyle := MakeStyle(GeneralFormat, courier12, redFill, DefaultAlignment(), DefaultBorder())
 
 	sheetNames := []string{"Sheet1"}
 	workbookData := [][][]StreamCell{

+ 1 - 1
style.go

@@ -14,7 +14,7 @@ const (
 
 const (
 	RGB_Light_Green = "FFC6EFCE"
-	RGB_Dard_Green  = "FF006100"
+	RGB_Dark_Green  = "FF006100"
 	RGB_Light_Red   = "FFFFC7CE"
 	RGB_Dark_Red    = "FF9C0006"
 	RGB_White       = "00000000"