summaryrefslogtreecommitdiff
path: root/sc/source/core/data/table3.cxx
diff options
context:
space:
mode:
authorLaurent Godard <lgodard.libre@laposte.net>2013-09-11 09:06:24 +0200
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-10-23 10:44:20 -0400
commit759bdbbc348d320994813a9de1a7927b795580a3 (patch)
tree897cb53c217866ce6b365f76943390e3e6368529 /sc/source/core/data/table3.cxx
parentae88290f87acf693fed02140ca384ec15589616b (diff)
Re-implement cell note storage using mdds::multi_type_vector.
Change-Id: I34ea91e360e2a6b85d65f970c6e43db687d213ca
Diffstat (limited to 'sc/source/core/data/table3.cxx')
-rw-r--r--sc/source/core/data/table3.cxx85
1 files changed, 2 insertions, 83 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 73a514b87a16..a79add4ae65d 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -559,44 +559,6 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2)
}
}
}
-
- ScNotes aNoteMap(pDocument);
- ScNotes::iterator itr = maNotes.begin();
- while(itr != maNotes.end())
- {
- SCCOL nCol = itr->first.first;
- SCROW nRow = itr->first.second;
- ScPostIt* pPostIt = itr->second;
- ++itr;
-
- if(nRow >= nRowStart && nRow <= nRowEnd)
- {
- if (nCol == nCol1)
- {
- aNoteMap.insert(nCol2, nRow, pPostIt);
- maNotes.ReleaseNote(nCol, nRow);
- }
- else if (nCol == nCol2)
- {
- aNoteMap.insert(nCol1, nRow, pPostIt);
- maNotes.ReleaseNote(nCol, nRow);
-
- }
- }
- }
-
- itr = aNoteMap.begin();
- while(itr != aNoteMap.end())
- {
- //we can here assume that there is no note in the target location
- SCCOL nCol = itr->first.first;
- SCROW nRow = itr->first.second;
- ScPostIt* pPostIt = itr->second;
- ++itr;
-
- maNotes.insert(nCol, nRow, pPostIt);
- aNoteMap.ReleaseNote(nCol, nRow);
- }
}
void ScTable::SwapRow(SCROW nRow1, SCROW nRow2)
@@ -631,43 +593,6 @@ void ScTable::SwapRow(SCROW nRow1, SCROW nRow2)
SetRowFiltered(nRow1, nRow1, bRow2Filtered);
SetRowFiltered(nRow2, nRow2, bRow1Filtered);
}
-
- ScNotes aNoteMap(pDocument);
- ScNotes::iterator itr = maNotes.begin();
- while(itr != maNotes.end())
- {
- SCCOL nCol = itr->first.first;
- SCROW nRow = itr->first.second;
- ScPostIt* pPostIt = itr->second;
- ++itr;
-
- if( nCol >= nColStart && nCol <= nColEnd )
- {
- if (nRow == nRow1)
- {
- aNoteMap.insert(nCol, nRow2, pPostIt);
- maNotes.ReleaseNote(nCol, nRow);
- }
- else if (nRow == nRow2)
- {
- aNoteMap.insert(nCol, nRow1, pPostIt);
- maNotes.ReleaseNote(nCol, nRow);
- }
- }
- }
-
- itr = aNoteMap.begin();
- while(itr != aNoteMap.end())
- {
- //we can here assume that there is no note in the target location
- SCCOL nCol = itr->first.first;
- SCROW nRow = itr->first.second;
- ScPostIt* pPostIt = itr->second;
- ++itr;
-
- maNotes.insert(nCol, nRow, pPostIt);
- aNoteMap.ReleaseNote(nCol, nRow);
- }
}
short ScTable::Compare(SCCOLROW nIndex1, SCCOLROW nIndex2) const
@@ -743,8 +668,7 @@ void ScTable::Sort(const ScSortParam& rSortParam, bool bKeepQuery, ScProgress* p
QuickSort( pArray, nRow1, nLastRow );
SortReorder( pArray, pProgress );
delete pArray;
- // #i59745# update position of caption objects of cell notes
- ScNoteUtil::UpdateCaptionPositions( *pDocument, ScRange( aSortParam.nCol1, nRow1, nTab, aSortParam.nCol2, nLastRow, nTab ) );
+ // #i59745# update position of caption objects of cell notes --> reported at (SortReorder) ScColumn::SwapCellNotes level
}
}
else
@@ -764,8 +688,7 @@ void ScTable::Sort(const ScSortParam& rSortParam, bool bKeepQuery, ScProgress* p
QuickSort( pArray, nCol1, nLastCol );
SortReorder( pArray, pProgress );
delete pArray;
- // #i59745# update position of caption objects of cell notes
- ScNoteUtil::UpdateCaptionPositions( *pDocument, ScRange( nCol1, aSortParam.nRow1, nTab, nLastCol, aSortParam.nRow2, nTab ) );
+ // #i59745# update position of caption objects of cell notes --> reported at (SortReorder) ScColumn::SwapCellNotes level
}
}
DestroySortCollator();
@@ -1924,10 +1847,6 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, bool bKeepSub)
aParam.nDestCol, aParam.nDestRow, aParam.nDestTab );
}
-
- if (aParam.bInplace)
- InitializeNoteCaptions();
-
SCROW nRealRow2 = aParam.nRow2;
for (SCROW j = aParam.nRow1 + nHeader; j <= nRealRow2; ++j)
{