From b3579d71c6536ab1d03cc47249d582a574fd054a Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 23 Jun 2010 13:38:34 +0200 Subject: koheirowlimitperf: #i109369# #i109373# #i109384# #i109385# #i109386# #i109387# #i109388# #i109389# #i109391# #i109934# #i109935# #i110116# #i111531# #i111887# #i112190# #i30215# increased the row limit to 1 million, and integrated lots of speed optimization and bug fixes to ensure Calc remains usable after the row limit increase. --- sc/source/ui/view/viewfunc.cxx | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) (limited to 'sc/source/ui/view/viewfunc.cxx') diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 5d3bf97aa29c..231eb4e67562 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -2195,28 +2195,19 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR { // fuer alle eingeblendeten CR_MANUALSIZE loeschen, // dann SetOptimalHeight mit bShrink = FALSE - ScCompressedArrayIterator< SCROW, BYTE> aIter( - pDoc->GetRowFlagsArray( nTab), nStartNo, - nEndNo); - do + for (SCROW nRow = nStartNo; nRow <= nEndNo; ++nRow) { - BYTE nOld = *aIter; - if ( (nOld & CR_HIDDEN) == 0 && ( nOld & CR_MANUALSIZE ) ) + SCROW nLastRow = nRow; + if (pDoc->RowHidden(nRow, nTab, NULL, &nLastRow)) { - SCROW nRangeEnd = aIter.GetRangeEnd(); - pDoc->SetRowFlags( aIter.GetRangeStart(), - nRangeEnd, nTab, - nOld & ~CR_MANUALSIZE); - aIter.Resync( nRangeEnd); - // Range may be extended due to merges and - // now aIter.GetRangeEnd() may point behind - // the previous row, but all flags of this - // range have the CR_MANUALSIZE bit - // removed, so it is safe to continue with - // the next range, not necessary to catch - // up with the remaining rows. + nRow = nLastRow; + continue; } - } while (aIter.NextRange()); + + BYTE nOld = pDoc->GetRowFlags(nRow, nTab); + if (nOld & CR_MANUALSIZE) + pDoc->SetRowFlags(nRow, nTab, nOld & ~CR_MANUALSIZE); + } } double nPPTX = GetViewData()->GetPPTX(); @@ -2258,8 +2249,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR { for (SCCOL nCol=static_cast(nStartNo); nCol<=static_cast(nEndNo); nCol++) { - if ( eMode != SC_SIZE_VISOPT || - (pDoc->GetColFlags( nCol, nTab ) & CR_HIDDEN) == 0 ) + if ( eMode != SC_SIZE_VISOPT || !pDoc->ColHidden(nCol, nTab) ) { USHORT nThisSize = nSizeTwips; -- cgit