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