diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-03-09 10:54:35 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-03-09 18:14:31 +0000 |
commit | ff1640fd59560a2a9c9a5685fb349b1d4c936845 (patch) | |
tree | c06ff7a812822761b20b48afa181ebddf8516668 | |
parent | 785bd2af80704a032e185853ad6d9327e1a78fc7 (diff) |
sw layout xml dump: allow invoking this from out sw/ in a debugger
This is similar to SwDoc::s_pLast, but for the layout.
Change-Id: I48bb53a7595a4cec3fe47c563e91db671643d6b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148529
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
-rw-r--r-- | sw/source/core/inc/rootfrm.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/newfrm.cxx | 4 |
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 ) |