Fix test case - page size now optional.

This commit is contained in:
Wu, Ganhao 2021-09-04 02:15:19 +08:00
parent 1be73c40f8
commit b81d76a223
3 changed files with 3 additions and 4 deletions

1
.gitignore vendored
View File

@ -19,6 +19,7 @@ python/xlntpyarrow.egg-info/
/x64/ /x64/
.envrc .envrc
.vscode .vscode
/dist/
/.vs/ /.vs/
/out/ /out/
/CMakeSettings.json /CMakeSettings.json

View File

@ -29,11 +29,9 @@ namespace xlnt {
page_setup::page_setup() page_setup::page_setup()
: break_(xlnt::page_break::none), : break_(xlnt::page_break::none),
sheet_state_(xlnt::sheet_state::visible), sheet_state_(xlnt::sheet_state::visible),
paper_size_(xlnt::paper_size::letter),
fit_to_page_(false), fit_to_page_(false),
fit_to_height_(false), fit_to_height_(false),
fit_to_width_(false), fit_to_width_(false)
scale_(1)
{ {
} }

View File

@ -38,7 +38,7 @@ public:
{ {
xlnt::page_setup ps; xlnt::page_setup ps;
xlnt_assert_equals(ps.paper_size(), xlnt::paper_size::letter); xlnt_assert(!ps.has_paper_size());
ps.paper_size(xlnt::paper_size::executive); ps.paper_size(xlnt::paper_size::executive);
xlnt_assert_equals(ps.paper_size(), xlnt::paper_size::executive); xlnt_assert_equals(ps.paper_size(), xlnt::paper_size::executive);