summaryrefslogtreecommitdiff
path: root/styles.go
diff options
context:
space:
mode:
Diffstat (limited to 'styles.go')
-rw-r--r--styles.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/styles.go b/styles.go
index 61b8e53..72b2071 100644
--- a/styles.go
+++ b/styles.go
@@ -2299,21 +2299,21 @@ func setBorders(style *Style) *xlsxBorder {
// cell.
func setCellXfs(style *xlsxStyleSheet, fontID, numFmtID, fillID, borderID int, applyAlignment, applyProtection bool, alignment *xlsxAlignment, protection *xlsxProtection) int {
var xf xlsxXf
- xf.FontID = fontID
+ xf.FontID = intPtr(fontID)
if fontID != 0 {
- xf.ApplyFont = true
+ xf.ApplyFont = boolPtr(true)
}
- xf.NumFmtID = numFmtID
+ xf.NumFmtID = intPtr(numFmtID)
if numFmtID != 0 {
- xf.ApplyNumberFormat = true
+ xf.ApplyNumberFormat = boolPtr(true)
}
- xf.FillID = fillID
- xf.BorderID = borderID
+ xf.FillID = intPtr(fillID)
+ xf.BorderID = intPtr(borderID)
style.CellXfs.Count++
xf.Alignment = alignment
- xf.ApplyAlignment = applyAlignment
+ xf.ApplyAlignment = boolPtr(applyAlignment)
if applyProtection {
- xf.ApplyProtection = applyProtection
+ xf.ApplyProtection = boolPtr(applyProtection)
xf.Protection = protection
}
xfID := 0