summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2024-06-19 11:54:13 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2024-06-20 10:50:38 +0200
commite6dfa85f02209fe93365192886f87ce6d4765f39 (patch)
tree70d8b8601fbcf32ea19b81fa1fb4dfe27ff0b2e3
parentf556e99ce3d6a73ac13559ba3eeefe2d59bc6231 (diff)
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.stahl@allotropia.de> Tested-by: Jenkins (cherry picked from commit ef77086255821d61838a7e26fee9baadaca0b9e0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169137
-rw-r--r--sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx4
-rw-r--r--sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx4
2 files changed, 3 insertions, 5 deletions
diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
index c50cf4212567..47ef07610ca7 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
@@ -373,7 +373,6 @@ DomainMapper_Impl::DomainMapper_Impl(
m_bIsParaMarkerChange( false ),
m_bIsParaMarkerMove( false ),
m_bRedlineImageInPreviousRun( false ),
- m_bDummyParaAddedForTableInSection( false ),
m_bIsLastSectionGroup( false ),
m_bUsingEnhancedFields( false ),
m_nAnnotationId( -1 ),
@@ -938,10 +937,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_StreamStateStack.top().bTextFrameInserted = bIsInserted;
diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx b/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx
index c76d1f6dd5ba..1697ee9e849d 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx
@@ -266,6 +266,7 @@ struct SubstreamContext
bool bTextFrameInserted = false;
bool bIsFirstRun = false;
bool bIsOutsideAParagraph = true;
+ bool bDummyParaAddedForTableInSection = false; // tdf#161631
std::map<sal_Int32, css::uno::Any> deferredCharacterProperties;
};
@@ -658,7 +659,6 @@ private:
// text ZWSPs to keep the change tracking of the image in Writer.)
bool m_bRedlineImageInPreviousRun;
- bool m_bDummyParaAddedForTableInSection;
bool m_bIsLastSectionGroup;
bool m_bUsingEnhancedFields;
@@ -770,7 +770,7 @@ public:
void SetIsFirstParagraphInShape(bool bIsFirst);
bool GetIsFirstParagraphInShape() const { return m_StreamStateStack.top().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 );