mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
let's just get rid of the method
This commit is contained in:
parent
7743750dfa
commit
30776eb77c
|
@ -39,8 +39,6 @@ class cell_iterator;
|
|||
class const_cell_iterator;
|
||||
class range_reference;
|
||||
|
||||
using cell_ = cell;
|
||||
|
||||
/// <summary>
|
||||
/// A cell vector is a linear (1D) range of cells, either vertical or horizontal
|
||||
/// depending on the major order specified in the constructor.
|
||||
|
@ -103,16 +101,6 @@ public:
|
|||
/// </summary>
|
||||
const cell operator[](std::size_t column_index) const;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
cell_ cell(std::size_t column_index);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
const class cell cell(std::size_t column_index) const;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
|
@ -67,7 +67,12 @@ cell_vector::const_iterator cell_vector::cend() const
|
|||
|
||||
cell cell_vector::operator[](std::size_t cell_index)
|
||||
{
|
||||
return cell(cell_index);
|
||||
if (order_ == major_order::row)
|
||||
{
|
||||
return ws_.cell(ref_.top_left().make_offset(static_cast<int>(cell_index), 0));
|
||||
}
|
||||
|
||||
return ws_.cell(ref_.top_left().make_offset(0, static_cast<int>(cell_index)));
|
||||
}
|
||||
|
||||
cell_vector::cell_vector(worksheet ws, const range_reference &reference, major_order order)
|
||||
|
@ -95,16 +100,6 @@ cell cell_vector::back()
|
|||
return ws_.cell(ref_.bottom_right());
|
||||
}
|
||||
|
||||
cell cell_vector::cell(std::size_t index)
|
||||
{
|
||||
if (order_ == major_order::row)
|
||||
{
|
||||
return ws_.cell(ref_.top_left().make_offset(static_cast<int>(index), 0));
|
||||
}
|
||||
|
||||
return ws_.cell(ref_.top_left().make_offset(0, static_cast<int>(index)));
|
||||
}
|
||||
|
||||
std::size_t cell_vector::length() const
|
||||
{
|
||||
return order_ == major_order::row
|
||||
|
|
Loading…
Reference in New Issue
Block a user