diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-23 21:07:14 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-23 21:08:27 -0400 |
commit | bff954c0c4e5f9acf18bfd9ae796bc5a937b7ff6 (patch) | |
tree | cdf1a323067b42c1dd04371f33dafef068acab28 /sc | |
parent | dec7179d9396263c99882128208e895b1b603564 (diff) |
Now these two methods are unused.
Chuck 'em.
Change-Id: Ifdf504c64e63e8e437abdcadd14f668d2c577555
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/column.hxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/column2.cxx | 106 |
2 files changed, 0 insertions, 110 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 4bbdb635ca62..80d91893693c 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -608,10 +608,6 @@ private: void CellStorageModified(); void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol) const; - void SwapCellTextAttrs( SCROW nRow1, SCROW nRow2 ); - - // cell notes - void SwapCellNotes( SCROW nRow1, SCROW nRow2 ); void DeleteCells( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, sal_uInt16 nDelFlag, diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 521b53861b07..151f6b01276c 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -1678,112 +1678,6 @@ void ScColumn::DuplicateNotes(SCROW nStartRow, size_t nDataSize, ScColumn& rDest maDestBlockPos.miCellNotePos = rDestCol.maCellNotes.begin(); } -void ScColumn::SwapCellTextAttrs( SCROW nRow1, SCROW nRow2 ) -{ - if (nRow1 == nRow2) - return; - - if (nRow1 > nRow2) - std::swap(nRow1, nRow2); - - sc::CellTextAttrStoreType::position_type aPos1 = maCellTextAttrs.position(nRow1); - if (aPos1.first == maCellTextAttrs.end()) - return; - - sc::CellTextAttrStoreType::position_type aPos2 = maCellTextAttrs.position(aPos1.first, nRow2); - if (aPos2.first == maCellTextAttrs.end()) - return; - - sc::CellTextAttrStoreType::iterator it1 = aPos1.first, it2 = aPos2.first; - if (it1->type == it2->type) - { - if (it1->type == sc::element_type_empty) - // Both are empty. Nothing to swap. - return; - - // Both are non-empty. Simply swap their values. - std::swap( - sc::celltextattr_block::at(*it1->data, aPos1.second), - sc::celltextattr_block::at(*it2->data, aPos2.second)); - - return; - } - - // One is empty while the other isn't. - if (it1->type == sc::element_type_empty) - { - // row 1 is empty while row 2 is non-empty. - const sc::CellTextAttr& rVal2 = sc::celltextattr_block::at(*it2->data, aPos2.second); - it1 = maCellTextAttrs.set(it1, nRow1, rVal2); - maCellTextAttrs.set_empty(it1, nRow2, nRow2); - return; - } - - // row 1 is non-empty while row 2 is empty. - sc::CellTextAttr aVal1 = sc::celltextattr_block::at(*it1->data, aPos1.second); // make a copy. - it1 = maCellTextAttrs.set_empty(it1, nRow1, nRow1); - maCellTextAttrs.set(it1, nRow2, aVal1); - - CellStorageModified(); -} - -void ScColumn::SwapCellNotes( SCROW nRow1, SCROW nRow2 ) -{ - if (nRow1 == nRow2) - return; - - if (nRow1 > nRow2) - std::swap(nRow1, nRow2); - - sc::CellNoteStoreType::position_type aPos1 = maCellNotes.position(nRow1); - if (aPos1.first == maCellNotes.end()) - return; - - sc::CellNoteStoreType::position_type aPos2 = maCellNotes.position(aPos1.first, nRow2); - if (aPos2.first == maCellNotes.end()) - return; - - sc::CellNoteStoreType::iterator it1 = aPos1.first, it2 = aPos2.first; - if (it1->type == it2->type) - { - if (it1->type == sc::element_type_empty) - // Both are empty. Nothing to swap. - return; - - // Both are non-empty. Simply swap their values. - std::swap( - sc::cellnote_block::at(*it1->data, aPos1.second), - sc::cellnote_block::at(*it2->data, aPos2.second)); - - //update Note caption with position - ScPostIt* pNote = sc::cellnote_block::at(*it1->data, aPos1.second); - pNote->UpdateCaptionPos(ScAddress(nCol,nRow2,nTab)); - pNote = sc::cellnote_block::at(*it2->data, aPos2.second); - pNote->UpdateCaptionPos(ScAddress(nCol,nRow1,nTab)); - - return; - } - - // One is empty while the other isn't. - if (it1->type == sc::element_type_empty) - { - // row 1 is empty while row 2 is non-empty. - ScPostIt* pVal2 = sc::cellnote_block::at(*it2->data, aPos2.second); - it1 = maCellNotes.set(it1, nRow1, pVal2); - maCellNotes.release(it1, nRow2, pVal2); - pVal2->UpdateCaptionPos(ScAddress(nCol,nRow1,nTab)); //update Note caption with position - - return; - } - - // row 1 is non-empty while row 2 is empty. - ScPostIt* pVal1 = NULL; - it1 = maCellNotes.release(it1, nRow1, pVal1); - assert(pVal1); - maCellNotes.set(it1, nRow2, pVal1); - pVal1->UpdateCaptionPos(ScAddress(nCol,nRow1,nTab)); //update Note caption with position -} - SvtBroadcaster* ScColumn::GetBroadcaster(SCROW nRow) { return maBroadcasters.get<SvtBroadcaster*>(nRow); |