summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/flowfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/flowfrm.cxx')
-rw-r--r--sw/source/core/layout/flowfrm.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 59fac2138f1d..6b06f21d51b6 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -691,16 +691,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." );