diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-05 19:06:15 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-06 20:40:25 -0500 |
commit | 35a5999247bbb120dc677515d199b7da3c39146f (patch) | |
tree | 9b4f003774e6dc6ccbd97556ffdd69db39020c61 /sc/inc | |
parent | 719c3fb46bb38c69daea617ea9aaafc72505684d (diff) |
Guard cache access with mutex & a new method just to check for range name.
Change-Id: Id24b5ba72362f9d878b4878c1e807bed3e596b20
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/externalrefmgr.hxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index 6156abb06ac4..b3d35f9f4477 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -233,6 +233,7 @@ public: ScExternalRefCache::TokenArrayRef getRangeNameTokens(sal_uInt16 nFileId, const OUString& rName); void setRangeNameTokens(sal_uInt16 nFileId, const OUString& rName, TokenArrayRef pArray); + bool isValidRangeName(sal_uInt16 nFileId, const OUString& rName) const; void setCellData(sal_uInt16 nFileId, const OUString& rTabName, SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uLong nFmtIndex); @@ -557,6 +558,8 @@ public: ScExternalRefCache::TokenArrayRef getRangeNameTokens( sal_uInt16 nFileId, const OUString& rName, const ScAddress* pCurPos = NULL); + bool isValidRangeName(sal_uInt16 nFileId, const OUString& rName); + OUString getOwnDocumentName() const; bool isOwnDocument(const OUString& rFile) const; @@ -765,6 +768,12 @@ private: private: ScDocument* mpDoc; + /** Mutex for accessing cached data and/or source document shells. */ + mutable osl::Mutex maMtxCacheAccess; + + /** Mutex for source document meta-data access. */ + mutable osl::Mutex maMtxSrcFiles; + /** cache of referenced ranges and names from source documents. */ ScExternalRefCache maRefCache; @@ -798,7 +807,6 @@ private: * external document identifiers. */ std::vector<SrcFileData> maSrcFiles; - mutable osl::Mutex maMtxSrcFiles; /** Status whether in reference marking state. See isInReferenceMarking(). */ bool mbInReferenceMarking:1; |