Lines 19-26
Link Here
|
19 |
* |
19 |
* |
20 |
*************************************************************/ |
20 |
*************************************************************/ |
21 |
|
21 |
|
22 |
|
|
|
23 |
|
24 |
// MARKER(update_precomp.py): autogen include statement, do not remove |
22 |
// MARKER(update_precomp.py): autogen include statement, do not remove |
25 |
#include "precompiled_sc.hxx" |
23 |
#include "precompiled_sc.hxx" |
26 |
|
24 |
|
Lines 1420-1425
void XclImpPivotTable::Convert()
Link Here
|
1420 |
mpDPObj = pDPObj; |
1418 |
mpDPObj = pDPObj; |
1421 |
|
1419 |
|
1422 |
ApplyMergeFlags(aOutRange, aSaveData); |
1420 |
ApplyMergeFlags(aOutRange, aSaveData); |
|
|
1421 |
MaybeRefresh(); // refresh after convert immediately |
1422 |
mxPCache = XclImpPivotCacheRef(); // release memory |
1423 |
} |
1423 |
} |
1424 |
|
1424 |
|
1425 |
void XclImpPivotTable::MaybeRefresh() |
1425 |
void XclImpPivotTable::MaybeRefresh() |
Lines 1612-1634
void XclImpPivotTableManager::ReadSxView
Link Here
|
1612 |
|
1612 |
|
1613 |
// ---------------------------------------------------------------------------- |
1613 |
// ---------------------------------------------------------------------------- |
1614 |
|
1614 |
|
1615 |
void XclImpPivotTableManager::ReadPivotCaches( XclImpStream& rStrm ) |
1615 |
// Reading all used pivot caches at one time and then converting all pivot tables together will consume too much memory, forbid this action |
|
|
1616 |
// ConvertPivotTables will change to read cache one by one and convert it then release the memory |
1617 |
/*void XclImpPivotTableManager::ReadPivotCaches( XclImpStream& rStrm ) |
1616 |
{ |
1618 |
{ |
1617 |
for( XclImpPivotCacheVec::iterator aIt = maPCaches.begin(), aEnd = maPCaches.end(); aIt != aEnd; ++aIt ) |
1619 |
for( XclImpPivotCacheVec::iterator aIt = maPCaches.begin(), aEnd = maPCaches.end(); aIt != aEnd; ++aIt ) |
1618 |
(*aIt)->ReadPivotCacheStream( rStrm ); |
1620 |
(*aIt)->ReadPivotCacheStream( rStrm ); |
1619 |
} |
1621 |
}*/ |
1620 |
|
1622 |
|
1621 |
void XclImpPivotTableManager::ConvertPivotTables() |
1623 |
void XclImpPivotTableManager::ConvertPivotTables( XclImpStream & rStm/* guoyanp: for DP memory */ ) |
1622 |
{ |
1624 |
{ |
|
|
1625 |
// for( XclImpPivotTableVec::iterator aIt = maPTables.begin(), aEnd = maPTables.end(); aIt != aEnd; ++aIt ) |
1626 |
// (*aIt)->Convert(); |
1627 |
|
1628 |
std::map< sal_uInt16, std::list< XclImpPivotTableRef > > aMap; |
1629 |
|
1623 |
for( XclImpPivotTableVec::iterator aIt = maPTables.begin(), aEnd = maPTables.end(); aIt != aEnd; ++aIt ) |
1630 |
for( XclImpPivotTableVec::iterator aIt = maPTables.begin(), aEnd = maPTables.end(); aIt != aEnd; ++aIt ) |
1624 |
(*aIt)->Convert(); |
1631 |
aMap[(*aIt)->GetCacheId()].push_back( *aIt ); |
|
|
1632 |
|
1633 |
size_t iCache = 0; |
1634 |
|
1635 |
for( std::map< sal_uInt16, std::list< XclImpPivotTableRef > >::iterator i = aMap.begin(); i != aMap.end(); i++, iCache++ ) |
1636 |
{ |
1637 |
if( i->first >= maPCaches.size() ) continue; |
1638 |
|
1639 |
maPCaches[iCache]->ReadPivotCacheStream( rStm ); |
1640 |
|
1641 |
for( std::list< XclImpPivotTableRef >::iterator j = i->second.begin(); j != i->second.end(); j++ ) |
1642 |
(*j)->Convert(); |
1643 |
|
1644 |
maPCaches[iCache] = XclImpPivotCacheRef(); |
1645 |
} |
1625 |
} |
1646 |
} |
1626 |
|
1647 |
|
1627 |
void XclImpPivotTableManager::MaybeRefreshPivotTables() |
1648 |
// Reading all used pivot caches at one time and then converting all pivot tables together will consume too much memory, forbid that action |
|
|
1649 |
// ConvertPivotTables will change to read cache one by one and convert it then release the memory |
1650 |
// So refreshing all pivot tables at one time is forbidden too because the cache already released |
1651 |
// Need to refresh one by one after convert every pivot table |
1652 |
/*void XclImpPivotTableManager::MaybeRefreshPivotTables() |
1628 |
{ |
1653 |
{ |
1629 |
for( XclImpPivotTableVec::iterator aIt = maPTables.begin(), aEnd = maPTables.end(); aIt != aEnd; ++aIt ) |
1654 |
for( XclImpPivotTableVec::iterator aIt = maPTables.begin(), aEnd = maPTables.end(); aIt != aEnd; ++aIt ) |
1630 |
(*aIt)->MaybeRefresh(); |
1655 |
(*aIt)->MaybeRefresh(); |
1631 |
} |
1656 |
}*/ |
1632 |
|
1657 |
|
1633 |
// ============================================================================ |
1658 |
// ============================================================================ |
1634 |
|
1659 |
|