diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-11-17 13:45:35 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-11-18 08:31:56 -0500 |
commit | de0b80aaaf1a01ee6106e7e63ef3d8e32a164f24 (patch) | |
tree | 73a79ace48af8dde0ab968b2bbf83092939be8d0 | |
parent | 550f0797e64e38a4ef5721857f5057f692680118 (diff) |
Rename methods whose name no longer represent what they do.
We now do all broadcasting at the end of CopyFromClip, and nowhere else
during pasting from clip.
Change-Id: I1cb2c529f127d6e4080e49e4827f048ce5a19f95
-rw-r--r-- | sc/inc/column.hxx | 2 | ||||
-rw-r--r-- | sc/inc/document.hxx | 2 | ||||
-rw-r--r-- | sc/inc/table.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/column.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/document.cxx | 13 | ||||
-rw-r--r-- | sc/source/core/data/table2.cxx | 4 |
6 files changed, 13 insertions, 12 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 2f29441dc440..9dfdbb26f787 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -349,7 +349,7 @@ public: bool IsFormulaDirty( SCROW nRow ) const; void SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt ); - void BroadcastInArea( SCROW nRow1, SCROW nRow2, sc::ColumnSpanSet& rBroadcastSpans ); + void SetDirtyFromClip( SCROW nRow1, SCROW nRow2, sc::ColumnSpanSet& rBroadcastSpans ); void SetDirty( SCROW nRow1, SCROW nRow2 ); void SetDirtyVar(); void SetDirtyAfterLoad(); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index f766f5497e4a..a094bc242425 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1258,7 +1258,7 @@ public: SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark, InsertDeleteFlags nInsFlag ); - void BroadcastFromClip( + void SetDirtyFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark, InsertDeleteFlags nInsFlag, sc::ColumnSpanSet& rBroadcastSpans ); diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 5a6f015c6280..daacd60dd96a 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -438,7 +438,7 @@ public: void StartListeningInArea( sc::StartListeningContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); - void BroadcastInArea( + void SetDirtyFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sc::ColumnSpanSet& rBroadcastSpans ); void CopyToTable( diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 86faef861db9..a01913938aa2 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -3018,7 +3018,7 @@ void ScColumn::SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt ) sc::ProcessFormula(maCells, aFunc); } -void ScColumn::BroadcastInArea( SCROW nRow1, SCROW nRow2, sc::ColumnSpanSet& rBroadcastSpans ) +void ScColumn::SetDirtyFromClip( SCROW nRow1, SCROW nRow2, sc::ColumnSpanSet& rBroadcastSpans ) { // Set all formula cells in the range dirty, and pick up all non-formula // cells for later broadcasting. We don't broadcast here. diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 8b5821719008..bca55c0590f7 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -2429,18 +2429,17 @@ void ScDocument::StartListeningFromClip( SCCOL nCol1, SCROW nRow1, } } -void ScDocument::BroadcastFromClip( +void ScDocument::SetDirtyFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark, InsertDeleteFlags nInsFlag, sc::ColumnSpanSet& rBroadcastSpans ) { if (nInsFlag & IDF_CONTENTS) { - ScBulkBroadcast aBulkBroadcast( GetBASM()); SCTAB nMax = static_cast<SCTAB>(maTabs.size()); ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); for (; itr != itrEnd && *itr < nMax; ++itr) if (maTabs[*itr]) - maTabs[*itr]->BroadcastInArea(nCol1, nRow1, nCol2, nRow2, rBroadcastSpans); + maTabs[*itr]->SetDirtyFromClip(nCol1, nRow1, nCol2, nRow2, rBroadcastSpans); } } @@ -2815,8 +2814,10 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar // Listener aufbauen nachdem alles inserted wurde StartListeningFromClip( nAllCol1, nAllRow1, nAllCol2, nAllRow2, rMark, nInsFlag ); - // nachdem alle Listener aufgebaut wurden, kann gebroadcastet werden - BroadcastFromClip(nAllCol1, nAllRow1, nAllCol2, nAllRow2, rMark, nInsFlag, aBroadcastSpans); + + // Set all formula cells dirty, and collect non-empty non-formula cell + // positions so that we can broadcast on them below. + SetDirtyFromClip(nAllCol1, nAllRow1, nAllCol2, nAllRow2, rMark, nInsFlag, aBroadcastSpans); { ScBulkBroadcast aBulkBroadcast( GetBASM()); @@ -2901,7 +2902,7 @@ void ScDocument::CopyMultiRangeFromClip( StartListeningFromClip(aDestRange.aStart.Col(), aDestRange.aStart.Row(), aDestRange.aEnd.Col(), aDestRange.aEnd.Row(), rMark, nInsFlag ); // nachdem alle Listener aufgebaut wurden, kann gebroadcastet werden - BroadcastFromClip( + SetDirtyFromClip( aDestRange.aStart.Col(), aDestRange.aStart.Row(), aDestRange.aEnd.Col(), aDestRange.aEnd.Row(), rMark, nInsFlag, aBroadcastSpans); diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index c46977e39f0d..66db45d72794 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1049,14 +1049,14 @@ void ScTable::StartNeededListeners() aCol[i].StartNeededListeners(); } -void ScTable::BroadcastInArea( +void ScTable::SetDirtyFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sc::ColumnSpanSet& rBroadcastSpans ) { if (nCol2 > MAXCOL) nCol2 = MAXCOL; if (nRow2 > MAXROW) nRow2 = MAXROW; if (ValidColRow(nCol1, nRow1) && ValidColRow(nCol2, nRow2)) for (SCCOL i = nCol1; i <= nCol2; i++) - aCol[i].BroadcastInArea(nRow1, nRow2, rBroadcastSpans); + aCol[i].SetDirtyFromClip(nRow1, nRow2, rBroadcastSpans); } void ScTable::StartListeningInArea( |