add overload to worksheet::get_cell which accepts a column and row

This commit is contained in:
Thomas Fussell 2016-11-19 23:44:28 -05:00
parent 455be8fb5f
commit 846ea8e0d6
4 changed files with 13 additions and 3 deletions

View File

@ -4,8 +4,6 @@ set(LIBRARY_VERSION 0.9.0)
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
# Global platform-specific definitions # Global platform-specific definitions
if(MSVC) if(MSVC)
add_definitions(-DUNICODE -D_UNICODE) add_definitions(-DUNICODE -D_UNICODE)

View File

@ -95,6 +95,8 @@ public:
bool has_frozen_panes() const; bool has_frozen_panes() const;
// container // container
cell get_cell(column_t column, row_t row);
const cell get_cell(column_t column, row_t row) const;
cell get_cell(const cell_reference &reference); cell get_cell(const cell_reference &reference);
const cell get_cell(const cell_reference &reference) const; const cell get_cell(const cell_reference &reference) const;
bool has_cell(const cell_reference &reference) const; bool has_cell(const cell_reference &reference) const;

View File

@ -338,6 +338,16 @@ void worksheet::unfreeze_panes()
d_->view_.get_pane().state = pane_state::normal; d_->view_.get_pane().state = pane_state::normal;
} }
cell worksheet::get_cell(column_t column, row_t row)
{
return get_cell(cell_reference(column, row));
}
const cell worksheet::get_cell(column_t column, row_t row) const
{
return get_cell(cell_reference(column, row));
}
cell worksheet::get_cell(const cell_reference &reference) cell worksheet::get_cell(const cell_reference &reference)
{ {
if (d_->cell_map_.find(reference.get_row()) == d_->cell_map_.end()) if (d_->cell_map_.find(reference.get_row()) == d_->cell_map_.end())

2
third-party/botan vendored

@ -1 +1 @@
Subproject commit 523b2a4ca48fa5cf04ea371aabe7167ce2e5cd13 Subproject commit 923a95d546df5b6d31f39b0af900d0361fb2e6a6