summaryrefslogtreecommitdiff
path: root/sheet.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-05-07 23:08:58 +0800
committerxuri <xuri.me@gmail.com>2021-05-07 23:08:58 +0800
commit0e0237e62dcdbdd9ef5686d37171b1d5a61fac2b (patch)
tree6b77119147aa3f7904b9128f70eecf6cd91628cd /sheet.go
parent438fd4b3f958dc3edbbe4915e866ac639a3135f1 (diff)
compatibility with non-standard page setup attributes
Diffstat (limited to 'sheet.go')
-rw-r--r--sheet.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/sheet.go b/sheet.go
index de46e90..7541f43 100644
--- a/sheet.go
+++ b/sheet.go
@@ -1204,8 +1204,8 @@ func (p *BlackAndWhite) getPageLayout(ps *xlsxPageSetUp) {
// setPageLayout provides a method to set the first printed page number for
// the worksheet.
func (p FirstPageNumber) setPageLayout(ps *xlsxPageSetUp) {
- if 0 < uint(p) {
- ps.FirstPageNumber = uint(p)
+ if 0 < int(p) {
+ ps.FirstPageNumber = int(p)
ps.UseFirstPageNumber = true
}
}
@@ -1284,8 +1284,8 @@ func (p *FitToWidth) getPageLayout(ps *xlsxPageSetUp) {
// setPageLayout provides a method to set the scale for the worksheet.
func (p PageLayoutScale) setPageLayout(ps *xlsxPageSetUp) {
- if 10 <= uint(p) && uint(p) <= 400 {
- ps.Scale = uint(p)
+ if 10 <= int(p) && int(p) <= 400 {
+ ps.Scale = int(p)
}
}