SwRootFrm::~SwRootFrm: refactor:
commit8e28ba240ae2f958a67c2502546651bd9aed76cd
authorMichael Stahl <mstahl@redhat.com>
Mon, 27 Feb 2012 19:43:27 +0000 (27 20:43 +0100)
committerMiklos Vajna <vmiklos@suse.cz>
Thu, 1 Mar 2012 11:42:14 +0000 (1 12:42 +0100)
tree0eaf19a98f600f3c300ae2eb126224f920702e4b
parent7c04bc04476acc6ccaec7c7a2e6cb569215cd20f
SwRootFrm::~SwRootFrm: refactor:

Since CWS swlayoutrefactoring the SwRootFrms are destroyed with
SwDoc::IsInDtor not set.  This can cause at least reads of freed
SwRootFrm members when executing the dtors of SwRootFrm base class
SwLayoutFrm calling into SwRootFrm::GetPageAtPos.

Prevent this scenario by:
- moving the implementation of SwRootFrm base class dtors to new
  methods SwFrm::Destroy and SwLayoutFrm::Destroy
- calling SwFrm::Destroy and SwLayoutFrm::Destroy explicitly before
  SwRootFrm members are freed
(cherry picked from commit ebb74441790a9852b1a1532d6e025c324666f6fc)

Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
sw/source/core/inc/frame.hxx
sw/source/core/inc/layfrm.hxx
sw/source/core/inc/rootfrm.hxx
sw/source/core/layout/newfrm.cxx
sw/source/core/layout/ssfrm.cxx