mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
fix:create_sheet(index) index>sheetcount error
This commit is contained in:
parent
297b331435
commit
508c9c43dc
|
@ -1091,6 +1091,11 @@ void workbook::remove_sheet(worksheet ws)
|
||||||
|
|
||||||
worksheet workbook::create_sheet(std::size_t index)
|
worksheet workbook::create_sheet(std::size_t index)
|
||||||
{
|
{
|
||||||
|
if (index > d_->worksheets_.size())
|
||||||
|
{
|
||||||
|
throw invalid_parameter();
|
||||||
|
}
|
||||||
|
|
||||||
create_sheet();
|
create_sheet();
|
||||||
|
|
||||||
if (index != d_->worksheets_.size() - 1)
|
if (index != d_->worksheets_.size() - 1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user