summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2024-02-07 13:04:14 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2024-02-08 13:00:25 +0100
commit6446d3e12440be39e6b55f8749038061a1b240da (patch)
tree02dca703358519af873b37bcdb82d039d276be79
parent181f4c5ac9834c15fe0acc4b6e92f064e95ab32c (diff)
tdf#158586 writerfilter: RTF import: fix assert on ooo113308-1.rtf
warn:legacy.osl:::writerfilter/source/dmapper/DomainMapper_Impl.cxx:1278: section stack already empty DomainMapper_Impl.cxx:9817: void writerfilter::dmapper::DomainMapper_Impl::substream(): Assertion `m_aContextStack.size() == contextSize' failed. Before substream(), there is one CONTEXT_SECTION, after there is an additional CONTEXT_PARAGRPAH. The first OSL_ENSURE is because RTFDocumentImpl::tableBreak() calls endParagraphGroup() but in the substream, startParagraphGroup() hadn't been called; fixing this also makes the assert failure go away. This worked previously because sectBreak() called endParagraphGroup() after reading the header substreams, but it seems dubious that a paragraph group started in the body should be used in the substream. (regression from commit 57abad5cf990111fd7de011809d4421dc0550193) Change-Id: I98864bca03b59099c17080c0a7582de2b77d41e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163096 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 0853cfa1b600..4db4a6352cce 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -654,6 +654,7 @@ void RTFDocumentImpl::runBreak()
void RTFDocumentImpl::tableBreak()
{
+ checkFirstRun(); // ooo113308-1.rtf has a header at offset 151084 that doesn't startParagraphGroup() without this
runBreak();
Mapper().endParagraphGroup();
Mapper().startParagraphGroup();