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

Bjoern Michaelsen bmichaelsen at kemper.freedesktop.org
Mon Sep 26 13:22:39 PDT 2011


 sw/source/core/layout/newfrm.cxx |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit 6a3faed5b459ea133c39ef5243dad8e366ca00c3
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Fri Sep 23 01:13:34 2011 +0200

    fdo#39510: comment added
    
    Signed-off-by: Michael Stahl <mst at openoffice.org>

diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 7f19c1a..3943336 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -607,7 +607,17 @@ SwRootFrm::~SwRootFrm()
 {
     bTurboAllowed = sal_False;
     pTurbo = 0;
+    // fdo#39510 crash on document close with footnotes
+    // Object ownership in writer and esp. in layout are a mess: Before the
+    // document/layout split SwDoc and SwRootFrm were essentially one object
+    // and magically/uncleanly worked around their common destruction by call
+    // to SwDoc::IsInDtor() -- even from the layout. As of now destuction of
+    // the layout proceeds forward through the frames. Since SwTxtFtn::DelFrms
+    // 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();
+
     if(pBlink)
         pBlink->FrmDelete( this );
     if ( static_cast<SwFrmFmt*>(GetRegisteredInNonConst()) )
commit f8f5d96666bff5051cc88d06b10d855548a441de
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Thu Sep 22 18:47:21 2011 +0200

    fdo#39510 lp#854626: crash on closing document with footnotes
    
    Signed-off-by: Michael Stahl <mst at openoffice.org>

diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 86eefcb..7f19c1a 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -607,6 +607,7 @@ SwRootFrm::~SwRootFrm()
 {
     bTurboAllowed = sal_False;
     pTurbo = 0;
+    AllRemoveFtns();
     if(pBlink)
         pBlink->FrmDelete( this );
     if ( static_cast<SwFrmFmt*>(GetRegisteredInNonConst()) )


More information about the Libreoffice-commits mailing list