sd/inc/drawdoc.hxx         |    2 ++
 sd/source/core/drawdoc.cxx |    4 ++++
 2 files changed, 6 insertions(+)

New commits:
commit 984a3fd8c0f8ca09a943bf73a1e917874df09ecd
Author:     Miklos Vajna <[email protected]>
AuthorDate: Wed Oct 8 09:50:27 2025 +0200
Commit:     Miklos Vajna <[email protected]>
CommitDate: Thu Oct 9 18:03:24 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/+/192106
    Reviewed-by: Miklos Vajna <[email protected]>
    Tested-by: Jenkins

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 1e4e544828c4..cb44248ba7cd 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -386,6 +386,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 7edfe9249557..6a05c2e287a2 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)

Reply via email to