diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/inc/rowfrm.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/tabfrm.cxx | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx index 9ff22cc0a125..c3724667cdaf 100644 --- a/sw/source/core/inc/rowfrm.hxx +++ b/sw/source/core/inc/rowfrm.hxx @@ -97,7 +97,7 @@ public: // <-- split table rows // #131283# Table row keep feature - bool ShouldRowKeepWithNext() const; + bool ShouldRowKeepWithNext( const bool bCheckParents = true ) const; // #i4032# NEW TABLES bool IsRowSpanLine() const { return m_bIsRowSpanLine; } diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 8fad05cf2508..ae20788f9da0 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1777,16 +1777,16 @@ SwFrame* sw_FormatNextContentForKeep( SwTabFrame* pTabFrame ) } namespace { - bool AreAllRowsKeepWithNext( const SwRowFrame* pFirstRowFrame ) + bool AreAllRowsKeepWithNext( const SwRowFrame* pFirstRowFrame, const bool bCheckParents = true ) { bool bRet = pFirstRowFrame != nullptr && - pFirstRowFrame->ShouldRowKeepWithNext(); + pFirstRowFrame->ShouldRowKeepWithNext( bCheckParents ); while ( bRet && pFirstRowFrame->GetNext() != nullptr ) { pFirstRowFrame = dynamic_cast<const SwRowFrame*>(pFirstRowFrame->GetNext()); bRet = pFirstRowFrame != nullptr && - pFirstRowFrame->ShouldRowKeepWithNext(); + pFirstRowFrame->ShouldRowKeepWithNext( bCheckParents ); } return bRet; @@ -1863,8 +1863,8 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) const SwBorderAttrs *pAttrs = pAccess->Get(); const bool bLargeTable = GetTable()->GetTabLines().size() > 64; //arbitrary value, virtually guaranteed to be larger than one page. + const bool bEmulateTableKeep = !bLargeTable && AreAllRowsKeepWithNext( GetFirstNonHeadlineRow(), /*bCheckParents=*/false ); // The beloved keep attribute - const bool bEmulateTableKeep = !bLargeTable && AreAllRowsKeepWithNext( GetFirstNonHeadlineRow() ); const bool bKeep = IsKeep(pAttrs->GetAttrSet().GetKeep(), GetBreakItem(), bEmulateTableKeep); // All rows should keep together @@ -4613,7 +4613,7 @@ bool SwRowFrame::IsRowSplitAllowed() const return rLP.GetValue(); } -bool SwRowFrame::ShouldRowKeepWithNext() const +bool SwRowFrame::ShouldRowKeepWithNext( const bool bCheckParents ) const { // No KeepWithNext if nested in another table if ( GetUpper()->GetUpper()->IsCellFrame() ) @@ -4623,7 +4623,7 @@ bool SwRowFrame::ShouldRowKeepWithNext() const const SwFrame* pText = pCell->Lower(); return pText && pText->IsTextFrame() && - static_cast<const SwTextFrame*>(pText)->GetTextNodeForParaProps()->GetSwAttrSet().GetKeep().GetValue(); + static_cast<const SwTextFrame*>(pText)->GetTextNodeForParaProps()->GetSwAttrSet().GetKeep(bCheckParents).GetValue(); } SwCellFrame::SwCellFrame(const SwTableBox &rBox, SwFrame* pSib, bool bInsertContent) |