--- main/sw/source/core/layout/calcmove.cxx 2014-01-23 18:52:28.433539671 +0100 +++ /vagrant/calcmove-edited.cxx 2014-01-23 18:52:20.028645692 +0100 @@ -1299,7 +1299,9 @@ void SwCntntFrm::MakeAll() if ( sal_True == (bMoveable = IsMoveable()) ) { SwFrm *pPre = GetIndPrev(); - if ( CheckMoveFwd( bMakePage, bKeep, bMovedBwd ) ) + + /*matthieuriolo: only try to move forward, if you haven't yet*/ + if (!bMovedFwd && CheckMoveFwd( bMakePage, bKeep, bMovedBwd ) ) { SWREFRESHFN( this ) bMovedFwd = sal_True; @@ -1726,8 +1728,11 @@ void SwCntntFrm::MakeAll() const sal_Bool bCheckForGrownBody = pOldUp->IsBodyFrm(); const long nOldBodyHeight = (pOldUp->Frm().*fnRect->fnGetHeight)(); - if ( !bMovedFwd && !MoveFwd( bMakePage, sal_False ) ) - bMakePage = sal_False; + /*matthieuriolo adding bMovedBwd || which prevents an invalidation of the position through MoveFwd*/ + if (bMovedBwd || (!bMovedFwd && !MoveFwd( bMakePage, sal_False ) ) ) { + bMakePage = sal_False; + } + SWREFRESHFN( this ) // If MoveFwd moves the paragraph to the next page, a following @@ -1739,8 +1744,11 @@ void SwCntntFrm::MakeAll() if ( bCheckForGrownBody && ! bMovedBwd && pOldUp != GetUpper() && (pOldUp->Frm().*fnRect->fnGetHeight)() > nOldBodyHeight ) bMovedFwd = sal_False; - else - bMovedFwd = sal_True; + else { + //matthieuriolo - if bMovedFwd will be set, then the frame will move back and forward (pages) while editing + //matthieuriolo - if it is not set, footnotes will prevent the frame to moveback + bMovedFwd = sal_True; + } bFormatted = sal_False; if ( bMoveOrFit && GetUpper() == pOldUp )