sw/inc/doc.hxx | 4 ---- sw/source/core/doc/doclay.cxx | 5 ----- sw/source/core/doc/docnew.cxx | 1 - sw/source/core/view/vnew.cxx | 11 ----------- 4 files changed, 21 deletions(-)
New commits: commit eacf99268af767dd045754e42b24fe99964e8a52 Author: Michael Stahl <[email protected]> Date: Wed Jul 3 15:58:31 2013 +0200 fdo#65932: sw: remove SwDoc::ShareLayout It is a crude hack that is no longer necessary because the underlying problems that caused crashes when deleting the layout have been fixed. Also it appears to cause crashes now. (cherry picked from commit f8dfa3a81a5382b2f18a705bd512625754167573) Reviewed-on: https://gerrit.libreoffice.org/4706 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> (cherry picked from commit 076bc3ce70b9254e00547de34a86dafd76ed1e51) Change-Id: I601bdb0dc0aff5f4ddb8b8f4ba4c8d1f72c76666 Signed-off-by: Michael Stahl <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/4768 Reviewed-by: Fridrich Strba <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Tested-by: Petr Mladek <[email protected]> Reviewed-by: Michael Meeks <[email protected]> Tested-by: Michael Meeks <[email protected]> diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 13256ea7..0769ae2 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -79,7 +79,6 @@ class SwList; #include <memory> #include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> #include <boost/ptr_container/ptr_vector.hpp> namespace editeng { class SvxBorderLine; } @@ -317,7 +316,6 @@ class SW_DLLPUBLIC SwDoc : SwDefTOXBase_Impl * mpDefTOXBases; ///< defaults of SwTOXBase's ViewShell *mpCurrentView; ///< SwDoc should get a new member mpCurrentView//swmod 071225 - boost::shared_ptr<SwRootFrm> mpLayoutPtr; SdrModel *mpDrawModel; ///< StarView Drawing SwDocUpdtFld *mpUpdtFlds; ///< Struct for updating fields @@ -1772,8 +1770,6 @@ public: const SwDocShell* GetDocShell() const { return mpDocShell; } void SetDocShell( SwDocShell* pDSh ); - void ShareLayout( boost::shared_ptr<SwRootFrm>& rPtr); - /** in case during copying of embedded object a new shell is created, it should be set here and cleaned later */ void SetTmpDocShell( SfxObjectShellLock rLock ) { mxTmpDocShell = rLock; } diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index b320e79..926a8c70 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -2303,9 +2303,4 @@ std::set<SwRootFrm*> SwDoc::GetAllLayouts() return aAllLayouts; } //swmod 070825 -void SwDoc::ShareLayout(boost::shared_ptr<SwRootFrm>& rPtr) -{ - mpLayoutPtr = rPtr; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 94ebfea..91aa23b 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -520,7 +520,6 @@ SwDoc::~SwDoc() delete mpPgPViewPrtData; mbDtor = true; - mpLayoutPtr.reset(); delete mpRedlineTbl; delete mpUnoCrsrTbl; diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx index a8b293e..2c3053a 100644 --- a/sw/source/core/view/vnew.cxx +++ b/sw/source/core/view/vnew.cxx @@ -128,17 +128,6 @@ void ViewShell::Init( const SwViewOption *pNewOpt ) // switched to two step construction because creating the layout in SwRootFrm needs a valid pLayout set mpLayout = SwRootFrmPtr(new SwRootFrm( mpDoc->GetDfltFrmFmt(), this )); mpLayout->Init( mpDoc->GetDfltFrmFmt() ); - - // mba: the layout refactoring overlooked an important detail - // prior to that change, the layout always was destroyed in the dtor of swdoc - // it is necessary to suppress notifications in the layout when the layout is discarded in its dtor - // unfortunately this was done by asking whether the doc is in dtor - though the correct question should - // have been if the rootfrm is in dtor (or even better: discard the layout before the SwRootFrm is destroyed!) - // SwDoc::IsInDtor() is used at several places all over the code that need to be checked whether - // "pDoc->IsInDtor()" means what is says or in fact should check for "pRootFrm->IsInDtor()". As this will take some time, I decided - // to postpone that investigations and the changes it will bring to the 3.5 release and for 3.4 make sure - // that the layout still gets destroyed in the doc dtor. This is done by sharing "the" layout (that we still have) with the doc. - GetDoc()->ShareLayout( mpLayout ); } } SizeChgNotify(); //swmod 071108 _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
