mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Fixed a bug when using the xlnt::streaming_workbook_reader where a streaming cell could still contain information from the previously streamed cell. This could happen if the new cell did not contain information that could override the information of the previous cell, e.g. when the cell in XML only contained something like <c r="H4"/>, so the streamed cell still contained the type and the string/value of the previously streamed cell.
This commit is contained in:
parent
3a279fcaab
commit
f6f4adca7d
@ -1322,6 +1322,7 @@ bool xlsx_consumer::has_cell()
|
|||||||
expect_start_element(qn("spreadsheetml", "c"), xml::content::complex);
|
expect_start_element(qn("spreadsheetml", "c"), xml::content::complex);
|
||||||
|
|
||||||
assert(streaming_);
|
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 cell = xlnt::cell(streaming_cell_.get());
|
||||||
auto reference = cell_reference(parser().attribute("r"));
|
auto reference = cell_reference(parser().attribute("r"));
|
||||||
cell.d_->parent_ = current_worksheet_;
|
cell.d_->parent_ = current_worksheet_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user