diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-11-19 22:02:28 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2014-11-20 18:18:28 +0000 |
commit | 88f899c7a0a718aba3fb5c0c090a8af85ba72fe2 (patch) | |
tree | e78aa3d5034453c61eb8df8df3472e62c65d96c6 /sw | |
parent | b5349435d6d149106a573bf891cf99743392f114 (diff) |
refactor assignment out of complex expression
Change-Id: I55ecededc829a6cd1a7bb1aeb2bcae65406e0b2b
Reviewed-on: https://gerrit.libreoffice.org/12993
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/widorp.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx index 76fc1c0d728a..a3e28097b9bb 100644 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -60,12 +60,14 @@ SwTxtFrmBreak::SwTxtFrmBreak( SwTxtFrm *pNewFrm, const SwTwips nRst ) SWAP_IF_SWAPPED( pFrm ) SWRECTFN( pFrm ) nOrigin = (pFrm->*fnRect->fnGetPrtTop)(); - SwSectionFrm* pSct; - bKeep = !pFrm->IsMoveable() || IsNastyFollow( pFrm ) || - ( pFrm->IsInSct() && (pSct=pFrm->FindSctFrm())->Lower()->IsColumnFrm() - && !pSct->MoveAllowed( pFrm ) ) || - !pFrm->GetTxtNode()->GetSwAttrSet().GetSplit().GetValue() || - pFrm->GetTxtNode()->GetSwAttrSet().GetKeep().GetValue(); + bKeep = !pFrm->IsMoveable() || IsNastyFollow( pFrm ); + if( !bKeep && pFrm->IsInSct() ) + { + const SwSectionFrm* const pSct = pFrm->FindSctFrm(); + bKeep = pSct->Lower()->IsColumnFrm() && !pSct->MoveAllowed( pFrm ); + } + bKeep = bKeep || !pFrm->GetTxtNode()->GetSwAttrSet().GetSplit().GetValue() || + pFrm->GetTxtNode()->GetSwAttrSet().GetKeep().GetValue(); bBreak = false; if( !nRstHeight && !pFrm->IsFollow() && pFrm->IsInFtn() && pFrm->HasPara() ) |