As Caolán McNamara noted in bug 150927 comment #8: > https://bugs.documentfoundation.org/attachment.cgi?id=148210 (from bug > 122628) ... asserts on export to odt This started to assert after commit 5a9fe1d80ea977c439dd10ee2056abe6b0cb4d07 Date Fri Jul 29 17:00:14 2022 +0200 tdf#145226 sw: ODF export: fix table-row/table-cell styles but was thought to be related to commit 35021cd56b3b4e38035804087f215c80085564be Date Wed Aug 5 11:16:32 2020 +0300 tdf#124470: Split export of table autostyles out from collection phase However, it is obviously a pre-existing problem, since saving the mentioned file using 7.0.0 (i.e., prior to the latter commit) drops the table in the shape in the header of the first page. The code that prevents collection respective autostyles necessary for export of the table in the header is in XMLShapeExport::collectShapeAutoStyles, where it skips the block when xText is "empty". The respective skip appeared in commit 73fcb052edf1a21d785583bc53e8b4323b577bb1 Date Thu Nov 22 12:26:35 2001 +0000 #90330# only export text autostyles for shapes with text and was later relaxed by commit 7661bbbaef31adfdb298b1447301b24a70f85834 Date Fri Nov 25 22:46:34 2016 +0100 tdf#102479 ODF export: ignore exceptions when checking shape text that obviously handled a similar problem. It mentioned: > assume that the getString() check that was added there in commit > 73fcb052edf1a21d785583bc53e8b4323b577bb1 is just a performance > optimization; the actual export of auto styles and content uses > XEnumerationAccess anyway. Yet, it seems that just tolerating exceptions here is not enough, and thus we need to drop the check completely, assuming it's the performance optimization, and assuming that processing the empty text objects would be fast anyway. Alternatively, we might want to use XEnumerationAccess and check if it's empty.
https://gerrit.libreoffice.org/c/core/+/140313
thanks Mike, appreciate it
Possibly the fix for bug 106959 also is relevant: maybe it stopped throwing for cursors in SwXTextFrame::createTextCursor(), which was what the fix for 102479 relied on.
(In reply to Mike Kaganski from comment #3) Ah no, ignore that; the change is unrelated, and as mentioned, 7.0.0 having the fix for bug 102479, but not for bug 106959, dropped the table.
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/bdf346830b735aa484fba0df94be71fd1ea5cdfd tdf#151100: xText->getString() may be empty for content needing export It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/226b1c2006e936e4b32748b810624c5d655c4a98 tdf#151100: xText->getString() may be empty for content needing export It will be available in 7.4.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-7-3": https://git.libreoffice.org/core/commit/d194474aabd699806cb3631bc8641dd0548b8026 tdf#151100: xText->getString() may be empty for content needing export It will be available in 7.3.7. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-7-4-2": https://git.libreoffice.org/core/commit/941949ff88bf01db41ce9793a3d306c96ff88ab5 tdf#151100: xText->getString() may be empty for content needing export It will be available in 7.4.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.