summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/externalrefmgr.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-10-14 11:51:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-10-14 14:45:37 +0200
commit6e43569fdfcb5070b6149b34f797008ff9b95809 (patch)
tree123d7f50885759cc3a6945190dba92d8a2cd5962 /sc/source/ui/docshell/externalrefmgr.cxx
parentc998691e22ceda15c89d55cf7005201f0392dadb (diff)
ofz: leak of ScDocument
since... commit 12ee423c7549ddd2b86dfc3fc6fed2c617dcca7f Date: Mon Sep 13 12:17:37 2021 +0200 tdf#144397 tdf#144636 XLSX: cache external named ranges and their formulas Change-Id: I66b2d16502868b10c0c1ef59b1c13523c414b62e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123583 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/docshell/externalrefmgr.cxx')
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index d3b1bdd84d41..0da26f43b63f 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1758,7 +1758,7 @@ void ScExternalRefManager::storeRangeNameTokens(sal_uInt16 nFileId, const OUStri
{
// Parse all tokens in this external range data, and replace each absolute
// reference token with an external reference token, and cache them.
- pNewArray = std::make_shared<ScTokenArray>(*new ScDocument());
+ pNewArray = std::make_shared<ScTokenArray>(mrDoc);
FormulaTokenArrayPlainIterator aIter(rArray);
for (const FormulaToken* pToken = aIter.First(); pToken; pToken = aIter.Next())
{