From 988488f0a6a34345f1a6fae3d5b52f4eacd04859 Mon Sep 17 00:00:00 2001 From: Vitaly Pavlov Date: Mon, 26 Feb 2024 18:39:04 +0300 Subject: [PATCH 1/3] Fixed first block of errors --- include/xlnt/cell/phonetic_run.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/xlnt/cell/phonetic_run.hpp b/include/xlnt/cell/phonetic_run.hpp index cbf62ea7..9f20384e 100644 --- a/include/xlnt/cell/phonetic_run.hpp +++ b/include/xlnt/cell/phonetic_run.hpp @@ -24,6 +24,7 @@ #pragma once #include +#include #include From b9f9a9d2245f50c570842f82e827ea7e3e174e58 Mon Sep 17 00:00:00 2001 From: Vitaly Pavlov Date: Mon, 26 Feb 2024 18:46:16 +0300 Subject: [PATCH 2/3] Fixed 2nd block of errors --- include/xlnt/utils/variant.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/xlnt/utils/variant.hpp b/include/xlnt/utils/variant.hpp index 21362578..0f47234a 100644 --- a/include/xlnt/utils/variant.hpp +++ b/include/xlnt/utils/variant.hpp @@ -25,6 +25,7 @@ #include #include +#include #include From e92ca9bd71bb99441545c664a2312d269ef17db9 Mon Sep 17 00:00:00 2001 From: Vitaly Pavlov Date: Mon, 26 Feb 2024 18:50:52 +0300 Subject: [PATCH 3/3] Fixed 3nd block of errors --- include/xlnt/worksheet/cell_vector.hpp | 5 +++++ source/utils/time.cpp | 1 + source/utils/timedelta.cpp | 1 + source/workbook/workbook.cpp | 2 ++ source/worksheet/cell_vector.cpp | 5 +++++ 5 files changed, 14 insertions(+) diff --git a/include/xlnt/worksheet/cell_vector.hpp b/include/xlnt/worksheet/cell_vector.hpp index 87bdf40a..694bfc27 100644 --- a/include/xlnt/worksheet/cell_vector.hpp +++ b/include/xlnt/worksheet/cell_vector.hpp @@ -176,6 +176,11 @@ public: /// const cell operator[](std::size_t column_index) const; + /// + /// Returns true if this sheet has an initialized cell at the given cell_index. + /// + bool has_cell(std::size_t cell_index) const; + private: /// /// The worksheet this vector points to cells from diff --git a/source/utils/time.cpp b/source/utils/time.cpp index 89ec8914..6d0f3220 100644 --- a/source/utils/time.cpp +++ b/source/utils/time.cpp @@ -22,6 +22,7 @@ // @author: see AUTHORS file #include #include +#include #include diff --git a/source/utils/timedelta.cpp b/source/utils/timedelta.cpp index a263e685..ef065efd 100644 --- a/source/utils/timedelta.cpp +++ b/source/utils/timedelta.cpp @@ -22,6 +22,7 @@ // @author: see AUTHORS file #include #include +#include #include diff --git a/source/workbook/workbook.cpp b/source/workbook/workbook.cpp index dce9d3bd..1f167960 100644 --- a/source/workbook/workbook.cpp +++ b/source/workbook/workbook.cpp @@ -28,6 +28,8 @@ #include #include +#include + #include #include #include diff --git a/source/worksheet/cell_vector.cpp b/source/worksheet/cell_vector.cpp index 0d6162cf..12dd843c 100644 --- a/source/worksheet/cell_vector.cpp +++ b/source/worksheet/cell_vector.cpp @@ -171,4 +171,9 @@ const cell cell_vector::operator[](std::size_t cell_index) const return ws_.cell(cursor_.make_offset(0, static_cast(cell_index))); } +bool cell_vector::has_cell(std::size_t cell_index) const +{ + return ws_.has_cell(cursor_.make_offset(0, static_cast(cell_index))); +} + } // namespace xlnt