fix corrupted numbers in pivottable using group field as data field fdo#45276

This commit is contained in:
Noel Power 2012-01-26 16:29:07 +00:00
parent 16af091a33
commit 50be8ec9ed

View file

@ -1420,8 +1420,15 @@ void PivotTable::finalizeImport()
// all data fields
for( DataFieldVector::iterator aIt = maDataFields.begin(), aEnd = maDataFields.end(); aIt != aEnd; ++aIt )
{
if( const PivotCacheField* pCacheField = getCacheField( aIt->mnField ) )
{
if ( pCacheField-> getGroupBaseField() != -1 )
aIt->mnField = pCacheField-> getGroupBaseField();
}
if( PivotTableField* pField = getTableField( aIt->mnField ) )
pField->convertDataField( *aIt );
}
// filters
maFilters.forEachMem( &PivotTableFilter::finalizeImport );