View | Details | Raw Unified | Return to issue 119707
Collapse All | Expand All

(-)sc/inc/attarray.hxx (+1 lines)
Lines 166-171 Link Here
166
166
167
    sal_Bool    GetFirstVisibleAttr( SCROW& rFirstRow ) const;
167
    sal_Bool    GetFirstVisibleAttr( SCROW& rFirstRow ) const;
168
    sal_Bool    GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const;
168
    sal_Bool    GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const;
169
	sal_Bool    GetLastAttr( SCROW& rLastRow, SCROW nLastData ) const;
169
	sal_Bool	HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const;
170
	sal_Bool	HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const;
170
	sal_Bool	IsVisibleEqual( const ScAttrArray& rOther,
171
	sal_Bool	IsVisibleEqual( const ScAttrArray& rOther,
171
							SCROW nStartRow, SCROW nEndRow ) const;
172
							SCROW nStartRow, SCROW nEndRow ) const;
(-)sc/inc/column.hxx (+1 lines)
Lines 171-176 Link Here
171
171
172
    sal_Bool        GetFirstVisibleAttr( SCROW& rFirstRow ) const;
172
    sal_Bool        GetFirstVisibleAttr( SCROW& rFirstRow ) const;
173
    sal_Bool        GetLastVisibleAttr( SCROW& rLastRow ) const;
173
    sal_Bool        GetLastVisibleAttr( SCROW& rLastRow ) const;
174
	sal_Bool		GetLastAttr( SCROW& rLastRow ) const;
174
	sal_Bool		HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const;
175
	sal_Bool		HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const;
175
	sal_Bool		IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow = 0,
176
	sal_Bool		IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow = 0,
176
									SCROW nEndRow = MAXROW ) const;
177
									SCROW nEndRow = MAXROW ) const;
(-)sc/inc/document.hxx (+1 lines)
Lines 956-961 Link Here
956
										SCROW& rEndRow, sal_Bool bNotes = sal_True ) const;
956
										SCROW& rEndRow, sal_Bool bNotes = sal_True ) const;
957
	void			InvalidateTableArea();
957
	void			InvalidateTableArea();
958
958
959
	SC_DLLPUBLIC void			GetLastAttrCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
959
960
960
    SC_DLLPUBLIC sal_Bool			GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const;
961
    SC_DLLPUBLIC sal_Bool			GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const;
961
962
(-)sc/inc/table.hxx (+1 lines)
Lines 418-423 Link Here
418
	sal_Bool		GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
418
	sal_Bool		GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
419
								SCROW& rEndRow, sal_Bool bNotes ) const;
419
								SCROW& rEndRow, sal_Bool bNotes ) const;
420
420
421
	sal_Bool		GetLastAttrCell( SCCOL& rEndCol, SCROW& rEndRow ) const;
421
	sal_Bool		GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const;
422
	sal_Bool		GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const;
422
423
423
	void		ExtendPrintArea( OutputDevice* pDev,
424
	void		ExtendPrintArea( OutputDevice* pDev,
(-)sc/source/core/data/attarray.cxx (+19 lines)
Lines 1920-1926 Link Here
1920
    return bFound;
1920
    return bFound;
1921
}
1921
}
1922
1922
1923
sal_Bool ScAttrArray::GetLastAttr( SCROW& rLastRow, SCROW nLastData ) const
1924
{
1925
    if ( nLastData == MAXROW )
1926
    {
1927
        rLastRow = MAXROW;
1928
        return sal_True;
1929
    }
1930
	sal_Bool bFound = sal_False;
1931
    SCSIZE nEndPos = nCount - 1;
1932
    SCSIZE nStartPos = nEndPos;
1933
    while ( nStartPos > 0 && pData[nStartPos-1].nRow > nLastData &&
1934
            !pData[nStartPos].pPattern->IsVisible() )
1935
        --nStartPos;
1936
	rLastRow = pData[nStartPos].nRow;
1937
	if(nStartPos > 0 && pData[nStartPos-1].nRow > nLastData)
1938
		bFound = sal_True;
1939
    return bFound;
1940
}
1923
1941
1942
1924
sal_Bool ScAttrArray::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
1943
sal_Bool ScAttrArray::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
1925
{
1944
{
1926
	SCSIZE nIndex;
1945
	SCSIZE nIndex;
(-)sc/source/core/data/column2.cxx (+13 lines)
Lines 1564-1569 Link Here
1564
        return sal_False;
1564
        return sal_False;
1565
}
1565
}
1566
1566
1567
sal_Bool ScColumn::GetLastAttr( SCROW& rLastRow ) const
1568
{
1569
    if ( pAttrArray )
1570
    {
1571
        // Row of last cell is needed, always including notes, 0 if none.
1572
        SCROW nLastData = GetLastVisDataPos( sal_True );
1573
        return pAttrArray->GetLastAttr( rLastRow, nLastData );
1574
    }
1575
    else
1576
    {
1577
        return sal_False;
1578
    }
1579
}
1567
sal_Bool ScColumn::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
1580
sal_Bool ScColumn::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
1568
{
1581
{
1569
	if (pAttrArray)
1582
	if (pAttrArray)
(-)sc/source/core/data/documen4.cxx (+7 lines)
Lines 417-422 Link Here
417
	}
417
	}
