diff options
Diffstat (limited to 'sw/source/core/layout')
-rw-r--r-- | sw/source/core/layout/flowfrm.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 9ba82022bd..51cb49b12c 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -81,7 +81,8 @@ sal_Bool SwFlowFrm::bMoveBwdJump = sal_False; SwFlowFrm::SwFlowFrm( SwFrm &rFrm ) : rThis( rFrm ), - pFollow( 0 ) + pFollow( 0 ), + pPrecede( 0 ) { bLockJoin = bIsFollow = bCntntLock = bOwnFtnNum = bFtnLock = bFlyLock = sal_False; @@ -691,16 +692,12 @@ SwTxtFrm* SwCntntFrm::FindMaster() const { OSL_ENSURE( IsFollow(), "SwCntntFrm::FindMaster(): !IsFollow" ); - const SwCntntFrm* pCnt = GetPrevCntntFrm(); + const SwCntntFrm* pPrec = GetPrecede(); - while ( pCnt ) + if ( pPrec && pPrec->HasFollow() && pPrec->GetFollow() == this ) { - if ( pCnt->HasFollow() && pCnt->GetFollow() == this ) - { - OSL_ENSURE( pCnt->IsTxtFrm(), "NoTxtFrm with follow found" ); - return (SwTxtFrm*)pCnt; - } - pCnt = pCnt->GetPrevCntntFrm(); + OSL_ENSURE( pPrec->IsTxtFrm(), "NoTxtFrm with follow found" ); + return ( SwTxtFrm* )pPrec; } OSL_FAIL( "Follow ist lost in Space." ); |