mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Serialise phonetics visibility for cells
This commit is contained in:
parent
48a865cd66
commit
e9118cff24
|
@ -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();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user