sd/inc/drawdoc.hxx | 2 ++ sd/source/core/drawdoc.cxx | 4 ++++ 2 files changed, 6 insertions(+)
New commits: commit ccb9e9ef70c4fae3f69b63083cab838794a3d46d Author: Miklos Vajna <[email protected]> AuthorDate: Wed Oct 8 09:50:27 2025 +0200 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Oct 9 16:07:29 2025 +0200 sd doc model dump: allow invoking this from outside sd/ in a debugger Similar to commit ab61be6ed502349152b165bc3db4c61f04c2f20d (sw doc model dump: allow invoking this from outside sw/ in a debugger, 2023-03-09), but that was for Writer, this is for Impress. Change-Id: I8f558bb66047b0f55fe8c29f0c9b34cf2cb2a55e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192062 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index e56cb47cf669..91677bc5b562 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -405,6 +405,8 @@ private: ::std::unique_ptr<ImpDrawPageListWatcher> mpDrawPageListWatcher; ::std::unique_ptr<ImpMasterPageListWatcher> mpMasterPageListWatcher; + /// The last, still alive SdDrawDocument instance, for debugging. + static SdDrawDocument* s_pLast; SAL_DLLPRIVATE void UpdatePageObjectsInNotes(sal_uInt16 nStartPos); SAL_DLLPRIVATE void UpdatePageRelativeURLs(SdPage const * pPage, sal_uInt16 nPos, sal_Int32 nIncrement); diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 5e2641d952e6..56b4202da639 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -97,6 +97,7 @@ using ::com::sun::star::uno::Reference; SdDrawDocument* SdDrawDocument::s_pDocLockedInsertingLinks = nullptr; +SdDrawDocument* SdDrawDocument::s_pLast = nullptr; PresentationSettings::PresentationSettings() : mbAll( true ), @@ -347,11 +348,14 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) rLayerAdmin.SetControlLayerName(sUNO_LayerName_controls); } + s_pLast = this; } // Destructor SdDrawDocument::~SdDrawDocument() { + s_pLast = nullptr; + Broadcast(SdrHint(SdrHintKind::ModelCleared)); if (mpWorkStartupTimer)
