Kaydet (Commit) 99e46c63 authored tarafından Ivo Hinkelmann's avatar Ivo Hinkelmann

CWS-TOOLING: integrate CWS calcautocrash

......@@ -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
......
......@@ -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
......@@ -488,9 +488,41 @@ bool ScDPTableDataCache::IsValid() const
return mpTableDataValues!=NULL && mpSourceData!= NULL && mnColumnCount>0;
}
// -----------------------------------------------------------------------
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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment