diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-02-18 00:06:33 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@frugalware.org> | 2012-02-20 20:47:02 +0100 |
commit | a6d98bb23f5ced5cf4f03666099f4bcb1f7ab185 (patch) | |
tree | 751fd99a4e8a084292496aa5d428bdc2aa30221b | |
parent | 042e3727babc62913c753594412e7d7efbed43bf (diff) |
fdo#39510: fix yet more layout crashes in ~SwRootFrm:
Call SwRootFrm::RemoveFtns with the proper boolean to also eliminate
EndNotes, and fix a faulty while loop in RemoveFtns that's been preventing
removal of footnotes in certain sections since the dawn of CVS history.
(regression from CWS swlayoutrefactoring, crashes on bugdoc from i#101776)
(cherry picked from commit 962d0500c4debaef43e5f146e47e08c66d851562)
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
-rw-r--r-- | sw/source/core/layout/ftnfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/newfrm.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index a8e1b46bba..8f0d1aacbe 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -1004,7 +1004,7 @@ void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes if( pBody && pBody->Lower() ) { SwFrm* pLow = pBody->Lower(); - while( pLow->GetNext() ) + while (pLow) { if( pLow->IsSctFrm() && ( !pLow->GetNext() || ((SwSectionFrm*)pLow)->IsAnyNoteAtEnd() ) && diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index 39433365c4..f51aa6b585 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -616,7 +616,7 @@ SwRootFrm::~SwRootFrm() // also searches backwards to find the master of footnotes, they must be // considered to be owned by the SwRootFrm and also be destroyed here, // before tearing down the (now footnote free) rest of the layout. - AllRemoveFtns(); + RemoveFtns(0, false, true); if(pBlink) pBlink->FrmDelete( this ); |