summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-03-09 14:51:15 -0500
committerKohei Yoshida <kyoshida@novell.com>2010-03-09 14:51:15 -0500
commit5f94a5e44621da1ca3cf59df7d6cbace46606995 (patch)
treec0484cfa5a9108b132d0eae9e995a64e66cbb04c /sc/inc
parentae6f4b5f20abc753f6d065e007c56a80b4925f6b (diff)
koheiextref01: #i108404# Disable interaction handler when interpreting formula strings via UNO API.
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/externalrefmgr.hxx25
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*);