sc/inc/column.hxx | 2 +- sc/inc/document.hxx | 2 +- sc/inc/table.hxx | 2 +- sc/source/core/data/column.cxx | 2 +- sc/source/core/data/document.cxx | 13 +++++++------ sc/source/core/data/table2.cxx | 4 ++-- 6 files changed, 13 insertions(+), 12 deletions(-)
New commits: commit 601e4fe908cb10948b0a86a37877e606af5f5dbf Author: Kohei Yoshida <[email protected]> Date: Mon Nov 17 13:45:35 2014 -0500 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 diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 654e08b..57ff8aa 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -351,7 +351,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 72b49a8..a09581b 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1257,7 +1257,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 5a6f015..daacd60 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 9eb2358..381307d 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -3044,7 +3044,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 8e55be7..9487826 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 1d3bad4..8a27333 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( _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
