fix frozen first rows/columns for #369

This commit is contained in:
Thomas Fussell 2019-07-07 11:17:00 -04:00
parent be7a91f7be
commit cc88c4829b
2 changed files with 13 additions and 3 deletions

View File

@ -552,7 +552,10 @@ std::string xlsx_consumer::read_worksheet_begin(const std::string &rel_id)
current_selection.sqref(sqref);
}
current_selection.pane(pane_corner::top_left);
if (parser().attribute_present("pane"))
{
current_selection.pane(parser().attribute<pane_corner>("pane"));
}
new_view.add_selection(current_selection);

View File

@ -2326,8 +2326,15 @@ void xlsx_producer::write_worksheet(const relationship &rel)
write_attribute("topLeftCell", current_pane.top_left_cell.get().to_string());
}
write_attribute("xSplit", current_pane.x_split.index);
write_attribute("ySplit", current_pane.y_split);
if (current_pane.x_split + 1 == current_pane.top_left_cell.get().column())
{
write_attribute("xSplit", current_pane.x_split.index);
}
if (current_pane.y_split + 1 == current_pane.top_left_cell.get().row())
{
write_attribute("ySplit", current_pane.y_split);
}
if (current_pane.active_pane != pane_corner::top_left)
{