mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Merge pull request #529 from emmanuel099/worksheet_empty
worksheet: Add method to check if the worksheet is empty
This commit is contained in:
commit
bf90210d26
|
@ -770,6 +770,12 @@ public:
|
|||
/// </summary>
|
||||
bool has_drawing() const;
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if this worksheet is empty.
|
||||
/// A worksheet is considered empty if it doesn't have any cells.
|
||||
/// </summary>
|
||||
bool is_empty() const;
|
||||
|
||||
private:
|
||||
friend class cell;
|
||||
friend class const_range_iterator;
|
||||
|
|
|
@ -1335,4 +1335,9 @@ bool worksheet::has_drawing() const
|
|||
return d_->drawing_.is_set();
|
||||
}
|
||||
|
||||
bool worksheet::is_empty() const
|
||||
{
|
||||
return d_->cell_map_.empty();
|
||||
}
|
||||
|
||||
} // namespace xlnt
|
||||
|
|
Loading…
Reference in New Issue
Block a user