summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2018-02-19 11:27:51 +0100
committerMichael Stahl <mstahl@redhat.com>2018-02-20 12:57:12 +0100
commit5f4366236537b7e44afd5b559c826db8ce35d404 (patch)
tree18d7ea4b8f5f491a4358736acb3c08542ef57b05 /sw
parentbd9dfec21413fdd5df346e8dfecdffdd7bc30fc6 (diff)
sw: DELETEZ to unique_ptr in DocumentLinksAdministrationManager
Change-Id: I428848c48c2d265e82db9d3666492d50b01a221d
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/DocumentLinksAdministrationManager.cxx14
-rw-r--r--sw/source/core/inc/DocumentLinksAdministrationManager.hxx3
2 files changed, 9 insertions, 8 deletions
diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
index a66b29ec3ab0..2d275359f57b 100644
--- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
+++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
@@ -169,10 +169,11 @@ namespace
namespace sw
{
-DocumentLinksAdministrationManager::DocumentLinksAdministrationManager( SwDoc& i_rSwdoc ) : mbVisibleLinks(true),
- mbLinksUpdated( false ), //#i38810#
- mpLinkMgr( new sfx2::LinkManager( nullptr ) ),
- m_rDoc( i_rSwdoc )
+DocumentLinksAdministrationManager::DocumentLinksAdministrationManager( SwDoc& i_rSwdoc )
+ : mbVisibleLinks(true)
+ , mbLinksUpdated( false ) //#i38810#
+ , m_pLinkMgr( new sfx2::LinkManager(nullptr) )
+ , m_rDoc( i_rSwdoc )
{
}
@@ -188,12 +189,12 @@ void DocumentLinksAdministrationManager::SetVisibleLinks(bool bFlag)
sfx2::LinkManager& DocumentLinksAdministrationManager::GetLinkManager()
{
- return *mpLinkMgr;
+ return *m_pLinkMgr;
}
const sfx2::LinkManager& DocumentLinksAdministrationManager::GetLinkManager() const
{
- return *mpLinkMgr;
+ return *m_pLinkMgr;
}
// #i42634# Moved common code of SwReader::Read() and SwDocShell::UpdateLinks()
@@ -439,7 +440,6 @@ bool DocumentLinksAdministrationManager::LinksUpdated() const
DocumentLinksAdministrationManager::~DocumentLinksAdministrationManager()
{
- DELETEZ( mpLinkMgr );
}
bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr, SwPaM*& rpPam, SwNodeRange*& rpRange ) const
diff --git a/sw/source/core/inc/DocumentLinksAdministrationManager.hxx b/sw/source/core/inc/DocumentLinksAdministrationManager.hxx
index 43dc9a91c1a1..8294eaf86f4d 100644
--- a/sw/source/core/inc/DocumentLinksAdministrationManager.hxx
+++ b/sw/source/core/inc/DocumentLinksAdministrationManager.hxx
@@ -22,6 +22,7 @@
#include <IDocumentLinksAdministration.hxx>
+#include <memory>
namespace sfx2 { class LinkManager; }
class SwDoc;
@@ -71,7 +72,7 @@ private:
bool mbVisibleLinks; //< TRUE: Links are inserted visibly.
bool mbLinksUpdated; //< #i38810# flag indicating, that the links have been updated.
- sfx2::LinkManager *mpLinkMgr; //< List of linked stuff (graphics/DDE/OLE).
+ std::unique_ptr<sfx2::LinkManager> m_pLinkMgr; //< List of linked stuff (graphics/DDE/OLE).
SwDoc& m_rDoc;
};