mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Add implement const version of workbook::get_sheet_by_name().
and non const version are based on const version.
This commit is contained in:
parent
4e9c48eba9
commit
ba2d4743a6
|
@ -93,7 +93,7 @@ workbook::workbook(encoding e) : workbook()
|
||||||
d_->encoding_ = e;
|
d_->encoding_ = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
worksheet workbook::get_sheet_by_name(const std::string &name)
|
const worksheet workbook::get_sheet_by_name(const std::string &name) const
|
||||||
{
|
{
|
||||||
for (auto &impl : d_->worksheets_)
|
for (auto &impl : d_->worksheets_)
|
||||||
{
|
{
|
||||||
|
@ -106,6 +106,11 @@ worksheet workbook::get_sheet_by_name(const std::string &name)
|
||||||
return worksheet();
|
return worksheet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
worksheet workbook::get_sheet_by_name(const std::string &name)
|
||||||
|
{
|
||||||
|
return worksheet(static_cast<const workbook*>(this)->get_sheet_by_name(name));
|
||||||
|
}
|
||||||
|
|
||||||
worksheet workbook::get_sheet_by_index(std::size_t index)
|
worksheet workbook::get_sheet_by_index(std::size_t index)
|
||||||
{
|
{
|
||||||
return worksheet(&d_->worksheets_[index]);
|
return worksheet(&d_->worksheets_[index]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user