Kaydet (Commit) 3f41b12c authored tarafından Kohei Yoshida's avatar Kohei Yoshida

SwapRow() is no more!

Good riddance.  It was optimized for the old cell storage.

Change-Id: I374194fe211d5b13dd60dbb68b9511a366fb32bd
üst bd532483
...@@ -186,7 +186,6 @@ public: ...@@ -186,7 +186,6 @@ public:
void Delete( SCROW nRow ); void Delete( SCROW nRow );
void FreeAll(); void FreeAll();
void SwapRow( SCROW nRow1, SCROW nRow2 );
void SwapCell( SCROW nRow, ScColumn& rCol); void SwapCell( SCROW nRow, ScColumn& rCol);
bool HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const; bool HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const;
......
...@@ -1007,7 +1007,6 @@ private: ...@@ -1007,7 +1007,6 @@ private:
bool IsSorted(SCCOLROW nStart, SCCOLROW nEnd) const; bool IsSorted(SCCOLROW nStart, SCCOLROW nEnd) const;
void DecoladeRow( ScSortInfoArray*, SCROW nRow1, SCROW nRow2 ); void DecoladeRow( ScSortInfoArray*, SCROW nRow1, SCROW nRow2 );
void SwapCol(SCCOL nCol1, SCCOL nCol2); void SwapCol(SCCOL nCol1, SCCOL nCol2);
void SwapRow(SCROW nRow1, SCROW nRow2);
short CompareCell( short CompareCell(
sal_uInt16 nSort, sal_uInt16 nSort,
ScRefCellValue& rCell1, SCCOL nCell1Col, SCROW nCell1Row, ScRefCellValue& rCell1, SCCOL nCell1Col, SCROW nCell1Row,
......
This diff is collapsed.
...@@ -935,40 +935,6 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2) ...@@ -935,40 +935,6 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2)
} }
} }
void ScTable::SwapRow(SCROW nRow1, SCROW nRow2)
{
SCCOL nColStart = aSortParam.nCol1;
SCCOL nColEnd = aSortParam.nCol2;
for (SCCOL nCol = nColStart; nCol <= nColEnd; nCol++)
{
aCol[nCol].SwapRow(nRow1, nRow2);
if (aSortParam.bIncludePattern)
{
const ScPatternAttr* pPat1 = GetPattern(nCol, nRow1);
const ScPatternAttr* pPat2 = GetPattern(nCol, nRow2);
if (pPat1 != pPat2)
{
pDocument->GetPool()->Put(*pPat1);
SetPattern(nCol, nRow1, *pPat2, true);
SetPattern(nCol, nRow2, *pPat1, true);
pDocument->GetPool()->Remove(*pPat1);
}
}
}
if (bGlobalKeepQuery)
{
bool bRow1Hidden = RowHidden(nRow1);
bool bRow2Hidden = RowHidden(nRow2);
SetRowHidden(nRow1, nRow1, bRow2Hidden);
SetRowHidden(nRow2, nRow2, bRow1Hidden);
bool bRow1Filtered = RowFiltered(nRow1);
bool bRow2Filtered = RowFiltered(nRow2);
SetRowFiltered(nRow1, nRow1, bRow2Filtered);
SetRowFiltered(nRow2, nRow2, bRow1Filtered);
}
}
short ScTable::Compare(SCCOLROW nIndex1, SCCOLROW nIndex2) const short ScTable::Compare(SCCOLROW nIndex1, SCCOLROW nIndex2) const
{ {
short nRes; short nRes;
......
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