diff options
author | xuri <xuri.me@gmail.com> | 2021-05-07 23:08:58 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-05-07 23:08:58 +0800 |
commit | 0e0237e62dcdbdd9ef5686d37171b1d5a61fac2b (patch) | |
tree | 6b77119147aa3f7904b9128f70eecf6cd91628cd /sheet.go | |
parent | 438fd4b3f958dc3edbbe4915e866ac639a3135f1 (diff) |
compatibility with non-standard page setup attributes
Diffstat (limited to 'sheet.go')
-rw-r--r-- | sheet.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) } } |