summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/inc/rootfrm.hxx2
-rw-r--r--sw/source/core/layout/newfrm.cxx4
2 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index 2243759d4dda..9cf2a4f13143 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -105,6 +105,8 @@ class SW_DLLPUBLIC SwRootFrame final : public SwLayoutFrame
static SwLayVout *s_pVout;
static bool s_isInPaint; // Protection against double Paints
static bool s_isNoVirDev;// No virt. Device for SystemPaints
+ /// The last, still alive SwRootFrame instance, for debugging.
+ static SwRootFrame* s_pLast;
/// Width of the HTML / Web document if not defined otherwise: 20cm.
static constexpr sal_Int64 MIN_BROWSE_WIDTH = o3tl::toTwips(20000, o3tl::Length::mm100);
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 95af08baa6e3..85c9f3bf68c7 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -46,6 +46,7 @@
SwLayVout *SwRootFrame::s_pVout = nullptr;
bool SwRootFrame::s_isInPaint = false;
bool SwRootFrame::s_isNoVirDev = false;
+SwRootFrame* SwRootFrame::s_pLast = nullptr;
SwCache *SwFrame::spCache = nullptr;
@@ -432,6 +433,8 @@ SwRootFrame::SwRootFrame( SwFrameFormat *pFormat, SwViewShell * pSh ) :
{
mnFrameType = SwFrameType::Root;
setRootFrame( this );
+
+ s_pLast = this;
}
void SwRootFrame::Init( SwFrameFormat* pFormat )
@@ -565,6 +568,7 @@ void SwRootFrame::DestroyImpl()
SwRootFrame::~SwRootFrame()
{
+ s_pLast = nullptr;
}
void SwRootFrame::RemoveMasterObjs( SdrPage *pPg )