diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-12-02 14:40:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-12-03 10:01:40 +0100 |
commit | b01e7dec34e92a46add83de503c086ba12a3ab51 (patch) | |
tree | 193290c941a26513150c613948f7d25d89a7828a /sc/inc | |
parent | aa5ee0085c7d8b8713f4dbed0009b38b9fabb281 (diff) |
Related: ofz#41376 reuse ScExternalRefManager ScDocument in ScExternalRefCache
Change-Id: Iaed5b7929411dc938fe19df02905a9c9faa52051
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126256
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/externalrefmgr.hxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index 0317e89a4538..1064910ad975 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -182,7 +182,7 @@ public: typedef std::unordered_map< OUString, size_t> TableNameIndexMap; - ScExternalRefCache(); + ScExternalRefCache(const ScDocument& rDoc); ~ScExternalRefCache(); const OUString* getRealTableName(sal_uInt16 nFileId, const OUString& rTabName) const; @@ -298,8 +298,8 @@ public: */ void clearCacheTables(sal_uInt16 nFileId); - // Get the fake doc used to pass to methods that need an ScDocument in order to do row/col validation - const ScDocument* getFakeDoc() const { return mxFakeDoc.get(); } + // Get the doc used to pass to methods that need an ScDocument in order to do row/col validation + const ScDocument& getDoc() const { return mrDoc; } private: struct RangeHash @@ -358,7 +358,7 @@ private: private: mutable osl::Mutex maMtxDocs; mutable DocDataType maDocs; - ScDocumentUniquePtr mxFakeDoc; // just to have something to pass to the methods that need to validate columns/rows + const ScDocument& mrDoc; }; class SC_DLLPUBLIC ScExternalRefManager final : public formula::ExternalReferenceHelper, public SfxListener |