[Libreoffice-commits] core.git: sw/source
Mike Kaganski
mikekaganski at hotmail.com
Wed Jul 15 16:15:42 PDT 2015
sw/source/core/layout/tabfrm.cxx | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 7ef02ac0ad217240c9adc6279f54342a066182aa
Author: Mike Kaganski <mikekaganski at hotmail.com>
Date: Tue May 19 14:55:52 2015 +1000
tdf#89007: Fix ShouldRowKeepWithNext condition
KeepWithNext shouldn't be applied to nested tables
Change-Id: I6df002ae7b00afa0fcf82aab584f85d9a47315eb
Reviewed-on: https://gerrit.libreoffice.org/15794
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 8bb796a..51c0e26 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)
More information about the Libreoffice-commits
mailing list