summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-09-20 15:14:21 +0300
committerDennis Francis <dennis.francis@collabora.co.uk>2017-11-21 13:49:51 +0530
commit32328cc9db0b3dffe385140246aac3f9e817fb18 (patch)
treebc42969c383f0c0b004d3ae9a767dbb4efb7b730
parent5aef73861ee2c8d48ed54768c8748e37ab5d9b23 (diff)
Guard pFormatExchangeList from mutation during threaded calculation
Change-Id: I645630fae8a5fcd09d8af4c4ec9aac94edbd2f25
-rw-r--r--sc/source/core/data/document.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index cb18dd759cf1..d1e42ea9c0b3 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2464,6 +2464,7 @@ ScDocument::NumFmtMergeHandler::NumFmtMergeHandler(ScDocument* pDoc, const ScDoc
ScDocument::NumFmtMergeHandler::~NumFmtMergeHandler()
{
+ ScMutationGuard aGuard(mpDoc, ScMutationGuardFlags::CORE);
mpDoc->pFormatExchangeList = nullptr;
}
@@ -2561,7 +2562,10 @@ void ScDocument::MergeNumberFormatter(const ScDocument* pSrcDoc)
SvNumberFormatterIndexTable* pExchangeList =
pThisFormatter->MergeFormatter(*pOtherFormatter);
if (!pExchangeList->empty())
+ {
+ ScMutationGuard aGuard(this, ScMutationGuardFlags::CORE);
pFormatExchangeList = pExchangeList;
+ }
}
}