Serialise phonetics visibility for cells

This commit is contained in:
Kostas Dizas 2018-11-21 12:57:36 +00:00
parent 48a865cd66
commit e9118cff24
No known key found for this signature in database
GPG Key ID: 8D3074191407AC9E
2 changed files with 15 additions and 0 deletions

View File

@ -241,6 +241,11 @@ cell xlsx_consumer::read_cell()
cell.d_->column_ = reference.column_index();
cell.d_->row_ = reference.row();
if (parser().attribute_present("ph"))
{
cell.d_->phonetics_visible_ = parser().attribute<bool>("ph");
}
auto has_type = parser().attribute_present("t");
auto type = has_type ? parser().attribute("t") : "n";
@ -730,6 +735,11 @@ void xlsx_consumer::read_worksheet_sheetdata()
cell.format(target_.format(static_cast<std::size_t>(std::stoull(parser().attribute("s")))));
}
if (parser().attribute_present("ph"))
{
cell.d_->phonetics_visible_ = parser().attribute<bool>("ph");
}
auto has_value = false;
auto value_string = std::string();

View File

@ -2534,6 +2534,11 @@ void xlsx_producer::write_worksheet(const relationship &rel)
write_attribute("r", cell.reference().to_string());
if (cell.phonetics_visible())
{
write_attribute("ph", write_bool(true));
}
if (cell.has_format())
{
write_attribute("s", cell.format().d_->id);