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			GetLastAttrCell( 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
	void		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 (+24 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
	
1937
	if(nStartPos >= 0 && pData[nStartPos].nRow > nLastData)
1938
	{
1939
		bFound = sal_True;
1940
		rLastRow = pData[nStartPos].nRow;
1941
	}
1942
	else
1943
		rLastRow = nLastData;
1944
    return bFound;
1945
}
1923
1946
1947
1924
sal_Bool ScAttrArray::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
1948
sal_Bool ScAttrArray::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
1925
{
1949
{
1926
	SCSIZE nIndex;
1950
	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 (+8 lines)
Lines 417-422 Link Here
417
	}
417
	}
418
}
418
}
419
419
420
void ScDocument::GetLastAttrCell( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const
421
{
422
	if ( ValidTab( nTab ) && pTab[nTab] )
423
	{
424
		pTab[nTab]->GetLastAttrCell( rEndCol, rEndRow );
425
	}
426
}
427
420
sal_Int32 ScDocument::GetMaxStringLen( SCTAB nTab, SCCOL nCol,
428
sal_Int32 ScDocument::GetMaxStringLen( SCTAB nTab, SCCOL nCol,
421
        SCROW nRowStart, SCROW nRowEnd, CharSet eCharSet ) const
429
        SCROW nRowStart, SCROW nRowEnd, CharSet eCharSet ) const
422
{
430
{
(-)sc/source/core/data/table1.cxx (+25 lines)
Lines 432-437 Link Here
432
	return bRet;
432
	return bRet;
433
}
433
}
434
434
435
void ScTable::GetLastAttrCell( SCCOL& rEndCol, SCROW& rEndRow ) const
436
{
437
	SCCOL nMaxX = 0;
438
	SCROW nMaxY = 0;
439
	SCCOL i;
440
	for ( i = 0; i <= MAXCOL; i++ )
441
	{
442
		SCROW nLastRow;
443
		if ( aCol[i].GetLastAttr( nLastRow ) )
444
		{	
445
			if ( nLastRow > nMaxY )
446
			{
447
				nMaxY = nLastRow;
448
				nMaxX = i;
449
			}
450
		}
451
		else if( nLastRow > nMaxY && nLastRow > 0 && nLastRow <= MAXROW)
452
		{
453
			nMaxY = nLastRow;
454
			nMaxX = i;
455
		}
456
	}
457
	rEndCol = nMaxX;
458
	rEndRow = nMaxY;
459
}
435
/*		vorher:
460
/*		vorher:
436
461
437
	sal_Bool bFound = sal_False;
462
	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 = 0;
2363
	SCROW rEndRowAtt = 0;
2364
	rDoc.GetLastAttrCell( 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