From 383337ad4551cda1fe968adec5c434d482370874 Mon Sep 17 00:00:00 2001 From: "fred.yan" Date: Thu, 9 Nov 2017 14:17:49 +0800 Subject: [PATCH] cell_vector lost func "operator[]const" --- source/worksheet/cell_vector.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/worksheet/cell_vector.cpp b/source/worksheet/cell_vector.cpp index 6698d3ca..5260c474 100644 --- a/source/worksheet/cell_vector.cpp +++ b/source/worksheet/cell_vector.cpp @@ -161,4 +161,14 @@ cell cell_vector::operator[](std::size_t cell_index) return ws_.cell(cursor_.make_offset(0, static_cast(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(cell_index), 0)); + } + + return ws_.cell(cursor_.make_offset(0, static_cast(cell_index))); +} + } // namespace xlnt