瀏覽代碼

Merge pull request #156 from dolmen-go/fix/SheetViewOptPtr-is-a-SheetViewOpt

SheetViewOptionPtr: document that it is a superset of SheetViewOption
xuri 8 年之前
父節點
當前提交
3d231cb549
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 1 0
      sheetview.go
  2. 6 0
      sheetview_test.go

+ 1 - 0
sheetview.go

@@ -9,6 +9,7 @@ type SheetViewOption interface {
 
 // SheetViewOptionPtr is a writable SheetViewOption. See GetSheetViewOptions().
 type SheetViewOptionPtr interface {
+	SheetViewOption
 	getSheetViewOption(view *xlsxSheetView)
 }
 

+ 6 - 0
sheetview_test.go

@@ -13,6 +13,12 @@ var _ = []excelize.SheetViewOption{
 	excelize.ShowFormulas(false),
 	excelize.ShowGridLines(true),
 	excelize.ShowRowColHeaders(true),
+	// SheetViewOptionPtr are also SheetViewOption
+	new(excelize.DefaultGridColor),
+	new(excelize.RightToLeft),
+	new(excelize.ShowFormulas),
+	new(excelize.ShowGridLines),
+	new(excelize.ShowRowColHeaders),
 }
 
 var _ = []excelize.SheetViewOptionPtr{