summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-02-18 00:06:33 +0100
committerMichael Stahl <mstahl@redhat.com>2012-02-18 00:07:30 +0100
commit962d0500c4debaef43e5f146e47e08c66d851562 (patch)
tree44cf3ee22cd188d1cbc9180d7b4c4caa0bf08d7c /sw
parent67c396fb66a9c21c9eafaf4bcc3654706f643df0 (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)
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/ftnfrm.cxx2
-rw-r--r--sw/source/core/layout/newfrm.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 7d3ea8302ad5..940bc11c1c47 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -1000,7 +1000,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 1e9b0e88b27a..5f12ef551476 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -610,7 +610,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 );