[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Mon Feb 20 08:56:40 PST 2012


 sw/source/core/layout/ftnfrm.cxx |    2 +-
 sw/source/core/layout/newfrm.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a86b99f368bdc5fb9f0461129808b31f5d2e3401
Author: Michael Stahl <mstahl at redhat.com>
Date:   Sat Feb 18 00:06:33 2012 +0100

    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 at suse.cz>

diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 1b4a14e..2d8ca28 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 a1675a9..3b6b920 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 );


More information about the Libreoffice-commits mailing list