summaryrefslogtreecommitdiff
path: root/sheet.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-01-12 00:18:15 +0800
committerxuri <xuri.me@gmail.com>2022-01-12 00:18:15 +0800
commitb96329cc88b87da25a4389f1d4d5ad08cd40605a (patch)
tree4f05daa1402bbbd27bc35ecb7ad9e95b5cb31e76 /sheet.go
parent891e5baac1a6ac67123fbc6a68f801720882b8ec (diff)
Breaking change for data validation and fixed #1117
- Remove second useless parameter `isCurrentSheet` of the function `SetSqrefDropList` - Fix missing page setup of worksheet after re-saving the spreadsheet
Diffstat (limited to 'sheet.go')
-rw-r--r--sheet.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/sheet.go b/sheet.go
index 3eea6dc..2426bf8 100644
--- a/sheet.go
+++ b/sheet.go
@@ -1335,49 +1335,49 @@ func (o *PageLayoutOrientation) getPageLayout(ps *xlsxPageSetUp) {
// setPageLayout provides a method to set the paper size for the worksheet.
func (p PageLayoutPaperSize) setPageLayout(ps *xlsxPageSetUp) {
- ps.PaperSize = int(p)
+ ps.PaperSize = intPtr(int(p))
}
// getPageLayout provides a method to get the paper size for the worksheet.
func (p *PageLayoutPaperSize) getPageLayout(ps *xlsxPageSetUp) {
// Excel default: 1
- if ps == nil || ps.PaperSize == 0 {
+ if ps == nil || ps.PaperSize == nil {
*p = 1
return
}
- *p = PageLayoutPaperSize(ps.PaperSize)
+ *p = PageLayoutPaperSize(*ps.PaperSize)
}
// setPageLayout provides a method to set the fit to height for the worksheet.
func (p FitToHeight) setPageLayout(ps *xlsxPageSetUp) {
if int(p) > 0 {
- ps.FitToHeight = int(p)
+ ps.FitToHeight = intPtr(int(p))
}
}
// getPageLayout provides a method to get the fit to height for the worksheet.
func (p *FitToHeight) getPageLayout(ps *xlsxPageSetUp) {
- if ps == nil || ps.FitToHeight == 0 {
+ if ps == nil || ps.FitToHeight == nil {
*p = 1
return
}
- *p = FitToHeight(ps.FitToHeight)
+ *p = FitToHeight(*ps.FitToHeight)
}
// setPageLayout provides a method to set the fit to width for the worksheet.
func (p FitToWidth) setPageLayout(ps *xlsxPageSetUp) {
if int(p) > 0 {
- ps.FitToWidth = int(p)
+ ps.FitToWidth = intPtr(int(p))
}
}
// getPageLayout provides a method to get the fit to width for the worksheet.
func (p *FitToWidth) getPageLayout(ps *xlsxPageSetUp) {
- if ps == nil || ps.FitToWidth == 0 {
+ if ps == nil || ps.FitToWidth == nil {
*p = 1
return
}
- *p = FitToWidth(ps.FitToWidth)
+ *p = FitToWidth(*ps.FitToWidth)
}
// setPageLayout provides a method to set the scale for the worksheet.