diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-03-09 14:51:15 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-03-09 14:51:15 -0500 |
commit | 5f94a5e44621da1ca3cf59df7d6cbace46606995 (patch) | |
tree | c0484cfa5a9108b132d0eae9e995a64e66cbb04c /sc/inc/externalrefmgr.hxx | |
parent | koheiextref01: #i108064# Disable things that are not necessary in external do... (diff) | |
download | core-5f94a5e44621da1ca3cf59df7d6cbace46606995.tar.gz core-5f94a5e44621da1ca3cf59df7d6cbace46606995.zip |
koheiextref01: #i108404# Disable interaction handler when interpreting formula strings via UNO API.
Diffstat (limited to 'sc/inc/externalrefmgr.hxx')
-rw-r--r-- | sc/inc/externalrefmgr.hxx | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index f251875b35ea..3f368d9a3189 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -386,6 +386,21 @@ public: }; }; + /** + * Use this guard when performing something from the API that might query + * values from external references. Interpreting formula strings is one + * such example. + */ + class ApiGuard + { + public: + ApiGuard(ScExternalRefManager* pMgr); + ~ApiGuard(); + private: + ScExternalRefManager* mpMgr; + bool mbOldInteractionEnabled; + }; + private: /** Shell instance for a source document. */ struct SrcShell @@ -512,7 +527,7 @@ public: * @returns <TRUE/> if setAllCacheTableReferencedStati(false) was called, * <FALSE/> if setAllCacheTableReferencedStati(true) was called. */ - bool isInReferenceMarking() const { return bInReferenceMarking; } + bool isInReferenceMarking() const { return mbInReferenceMarking; } void storeRangeNameTokens(sal_uInt16 nFileId, const String& rName, const ScTokenArray& rArray); @@ -716,7 +731,13 @@ private: ::std::vector<SrcFileData> maSrcFiles; /** Status whether in reference marking state. See isInReferenceMarking(). */ - bool bInReferenceMarking; + bool mbInReferenceMarking:1; + + /** + * Controls whether or not to allow user interaction. We don't want any + * user interaction when calling from the API. + */ + bool mbUserInteractionEnabled:1; AutoTimer maSrcDocTimer; DECL_LINK(TimeOutHdl, AutoTimer*); |