diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-04-23 22:52:39 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-04-24 12:22:01 +0200 |
commit | 135e4d5c730b8b252eab3e375580a3a73d8204e6 (patch) | |
tree | 963acb55d8d7157e3ee98e9a65e823017591902e /sw/source/core/layout/newfrm.cxx | |
parent | 4e353190b68f3a89c43b3861444dd2dd6b02a6e0 (diff) |
related: tdf#90820 refactor SwFrm destruction
Move all logic out of destructors, so it cannot happen any more that
members of a sub-class are accessed from a superclass destructor, when
those members are already dead.
Logic is now in virtual DestroyImpl() methods.
All SwFrms must be deleted with SwFrm::DestroySwFrm().
Change-Id: Icec5b12e12d5a2d955cb5844d7d4f7ac85ab79cd
Diffstat (limited to 'sw/source/core/layout/newfrm.cxx')
-rw-r--r-- | sw/source/core/layout/newfrm.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index 7a204cc50ce0..a3a6609384fd 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -573,7 +573,7 @@ void SwRootFrm::Init( SwFrmFmt* pFmt ) mbNeedGrammarCheck = pViewSh->GetViewOptions()->IsOnlineSpell(); } -SwRootFrm::~SwRootFrm() +void SwRootFrm::DestroyImpl() { mbTurboAllowed = false; mpTurbo = 0; @@ -614,6 +614,12 @@ SwRootFrm::~SwRootFrm() // that accesses members of this SwLayoutFrm::Destroy(); SwFrm::Destroy(); + + SwLayoutFrm::DestroyImpl(); +} + +SwRootFrm::~SwRootFrm() +{ } void SwRootFrm::RemoveMasterObjs( SdrPage *pPg ) |