reformat a little

This commit is contained in:
Thomas Fussell 2017-12-08 15:31:25 -05:00
parent 182dea155b
commit a653a39544
2 changed files with 18 additions and 20 deletions

View File

@ -124,6 +124,23 @@ struct number_converter
double result;
};
using style_id_pair = std::pair<xlnt::detail::style_impl, std::size_t>;
/// <summary>
/// Try to find given xfid value in the styles vector and, if succeeded, set's the optional style.
/// </summary>
void set_style_by_xfid(const std::vector<style_id_pair> &styles,
std::size_t xfid, xlnt::optional<std::string> &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 {
/// <summary>
/// Try to find given xfid value in the styles vector and, if succeeded, set's the optional style.
/// </summary>
void set_style_by_xfid(
const std::vector<std::pair<style_impl, std::size_t>>& styles, std::size_t xfid, optional<std::string>& style
)
{
for(auto item : styles)
{
if( item.second == xfid )
{
style = item.first.name;
}
}
}
} // namespace
void xlsx_consumer::read_stylesheet()
{
target_.impl().stylesheet_ = detail::stylesheet();

View File

@ -170,4 +170,5 @@ const cell cell_vector::operator[](std::size_t cell_index) const
return ws_.cell(cursor_.make_offset(0, static_cast<int>(cell_index)));
}
} // namespace xlnt