summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/externalrefmgr.hxx6
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index b0b81ea705e8..b95d6d1a0fd1 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SC_INC_EXTERNALREFMGR_HXX
#include "address.hxx"
+#include "document.hxx"
#include <sfx2/objsh.hxx>
#include <sfx2/lnkbase.hxx>
#include <tools/time.hxx>
@@ -40,7 +41,6 @@
#include <set>
#include <formula/ExternalReferenceHelper.hxx>
-class ScDocument;
class ScTokenArray;
namespace weld { class Window; }
@@ -299,7 +299,7 @@ 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 mpFakeDoc; }
+ const ScDocument* getFakeDoc() const { return mxFakeDoc.get(); }
private:
struct RangeHash
@@ -358,7 +358,7 @@ private:
private:
mutable osl::Mutex maMtxDocs;
mutable DocDataType maDocs;
- ScDocument* mpFakeDoc; // just to have something to pass to the methods that need to validate columns/rows
+ ScDocumentUniquePtr mxFakeDoc; // just to have something to pass to the methods that need to validate columns/rows
};
class SC_DLLPUBLIC ScExternalRefManager final : public formula::ExternalReferenceHelper, public SfxListener
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 56273f1b6c99..c164c548424e 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -457,7 +457,7 @@ ScExternalRefCache::CellFormat::CellFormat() :
}
ScExternalRefCache::ScExternalRefCache()
- : mpFakeDoc(new ScDocument())
+ : mxFakeDoc(new ScDocument())
{}
ScExternalRefCache::~ScExternalRefCache() {}
@@ -687,7 +687,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData(
ScMatrixToken aToken(xMat);
if (!pArray)
- pArray.reset(new ScTokenArray(mpFakeDoc));
+ pArray.reset(new ScTokenArray(mxFakeDoc.get()));
pArray->AddToken(aToken);
bFirstTab = false;