diff --git a/include/xlnt/workbook/workbook.hpp b/include/xlnt/workbook/workbook.hpp index d92cf2b2..3ba26859 100644 --- a/include/xlnt/workbook/workbook.hpp +++ b/include/xlnt/workbook/workbook.hpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -760,15 +761,15 @@ public: /// std::size_t add_shared_string(const rich_text &shared, bool allow_duplicates = false); - /// - /// Returns a reference to the shared string ordered by id - /// - const std::unordered_map &shared_strings_by_id() const; + /// + /// Returns a reference to the shared string ordered by id + /// + const std::map &shared_strings_by_id() const; - /// - /// Returns a reference to the shared string related to the specified index - /// - const rich_text &shared_strings(std::size_t index) const; + /// + /// Returns a reference to the shared string related to the specified index + /// + const rich_text &shared_strings(std::size_t index) const; /// /// Returns a reference to the shared strings being used by cells diff --git a/source/detail/implementations/workbook_impl.hpp b/source/detail/implementations/workbook_impl.hpp index 009f9ff2..13dd1941 100644 --- a/source/detail/implementations/workbook_impl.hpp +++ b/source/detail/implementations/workbook_impl.hpp @@ -118,7 +118,7 @@ struct workbook_impl std::list worksheets_; std::unordered_map shared_strings_ids_; - std::unordered_map shared_strings_values_; + std::map shared_strings_values_; optional stylesheet_; diff --git a/source/workbook/workbook.cpp b/source/workbook/workbook.cpp index 833d1ee8..fcea0b12 100644 --- a/source/workbook/workbook.cpp +++ b/source/workbook/workbook.cpp @@ -1332,7 +1332,7 @@ const manifest &workbook::manifest() const return d_->manifest_; } -const std::unordered_map &workbook::shared_strings_by_id() const +const std::map &workbook::shared_strings_by_id() const { return d_->shared_strings_values_; }