mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Merge 22e1868ab5fd6be77edd7c13698c45c1aff8de78 into 297b331435d6dee09bf89c8a5ad974b01f18039b
This commit is contained in:
commit
9ef3e1c872
@ -823,6 +823,9 @@ worksheet workbook::copy_sheet(worksheet to_copy)
|
||||
|
||||
worksheet workbook::copy_sheet(worksheet to_copy, std::size_t index)
|
||||
{
|
||||
if (index > d_->worksheets_.size())
|
||||
throw invalid_parameter();
|
||||
|
||||
copy_sheet(to_copy);
|
||||
|
||||
if (index != d_->worksheets_.size() - 1)
|
||||
@ -1091,6 +1094,11 @@ void workbook::remove_sheet(worksheet ws)
|
||||
|
||||
worksheet workbook::create_sheet(std::size_t index)
|
||||
{
|
||||
if (index > d_->worksheets_.size())
|
||||
{
|
||||
throw invalid_parameter();
|
||||
}
|
||||
|
||||
create_sheet();
|
||||
|
||||
if (index != d_->worksheets_.size() - 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user