Merge pull request #246 from yanwei1983/master

cell_vector lost func "operator[]const"
This commit is contained in:
Thomas Fussell 2017-12-08 14:38:13 -05:00 committed by GitHub
commit 8bd85f9dbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,4 +161,14 @@ cell cell_vector::operator[](std::size_t cell_index)
return ws_.cell(cursor_.make_offset(0, static_cast<int>(cell_index))); return ws_.cell(cursor_.make_offset(0, static_cast<int>(cell_index)));
} }
const cell cell_vector::operator[](std::size_t cell_index) const
{
if (order_ == major_order::row)
{
return ws_.cell(cursor_.make_offset(static_cast<int>(cell_index), 0));
}
return ws_.cell(cursor_.make_offset(0, static_cast<int>(cell_index)));
}
} // namespace xlnt } // namespace xlnt