From a653a3954480999881e73cb7a417388e88bbf2bc Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Fri, 8 Dec 2017 15:31:25 -0500 Subject: [PATCH] reformat a little --- source/detail/serialization/xlsx_consumer.cpp | 37 +++++++++---------- source/worksheet/cell_vector.cpp | 1 + 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/source/detail/serialization/xlsx_consumer.cpp b/source/detail/serialization/xlsx_consumer.cpp index 2ae0573e..399e2074 100644 --- a/source/detail/serialization/xlsx_consumer.cpp +++ b/source/detail/serialization/xlsx_consumer.cpp @@ -124,6 +124,23 @@ struct number_converter double result; }; +using style_id_pair = std::pair; + +/// +/// Try to find given xfid value in the styles vector and, if succeeded, set's the optional style. +/// +void set_style_by_xfid(const std::vector &styles, + std::size_t xfid, xlnt::optional &style) +{ + for (auto &item : styles) + { + if (item.second == xfid) + { + style = item.first.name; + } + } +} + } // namespace /* @@ -1704,26 +1721,6 @@ void xlsx_consumer::read_shared_workbook_user_data() { } -namespace { - -/// -/// Try to find given xfid value in the styles vector and, if succeeded, set's the optional style. -/// -void set_style_by_xfid( - const std::vector>& styles, std::size_t xfid, optional& style -) -{ - for(auto item : styles) - { - if( item.second == xfid ) - { - style = item.first.name; - } - } -} - -} // namespace - void xlsx_consumer::read_stylesheet() { target_.impl().stylesheet_ = detail::stylesheet(); diff --git a/source/worksheet/cell_vector.cpp b/source/worksheet/cell_vector.cpp index 4c3720b8..c9960529 100644 --- a/source/worksheet/cell_vector.cpp +++ b/source/worksheet/cell_vector.cpp @@ -170,4 +170,5 @@ const cell cell_vector::operator[](std::size_t cell_index) const return ws_.cell(cursor_.make_offset(0, static_cast(cell_index))); } + } // namespace xlnt