Created attachment 194157 [details] Screenshot of the issue 1. Open attachment 180759 [details] from bug 149563 2. SaxException Since: https://git.libreoffice.org/core/+/4b0fa253a4540f5461397815d290586f9ddabe61 author Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> Tue Nov 28 13:46:21 2023 +0900 committer Tomaž Vajngerl <quikee@gmail.com> Fri Dec 01 08:26:38 2023 +0100 tdf#136472 adjust ooxml import to handle first header/footer
Adding CC to: Tomaž Vajngerl
Confirmed using LO 24.8.0.0.alpha0+ (6d5d9eaa61505cebaf3bde4bfc157d8e19fec8de) / Ubuntu.
Lovely: it occurs when calling DomainMapper_Impl::ConvertHeaderFooterToTextFrame
The problem seems to be coming from copyHeaderFooter(). Converted1 does not have bHasHeader, so it gets turned on with xStyle->setPropertyValue(sHeaderIsOn, uno::Any(bPreviousHasHeader ... The act of turning on the header triggers a Notify of SwXHeadFootText::Impl::Notify that m_pHeadFootFormat "First footer" is "Dying" because ChgPageDesc did a SwDoc::CopyMasterFooter. So my guess is that the xTextAppend is connected to an orphaned footer, but my brain is not large enough to understand all this stuff. We could easily put a try/catch inside ConvertHeaderFooterToTextFrame's while loop, but that would simply be an avoidance "fix".