summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-08-18 16:46:44 +0300
committerDennis Francis <dennis.francis@collabora.co.uk>2017-11-21 13:49:49 +0530
commitea7df4d8f94e25206114bfed503c683a8e7e79e0 (patch)
tree0bec910615641fa6932c54983feb98d812832e71
parentdeca44db3c383be546a40f059130b1f046d36b16 (diff)
Always create the DocumentLinkManager, avoids a mutation assertion failure
Change-Id: If968792c4b98afbe0cc956e9cab0bcfde47bf1c1
-rw-r--r--sc/inc/document.hxx2
-rw-r--r--sc/source/core/data/documen2.cxx6
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;
}