diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-05-10 13:48:35 +0200 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-05-10 13:48:35 +0200 |
commit | 99e46c632f56ce632e861299c32d99e363640da1 (patch) | |
tree | 7fe593d2d8d3a3a0fb27278803eee5333a875110 /sc/source | |
parent | e41b8df9409edc8aaf93ccdac4050e6ea90ebd99 (diff) | |
parent | dd8ca5b67f9d1bfc3a67c21d0bac58b21d7ff60f (diff) |
CWS-TOOLING: integrate CWS calcautocrash
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/dpcachetable.cxx | 30 | ||||
-rwxr-xr-x | sc/source/core/data/dptablecache.cxx | 34 |
2 files changed, 33 insertions, 31 deletions
diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx index ad5e921cb278..d97900e6b904 100644 --- a/sc/source/core/data/dpcachetable.cxx +++ b/sc/source/core/data/dpcachetable.cxx @@ -183,39 +183,9 @@ sal_Int32 ScDPCacheTable::getColSize() const return GetCache()->GetColumnCount(); } -namespace { - -/** - * While the macro interpret level is incremented, the formula cells are - * (semi-)guaranteed to be interpreted. - */ -class MacroInterpretIncrementer -{ -public: - MacroInterpretIncrementer(ScDocument* pDoc) : - mpDoc(pDoc) - { - mpDoc->IncMacroInterpretLevel(); - } - ~MacroInterpretIncrementer() - { - mpDoc->DecMacroInterpretLevel(); - } -private: - ScDocument* mpDoc; -}; - -} - void ScDPCacheTable::fillTable( const ScQueryParam& rQuery, BOOL* pSpecial, bool bIgnoreEmptyRows, bool bRepeatIfEmpty ) { - // Make sure the formula cells within the data range are interpreted - // during this call, for this method may be called from the interpretation - // of GETPIVOTDATA, which disables nested formula interpretation without - // increasing the macro level. - MacroInterpretIncrementer aMacroInc(GetCache()->GetDoc()); - if ( mpCache == NULL ) InitNoneCache( NULL ); //check cache diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx index 42090e5203a2..fc9cf2b99a10 100755 --- a/sc/source/core/data/dptablecache.cxx +++ b/sc/source/core/data/dptablecache.cxx @@ -304,7 +304,7 @@ void ScDPItemData::dump() const DBG_TRACE1( "Numberformat= %o", nNumFormat ); DBG_TRACESTR(aString ); DBG_TRACE1( "fValue= %f", fValue ); - DBG_TRACE1( "bHasValue= %d", bHasValue ? 1:0); + DBG_TRACE1( "mbFlag= %d", mbFlag); } #endif //End @@ -489,8 +489,40 @@ bool ScDPTableDataCache::IsValid() const } // ----------------------------------------------------------------------- + +namespace { + +/** + * While the macro interpret level is incremented, the formula cells are + * (semi-)guaranteed to be interpreted. + */ +class MacroInterpretIncrementer +{ +public: + MacroInterpretIncrementer(ScDocument* pDoc) : + mpDoc(pDoc) + { + mpDoc->IncMacroInterpretLevel(); + } + ~MacroInterpretIncrementer() + { + mpDoc->DecMacroInterpretLevel(); + } +private: + ScDocument* mpDoc; +}; + +} + +// ----------------------------------------------------------------------- bool ScDPTableDataCache::InitFromDoc( ScDocument* pDoc, const ScRange& rRange ) { + // Make sure the formula cells within the data range are interpreted + // during this call, for this method may be called from the interpretation + // of GETPIVOTDATA, which disables nested formula interpretation without + // increasing the macro level. + MacroInterpretIncrementer aMacroInc(pDoc); + // SCROW nStartRow = rRange.aStart.Row(); // start of data SCROW nEndRow = rRange.aEnd.Row(); |