diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-11-06 14:00:54 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-02-06 10:50:32 -0500 |
commit | 2b70c47a37f33819cff0e42d00c37cfaea0461ec (patch) | |
tree | 74f590bf33095e8d7cbfe3b004fa6a380c79d055 /sc | |
parent | 87d46d5b420744b0a9d9724188d9526c423b8dd3 (diff) |
Rename ScColumn::Resize() to ReserveSize().
The new name is more aligned with what it actually does.
Change-Id: I703e20253fe5957c775026d8d08f2906f2d7889c
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/column.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/column.cxx | 7 | ||||
-rw-r--r-- | sc/source/core/data/column3.cxx | 5 | ||||
-rw-r--r-- | sc/source/core/data/table1.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/table4.cxx | 4 |
5 files changed, 9 insertions, 11 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index f6dff3bec784..9ed577ecb1cf 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -121,7 +121,7 @@ public: void Delete( SCROW nRow ); void DeleteAtIndex( SCSIZE nIndex ); void FreeAll(); - void Resize( SCSIZE nSize ); + void ReserveSize( SCSIZE nSize ); void SwapRow( SCROW nRow1, SCROW nRow2 ); void SwapCell( SCROW nRow, ScColumn& rCol); diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index f29dc2dc4fa3..d8037556fce8 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -760,8 +760,7 @@ ScBaseCell* ScColumn::GetCell( SCROW nRow ) const return NULL; } - -void ScColumn::Resize( SCSIZE nSize ) +void ScColumn::ReserveSize( SCSIZE nSize ) { if (nSize > sal::static_int_cast<SCSIZE>(MAXROWCOUNT)) nSize = MAXROWCOUNT; @@ -1178,7 +1177,7 @@ void ScColumn::CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, bool bKee if (nBlockCount) { - rColumn.Resize( rColumn.GetCellCount() + nBlockCount ); + rColumn.ReserveSize(rColumn.GetCellCount() + nBlockCount); ScAddress aOwnPos( nCol, 0, nTab ); ScAddress aDestPos( rColumn.nCol, 0, rColumn.nTab ); for (i = nStartIndex; i <= nEndIndex; i++) @@ -1368,7 +1367,7 @@ void ScColumn::CopyToColumn( if (nBlockCount) { - rColumn.Resize( rColumn.GetCellCount() + nBlockCount ); + rColumn.ReserveSize(rColumn.GetCellCount() + nBlockCount); ScAddress aDestPos( rColumn.nCol, 0, rColumn.nTab ); for (i = nStartIndex; i <= nEndIndex; i++) { diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 1e0ce3c51653..043cec9f9d15 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -681,7 +681,7 @@ void ScColumn::CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy, //! IDF_ALL muss immer mehr Flags enthalten, als bei "Inhalte Einfuegen" //! einzeln ausgewaehlt werden koennen! - Resize( maItems.size() + static_cast<SCSIZE>(nRow2-nRow1+1) ); + ReserveSize(maItems.size() + static_cast<SCSIZE>(nRow2-nRow1+1)); ScAddress aDestPos( nCol, 0, nTab ); // Row wird angepasst @@ -715,8 +715,7 @@ void ScColumn::CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy, //! Always do the Resize from the outside, where the number of repetitions is known //! (then it can be removed here) - SCSIZE nNew = maItems.size() + nColCount; - Resize( nNew ); + ReserveSize(maItems.size() + nColCount); } sal_Bool bAtEnd = false; diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index a04dece0255b..446686eeca5c 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -1868,7 +1868,7 @@ void ScTable::CopyPrintRange(const ScTable& rTable) void ScTable::DoColResize( SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd ) { for (SCCOL nCol=nCol1; nCol<=nCol2; nCol++) - aCol[nCol].Resize(aCol[nCol].GetCellCount() + nAdd); + aCol[nCol].ReserveSize(aCol[nCol].GetCellCount() + nAdd); } void ScTable::SetRepeatColRange( const ScRange* pNew ) diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 00aa1c3d3cac..38adeb830698 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -694,7 +694,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, nInc,nMinDigits, pListData,nListIndex); if (bVertical) - aCol[nCol].Resize( aCol[nCol].GetCellCount() + nFillCount ); + aCol[nCol].ReserveSize(aCol[nCol].GetCellCount() + nFillCount); if (pListData) { @@ -1389,7 +1389,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScBaseCell* pSrcCell = aCol[nCol].GetCell(static_cast<SCROW>(nRow)); if (bVertical && bAttribs) - aCol[nCol].Resize( aCol[nCol].GetCellCount() + nFillCount ); + aCol[nCol].ReserveSize(aCol[nCol].GetCellCount() + nFillCount); if (bAttribs) { |