summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-07-03 15:58:31 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-07-08 09:07:00 +0000
commit1692386695e16082976593bbebbcb4d4c260afad (patch)
tree4cdff6f269377bbca2749a3ec0a9ce2c9a3ef567 /sw
parentb86fe11a8374e9b1cb6b0f5326b5f13b1a61b78b (diff)
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 crahes now. Conflicts: sw/inc/doc.hxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/view/vnew.cxx Change-Id: I601bdb0dc0aff5f4ddb8b8f4ba4c8d1f72c76666 (cherry picked from commit f8dfa3a81a5382b2f18a705bd512625754167573) Reviewed-on: https://gerrit.libreoffice.org/4741 Tested-by: Fridrich Strba <fridrich@documentfoundation.org> Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/doc.hxx4
-rw-r--r--sw/source/core/doc/doclay.cxx5
-rw-r--r--sw/source/core/doc/docnew.cxx1
-rw-r--r--sw/source/core/view/vnew.cxx11
4 files changed, 0 insertions, 21 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index ed168699ce83..53fc21932a98 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -78,7 +78,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 * pDefTOXBases; ///< defaults of SwTOXBase's
ViewShell *pCurrentView; ///< SwDoc should get a new member pCurrentView//swmod 071225
- boost::shared_ptr<SwRootFrm> pLayoutPtr;
SdrModel *pDrawModel; ///< StarView Drawing
SwDocUpdtFld *pUpdtFlds; ///< Struct for updating fields
@@ -1757,8 +1755,6 @@ public:
const SwDocShell* GetDocShell() const { return pDocShell; }
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 ) { xTmpDocShell = rLock; }
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 3bac7340f34d..9956ccc98a57 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -2345,9 +2345,4 @@ std::set<SwRootFrm*> SwDoc::GetAllLayouts()
return aAllLayouts;
} //swmod 070825
-void SwDoc::ShareLayout(boost::shared_ptr<SwRootFrm>& rPtr)
-{
- pLayoutPtr = 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 9eb598321bfe..f2a9fc5d5123 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -529,7 +529,6 @@ SwDoc::~SwDoc()
delete pPgPViewPrtData;
mbDtor = true;
- pLayoutPtr.reset();
delete pRedlineTbl;
delete pUnoCrsrTbl;
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index 56b48828aefd..3d7058da937c 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -139,17 +139,6 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
// switched to two step construction because creating the layout in SwRootFrm needs a valid pLayout set
pLayout = SwRootFrmPtr(new SwRootFrm( pDoc->GetDfltFrmFmt(), this ));//swmod081016
pLayout->Init( pDoc->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( pLayout );
}
}
SizeChgNotify(); //swmod 071108