diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-25 13:46:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-26 07:30:07 +0100 |
commit | 9e23683b4c91c60e39839a03cfa6adc436a9afeb (patch) | |
tree | c63efbe4a1b51c495dae1867cf04f4cf2c617f8d /sd | |
parent | 55febfff803fd0a49a8b24fd7dc16253e70bd28e (diff) |
loplugin:singlevalfields
Change-Id: I4a56a27ebce927b8e21cf37bb2c527caf1317bcc
Reviewed-on: https://gerrit.libreoffice.org/69681
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/sdtreelb.cxx | 17 | ||||
-rw-r--r-- | sd/source/ui/inc/sdtreelb.hxx | 1 |
2 files changed, 0 insertions, 18 deletions
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 32586303799f..cfac921eeda0 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -1407,7 +1407,6 @@ SdPageObjsTLV::SdPageObjsTLV(std::unique_ptr<weld::TreeView> xTreeView) , m_pDoc(nullptr) , m_pBookmarkDoc(nullptr) , m_pMedium(nullptr) - , m_pOwnMedium(nullptr) , m_bLinkableSelected(false) , m_bShowAllPages(false) { @@ -1465,12 +1464,6 @@ SdDrawDocument* SdPageObjsTLV::GetBookmarkDoc() { if (!m_pBookmarkDoc) { - // create a new BookmarkDoc if now one exists or if a new Medium is provided - if (m_pOwnMedium != nullptr) - { - CloseBookmarkDoc(); - } - DBG_ASSERT( m_pMedium, "No SfxMedium provided!" ); if ( m_pMedium ) @@ -1585,13 +1578,9 @@ void SdPageObjsTLV::CloseBookmarkDoc() { m_xBookmarkDocShRef->DoClose(); m_xBookmarkDocShRef.clear(); - - // Medium is owned by document, so it's destroyed already - m_pOwnMedium = nullptr; } else if (m_pBookmarkDoc) { - DBG_ASSERT(!m_pOwnMedium, "SfxMedium confusion!"); if (m_pDoc) { // The document owns the Medium, so the Medium will be invalid after closing the document @@ -1599,12 +1588,6 @@ void SdPageObjsTLV::CloseBookmarkDoc() m_pMedium = nullptr; } } - else - { - // perhaps mpOwnMedium provided, but no successful creation of BookmarkDoc - delete m_pOwnMedium; - m_pOwnMedium = nullptr; - } m_pBookmarkDoc = nullptr; } diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx index e08674568bd2..8d404ebf5b7c 100644 --- a/sd/source/ui/inc/sdtreelb.hxx +++ b/sd/source/ui/inc/sdtreelb.hxx @@ -299,7 +299,6 @@ private: const SdDrawDocument* m_pDoc; SdDrawDocument* m_pBookmarkDoc; SfxMedium* m_pMedium; - SfxMedium* m_pOwnMedium; bool m_bLinkableSelected; /** This flag controls whether to show all pages. */ |