From 0e0237e62dcdbdd9ef5686d37171b1d5a61fac2b Mon Sep 17 00:00:00 2001 From: xuri Date: Fri, 7 May 2021 23:08:58 +0800 Subject: compatibility with non-standard page setup attributes --- sheet.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sheet.go') 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) } } -- cgit v1.2.1