summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/layout/tabfrm.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 8bb796a1f2da..51c0e26e2d15 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1788,6 +1788,8 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// keep for the first paragraph in the first cell), and this table does
// not have a next, the last line will be cut. Loop prevention: Only
// one try.
+ // WHAT IS THIS??? It "magically" hides last line (paragraph) in a table,
+ // if first is set to keep with next???
bool bLastRowHasToMoveToFollow = false;
bool bLastRowMoveNoMoreTries = false;
@@ -4383,16 +4385,15 @@ bool SwRowFrm::IsRowSplitAllowed() const
bool SwRowFrm::ShouldRowKeepWithNext() const
{
- bool bRet = false;
+ // No KeepWithNext if nested in another table
+ if ( GetUpper()->GetUpper()->IsCellFrm() )
+ return false;
const SwCellFrm* pCell = static_cast<const SwCellFrm*>(Lower());
const SwFrm* pText = pCell->Lower();
- if ( pText && pText->IsTextFrm() )
- {
- bRet = static_cast<const SwTextFrm*>(pText)->GetTextNode()->GetSwAttrSet().GetKeep().GetValue();
- }
- return bRet;
+ return pText && pText->IsTextFrm() &&
+ static_cast<const SwTextFrm*>(pText)->GetTextNode()->GetSwAttrSet().GetKeep().GetValue();
}
SwCellFrm::SwCellFrm(const SwTableBox &rBox, SwFrm* pSib, bool bInsertContent)