418
}
418
}
419
419
420
void ScDocument::GetLastAttrCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const
421
{
422
	if ( ValidTab( nTab ) && pTab[nTab] )
423
	{
424
		pTab[nTab]->GetLastAttrCell( rEndCol, rEndRow );
425
	}
426
}
420
sal_Int32 ScDocument::GetMaxStringLen( SCTAB nTab, SCCOL nCol,
427
sal_Int32 ScDocument::GetMaxStringLen( SCTAB nTab, SCCOL nCol,
421
        SCROW nRowStart, SCROW nRowEnd, CharSet eCharSet ) const
428
        SCROW nRowStart, SCROW nRowEnd, CharSet eCharSet ) const
422
{
429
{
(-)sc/source/core/data/table1.cxx (+23 lines)
Lines 432-437 Link Here
432
	return bRet;
432
	return bRet;
433
}
433
}
434
434
435
sal_Bool ScTable::GetLastAttrCell( SCCOL& rEndCol, SCROW& rEndRow ) const
436
{
437
	sal_Bool bFound;
438
	SCCOL nMaxX = 0;
439
	SCROW nMaxY = 0;
440
	SCCOL i;
441
	for ( i = 0; i <= MAXCOL; i++ )
442
	{
443
		SCROW nLastRow;
444
		if ( aCol[i].GetLastAttr( nLastRow ) )
445
		{
446
			bFound = sal_True;
447
			nMaxX = i;
448
			if ( nLastRow > nMaxY )
449
				nMaxY = nLastRow;
450
		}
451
		else if( nLastRow > nMaxY && nLastRow > 0 && nLastRow <= MAXROW) //save_perf
452
			nMaxY = nLastRow;
453
	}
454
	rEndCol = nMaxX;
455
	rEndRow = nMaxY;
456
	return bFound;
457
}
435
/*		vorher:
458
/*		vorher:
436
459
437
	sal_Bool bFound = sal_False;
460
	sal_Bool bFound = sal_False;
(-)sc/source/filter/excel/xetable.cxx (+10 lines)
Lines 2358-2363 Link Here
2358
    // range for cell iterator
2358
    // range for cell iterator
2359
    SCCOL nLastIterScCol = nMaxScCol;
2359
    SCCOL nLastIterScCol = nMaxScCol;
2360
    SCROW nLastIterScRow = ulimit_cast< SCROW >( nLastUsedScRow + 128, nMaxScRow );
2360
    SCROW nLastIterScRow = ulimit_cast< SCROW >( nLastUsedScRow + 128, nMaxScRow );
2361
	// modified for 119707 by zhanglu
2362
	SCCOL rEndColAtt;
2363
	SCROW rEndRowAtt = -1;
2364
	rDoc.GetLastAttrCellArea( nScTab, rEndColAtt,rEndRowAtt );
2365
	if( rEndRowAtt > nLastIterScRow )
2366
		nLastIterScRow = rEndRowAtt;
2367
2368
	if (nLastIterScRow > nMaxScRow)
2369
		nLastIterScRow = nMaxScRow;
2370
	// modified for 119707 end
2361
    ScUsedAreaIterator aIt( &rDoc, nScTab, 0, 0, nLastIterScCol, nLastIterScRow );
2371
    ScUsedAreaIterator aIt( &rDoc, nScTab, 0, 0, nLastIterScCol, nLastIterScRow );
2362
2372
2363
    // activate the correct segment and sub segment at the progress bar
2373
    // activate the correct segment and sub segment at the progress bar

Return to issue 119707