diff options
-rw-r--r-- | sw/source/core/layout/layact.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/sectfrm.cxx | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index ae0a5125f8d1..230769f7e8b5 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1223,7 +1223,11 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay, aOldRect = static_cast<SwPageFrm*>(pLay)->GetBoundRect(pRenderContext); } + bool const bDeleteForbidden(pLay->IsDeleteForbidden()); + pLay->ForbidDelete(); pLay->Calc(pRenderContext); + if (!bDeleteForbidden) + pLay->AllowDelete(); if ( aOldFrame != pLay->Frm() ) bChanged = true; diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 8c374cc5a2d7..5f71d85f2806 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -424,7 +424,10 @@ bool SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const |*/ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt ) { - if( !pNxt->IsJoinLocked() && GetSection() == pNxt->GetSection() ) + if (pNxt->IsDeleteForbidden()) + return; + + if (!pNxt->IsJoinLocked() && GetSection() == pNxt->GetSection()) { PROTOCOL( this, PROT_SECTION, ACT_MERGE, pNxt ) |