[Libreoffice-commits] core.git: sw/source

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Thu Nov 20 10:18:57 PST 2014


 sw/source/core/text/widorp.cxx |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 88f899c7a0a718aba3fb5c0c090a8af85ba72fe2
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Wed Nov 19 22:02:28 2014 +0100

    refactor assignment out of complex expression
    
    Change-Id: I55ecededc829a6cd1a7bb1aeb2bcae65406e0b2b
    Reviewed-on: https://gerrit.libreoffice.org/12993
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx
index 76fc1c0..a3e2809 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() )


More information about the Libreoffice-commits mailing list