diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-08-18 16:46:44 +0300 |
---|---|---|
committer | Dennis Francis <dennis.francis@collabora.co.uk> | 2017-11-21 16:09:40 +0530 |
commit | 6d94519008580975608f852f4adee50ec099a6ad (patch) | |
tree | c77550117892c2befab6286a16dac925f79c0e3e /sc | |
parent | 84705061e64b45a69c14219c3611099b6d428f72 (diff) |
Always create the DocumentLinkManager, avoids a mutation assertion failure
Change-Id: If968792c4b98afbe0cc956e9cab0bcfde47bf1c1
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/document.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/documen2.cxx | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 31f87443ecc4..a51a5f3f18d5 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -326,7 +326,7 @@ private: std::shared_ptr<svl::SharedStringPool> mpCellStringPool; std::shared_ptr<sc::FormulaGroupContext> mpFormulaGroupCxt; - mutable std::unique_ptr<sc::DocumentLinkManager> mpDocLinkMgr; + std::unique_ptr<sc::DocumentLinkManager> mpDocLinkMgr; ScCalcConfig maCalcConfig; diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index ba434acae8b1..b18ab889a561 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -134,6 +134,7 @@ private: ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) : mpCellStringPool(new svl::SharedStringPool(ScGlobal::pCharClass)), mpFormulaGroupCxt(nullptr), + mpDocLinkMgr(new sc::DocumentLinkManager(pDocShell)), maCalcConfig( ScInterpreter::GetGlobalConfig()), mpUndoManager( nullptr ), mpEditEngine( nullptr ), @@ -265,11 +266,6 @@ const sfx2::LinkManager* ScDocument::GetLinkManager() const sc::DocumentLinkManager& ScDocument::GetDocLinkManager() { - if (!mpDocLinkMgr) - { - ScMutationGuard aGuard(this, {ScMutationGuardFlags::CORE}); - mpDocLinkMgr.reset(new sc::DocumentLinkManager(mpShell)); - } return *mpDocLinkMgr; } |