Merge pull request #600 from doomlaur/bugfix/streaming_reader_clean_cell_state

The streaming cell now always begins with a clean state when using the xlnt::streaming_workbook_reader
This commit is contained in:
Thomas Fussell 2022-01-09 17:37:18 -05:00 committed by GitHub
commit 09dd4797b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1334,6 +1334,7 @@ bool xlsx_consumer::has_cell()
expect_start_element(qn("spreadsheetml", "c"), xml::content::complex);
assert(streaming_);
streaming_cell_.reset(new detail::cell_impl()); // Clean cell state - otherwise it might contain information from the previously streamed cell.
auto cell = xlnt::cell(streaming_cell_.get());
auto reference = cell_reference(parser().attribute("r"));
cell.d_->parent_ = current_worksheet_;