Kaydet (Commit) 2b70c47a authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Rename ScColumn::Resize() to ReserveSize().

The new name is more aligned with what it actually does.

Change-Id: I703e20253fe5957c775026d8d08f2906f2d7889c
üst 87d46d5b
...@@ -121,7 +121,7 @@ public: ...@@ -121,7 +121,7 @@ public:
void Delete( SCROW nRow ); void Delete( SCROW nRow );
void DeleteAtIndex( SCSIZE nIndex ); void DeleteAtIndex( SCSIZE nIndex );
void FreeAll(); void FreeAll();
void Resize( SCSIZE nSize ); void ReserveSize( SCSIZE nSize );
void SwapRow( SCROW nRow1, SCROW nRow2 ); void SwapRow( SCROW nRow1, SCROW nRow2 );
void SwapCell( SCROW nRow, ScColumn& rCol); void SwapCell( SCROW nRow, ScColumn& rCol);
......
...@@ -760,8 +760,7 @@ ScBaseCell* ScColumn::GetCell( SCROW nRow ) const ...@@ -760,8 +760,7 @@ ScBaseCell* ScColumn::GetCell( SCROW nRow ) const
return NULL; return NULL;
} }
void ScColumn::ReserveSize( SCSIZE nSize )
void ScColumn::Resize( SCSIZE nSize )
{ {
if (nSize > sal::static_int_cast<SCSIZE>(MAXROWCOUNT)) if (nSize > sal::static_int_cast<SCSIZE>(MAXROWCOUNT))
nSize = MAXROWCOUNT; nSize = MAXROWCOUNT;
...@@ -1178,7 +1177,7 @@ void ScColumn::CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, bool bKee ...@@ -1178,7 +1177,7 @@ void ScColumn::CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, bool bKee
if (nBlockCount) if (nBlockCount)
{ {
rColumn.Resize( rColumn.GetCellCount() + nBlockCount ); rColumn.ReserveSize(rColumn.GetCellCount() + nBlockCount);
ScAddress aOwnPos( nCol, 0, nTab ); ScAddress aOwnPos( nCol, 0, nTab );
ScAddress aDestPos( rColumn.nCol, 0, rColumn.nTab ); ScAddress aDestPos( rColumn.nCol, 0, rColumn.nTab );
for (i = nStartIndex; i <= nEndIndex; i++) for (i = nStartIndex; i <= nEndIndex; i++)
...@@ -1368,7 +1367,7 @@ void ScColumn::CopyToColumn( ...@@ -1368,7 +1367,7 @@ void ScColumn::CopyToColumn(
if (nBlockCount) if (nBlockCount)
{ {
rColumn.Resize( rColumn.GetCellCount() + nBlockCount ); rColumn.ReserveSize(rColumn.GetCellCount() + nBlockCount);
ScAddress aDestPos( rColumn.nCol, 0, rColumn.nTab ); ScAddress aDestPos( rColumn.nCol, 0, rColumn.nTab );
for (i = nStartIndex; i <= nEndIndex; i++) for (i = nStartIndex; i <= nEndIndex; i++)
{ {
......
...@@ -681,7 +681,7 @@ void ScColumn::CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy, ...@@ -681,7 +681,7 @@ void ScColumn::CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy,
//! IDF_ALL muss immer mehr Flags enthalten, als bei "Inhalte Einfuegen" //! IDF_ALL muss immer mehr Flags enthalten, als bei "Inhalte Einfuegen"
//! einzeln ausgewaehlt werden koennen! //! 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 ScAddress aDestPos( nCol, 0, nTab ); // Row wird angepasst
...@@ -715,8 +715,7 @@ void ScColumn::CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy, ...@@ -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 //! Always do the Resize from the outside, where the number of repetitions is known
//! (then it can be removed here) //! (then it can be removed here)
SCSIZE nNew = maItems.size() + nColCount; ReserveSize(maItems.size() + nColCount);
Resize( nNew );
} }
sal_Bool bAtEnd = false; sal_Bool bAtEnd = false;
......
...@@ -1868,7 +1868,7 @@ void ScTable::CopyPrintRange(const ScTable& rTable) ...@@ -1868,7 +1868,7 @@ void ScTable::CopyPrintRange(const ScTable& rTable)
void ScTable::DoColResize( SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd ) void ScTable::DoColResize( SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd )
{ {
for (SCCOL nCol=nCol1; nCol<=nCol2; nCol++) 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 ) void ScTable::SetRepeatColRange( const ScRange* pNew )
......
...@@ -694,7 +694,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ...@@ -694,7 +694,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nInc,nMinDigits, pListData,nListIndex); nInc,nMinDigits, pListData,nListIndex);
if (bVertical) if (bVertical)
aCol[nCol].Resize( aCol[nCol].GetCellCount() + nFillCount ); aCol[nCol].ReserveSize(aCol[nCol].GetCellCount() + nFillCount);
if (pListData) if (pListData)
{ {
...@@ -1389,7 +1389,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ...@@ -1389,7 +1389,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
ScBaseCell* pSrcCell = aCol[nCol].GetCell(static_cast<SCROW>(nRow)); ScBaseCell* pSrcCell = aCol[nCol].GetCell(static_cast<SCROW>(nRow));
if (bVertical && bAttribs) if (bVertical && bAttribs)
aCol[nCol].Resize( aCol[nCol].GetCellCount() + nFillCount ); aCol[nCol].ReserveSize(aCol[nCol].GetCellCount() + nFillCount);
if (bAttribs) if (bAttribs)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment