From 5384756d6483ba4bda294d47461c8df8b25c7a9c Mon Sep 17 00:00:00 2001 From: Ri Xu Date: Fri, 10 Mar 2017 23:10:15 +0800 Subject: - Complete the element `sheetFormatPr` struct definition; - Partial logic performance optimization, use pointer reference instead of a pass the variable value; - Add comments for content types struct definition; - Update go test `TestSetBorder` section --- cell.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cell.go') diff --git a/cell.go b/cell.go index ce5ba42..f67319c 100644 --- a/cell.go +++ b/cell.go @@ -111,7 +111,7 @@ func (f *File) SetCellFormula(sheet, axis, formula string) { } ok := f.checked[name] if !ok { - xlsx = checkRow(xlsx) + checkRow(&xlsx) f.checked[name] = true } if xlsx.MergeCells != nil { @@ -129,8 +129,8 @@ func (f *File) SetCellFormula(sheet, axis, formula string) { rows := xAxis + 1 cell := yAxis + 1 - xlsx = completeRow(xlsx, rows, cell) - xlsx = completeCol(xlsx, rows, cell) + completeRow(&xlsx, rows, cell) + completeCol(&xlsx, rows, cell) if xlsx.SheetData.Row[xAxis].C[yAxis].F != nil { xlsx.SheetData.Row[xAxis].C[yAxis].F.Content = formula @@ -156,7 +156,7 @@ func (f *File) SetCellHyperLink(sheet, axis, link string) { } ok := f.checked[name] if !ok { - xlsx = checkRow(xlsx) + checkRow(&xlsx) f.checked[name] = true } if xlsx.MergeCells != nil { @@ -226,7 +226,7 @@ func (f *File) MergeCell(sheet, hcell, vcell string) { } ok := f.checked[name] if !ok { - xlsx = checkRow(xlsx) + checkRow(&xlsx) f.checked[name] = true } if xlsx.MergeCells != nil { -- cgit v1.2.1