ods-reader: Support more than a single piece of text in a cell.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 30 May 2023 00:42:15 +0000 (17:42 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 30 May 2023 00:49:49 +0000 (17:49 -0700)
commit6462038a06640fd734b8204b8af95eb3b86fcb4c
tree3668f5151a8a4f6660ad7df4972454432e305967
parentec09967ea4e04bb9e0250849e4c3a1fd1645a02f
ods-reader: Support more than a single piece of text in a cell.

This code read the first text content in the first <p> it found in a cell.
This meant that anything more sophisticated than just <p>text<p> broke,
including <p>text<span>some more</span></p>.  This commit fixes it.

The code here was really complicated and I didn't understand it.  I
simplified it a lot to use xmlTextReaderExpand(), which is a lot easier to
use than a state machine at the level we need it.  I also couldn't figure
out how to make the existing caching logic work quite right, so I replaced
it by something simpler which I think will be just fine.

This updates the test by adding some bold text to a cell.

Thanks to elias tsolis for reporting this bug.
Bug #63443.
src/data/ods-reader.c
tests/language/commands/newone.ods