writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 +--- writerfilter/source/dmapper/DomainMapper_Impl.hxx | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-)
New commits: commit cd67e6bbc398d248553b4a163cf76f1655615b32 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Wed Jun 19 11:54:13 2024 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Thu Jun 20 10:46:18 2024 +0200 tdf#161631 writerfilter: move another member to SubstreamContext The problem is that the bugdoc contains a table in the footer, which causes m_bDummyParaAddedForTableInSection to be set, which erroneously causes the last paragraph in the body to be removed. (regression from commit 86ad08f9d25110e91e92a0badf6de75e785b3644) Change-Id: I148785c54c37dc25f7d239b5898aec9fb5455f40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169191 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Jenkins (cherry picked from commit ef77086255821d61838a7e26fee9baadaca0b9e0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169209 diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 3276e430972e..869e90a4c287 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -370,7 +370,6 @@ DomainMapper_Impl::DomainMapper_Impl( m_bIsParaMarkerChange( false ), m_bIsParaMarkerMove( false ), m_bRedlineImageInPreviousRun( false ), - m_bDummyParaAddedForTableInSection( false ), m_bTextFrameInserted(false), m_bIsLastSectionGroup( false ), m_bUsingEnhancedFields( false ), @@ -962,10 +961,9 @@ void DomainMapper_Impl::SetIsFirstParagraphInShape(bool bIsFirst) void DomainMapper_Impl::SetIsDummyParaAddedForTableInSection( bool bIsAdded ) { - m_bDummyParaAddedForTableInSection = bIsAdded; + m_StreamStateStack.top().bDummyParaAddedForTableInSection = bIsAdded; } - void DomainMapper_Impl::SetIsTextFrameInserted( bool bIsInserted ) { m_bTextFrameInserted = bIsInserted; diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 8916193bcab9..8dc28cfc31ca 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -214,6 +214,7 @@ struct SubstreamContext bool bParaWithInlineObject = false; /// This is a continuation of already finished paragraph - e.g., first in an index section bool bRemoveThisParagraph = false; + bool bDummyParaAddedForTableInSection = false; // tdf#161631 }; /// Information about a paragraph to be finished after a field end. @@ -630,7 +631,6 @@ private: bool m_bRedlineImageInPreviousRun; bool m_bIsFirstParaInShape = false; - bool m_bDummyParaAddedForTableInSection; bool m_bTextFrameInserted; bool m_bIsLastSectionGroup; bool m_bUsingEnhancedFields; @@ -755,7 +755,7 @@ public: void SetIsFirstParagraphInShape(bool bIsFirst); bool GetIsFirstParagraphInShape() const { return m_bIsFirstParaInShape; } void SetIsDummyParaAddedForTableInSection( bool bIsAdded ); - bool GetIsDummyParaAddedForTableInSection() const { return m_bDummyParaAddedForTableInSection;} + bool GetIsDummyParaAddedForTableInSection() const { return m_StreamStateStack.top().bDummyParaAddedForTableInSection; } /// Track if a textframe has been inserted into this section void SetIsTextFrameInserted( bool bIsInserted );