Kaydet (Commit) 5f436623 authored tarafından Michael Stahl's avatar Michael Stahl

sw: DELETEZ to unique_ptr in DocumentLinksAdministrationManager

Change-Id: I428848c48c2d265e82db9d3666492d50b01a221d
üst bd9dfec2
...@@ -169,10 +169,11 @@ namespace ...@@ -169,10 +169,11 @@ namespace
namespace sw namespace sw
{ {
DocumentLinksAdministrationManager::DocumentLinksAdministrationManager( SwDoc& i_rSwdoc ) : mbVisibleLinks(true), DocumentLinksAdministrationManager::DocumentLinksAdministrationManager( SwDoc& i_rSwdoc )
mbLinksUpdated( false ), //#i38810# : mbVisibleLinks(true)
mpLinkMgr( new sfx2::LinkManager( nullptr ) ), , mbLinksUpdated( false ) //#i38810#
m_rDoc( i_rSwdoc ) , m_pLinkMgr( new sfx2::LinkManager(nullptr) )
, m_rDoc( i_rSwdoc )
{ {
} }
...@@ -188,12 +189,12 @@ void DocumentLinksAdministrationManager::SetVisibleLinks(bool bFlag) ...@@ -188,12 +189,12 @@ void DocumentLinksAdministrationManager::SetVisibleLinks(bool bFlag)
sfx2::LinkManager& DocumentLinksAdministrationManager::GetLinkManager() sfx2::LinkManager& DocumentLinksAdministrationManager::GetLinkManager()
{ {
return *mpLinkMgr; return *m_pLinkMgr;
} }
const sfx2::LinkManager& DocumentLinksAdministrationManager::GetLinkManager() const const sfx2::LinkManager& DocumentLinksAdministrationManager::GetLinkManager() const
{ {
return *mpLinkMgr; return *m_pLinkMgr;
} }
// #i42634# Moved common code of SwReader::Read() and SwDocShell::UpdateLinks() // #i42634# Moved common code of SwReader::Read() and SwDocShell::UpdateLinks()
...@@ -439,7 +440,6 @@ bool DocumentLinksAdministrationManager::LinksUpdated() const ...@@ -439,7 +440,6 @@ bool DocumentLinksAdministrationManager::LinksUpdated() const
DocumentLinksAdministrationManager::~DocumentLinksAdministrationManager() DocumentLinksAdministrationManager::~DocumentLinksAdministrationManager()
{ {
DELETEZ( mpLinkMgr );
} }
bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr, SwPaM*& rpPam, SwNodeRange*& rpRange ) const bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr, SwPaM*& rpPam, SwNodeRange*& rpRange ) const
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <IDocumentLinksAdministration.hxx> #include <IDocumentLinksAdministration.hxx>
#include <memory>
namespace sfx2 { class LinkManager; } namespace sfx2 { class LinkManager; }
class SwDoc; class SwDoc;
...@@ -71,7 +72,7 @@ private: ...@@ -71,7 +72,7 @@ private:
bool mbVisibleLinks; //< TRUE: Links are inserted visibly. bool mbVisibleLinks; //< TRUE: Links are inserted visibly.
bool mbLinksUpdated; //< #i38810# flag indicating, that the links have been updated. 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; SwDoc& m_rDoc;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment