summaryrefslogtreecommitdiff
path: root/sheetview_test.go
diff options
context:
space:
mode:
authorOlivier Mengué <dolmen@cpan.org>2017-11-17 19:43:32 +0100
committerOlivier Mengué <dolmen@cpan.org>2017-11-17 19:43:32 +0100
commitd2fb0197abb325ee7bbdd6576e9520c9ec8c9c8e (patch)
tree7c8e2a50acaa5026b9716fbf6a7a30304ba3035e /sheetview_test.go
parent90998bfb4daac6e38346c03f41cb3c4e78b1ef7a (diff)
SheetViewOptionPtr: document that it is a superset of SheetViewOption
Document in type system (not just in text for humans) that all SheetViewOptionPtr are also SheetViewOption (well, if not nil). This improves documentation visible with godoc but this simple change also allows more flexibility to manipulate SheetViewOption programatically such as saving and restoring values: var opt excelize.ShowFormulas opt = new(excelize.ShowFormulas) _ = xl.GetSheetViewOptions(sheet, -1, opt) _ = xl.SetSheetViewOptions(sheet, -1, opt)
Diffstat (limited to 'sheetview_test.go')
-rw-r--r--sheetview_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/sheetview_test.go b/sheetview_test.go
index 348b9b7..2061012 100644
--- a/sheetview_test.go
+++ b/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{