summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-11-17 13:45:35 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-11-17 13:45:35 -0500
commit601e4fe908cb10948b0a86a37877e606af5f5dbf (patch)
tree397f439ac255a50350b01ebde688f7a646203df9
parentAvoid area listeners and such during formula cell paste replication. (diff)
downloadcore-601e4fe908cb10948b0a86a37877e606af5f5dbf.tar.gz
core-601e4fe908cb10948b0a86a37877e606af5f5dbf.zip
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.hxx2
-rw-r--r--sc/inc/document.hxx2
-rw-r--r--sc/inc/table.hxx2
-rw-r--r--sc/source/core/data/column.cxx2
-rw-r--r--sc/source/core/data/document.cxx13
-rw-r--r--sc/source/core/data/table2.cxx4
6 files changed, 13 insertions, 12 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 654e08bc4611..57ff8aa34a7a 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 72b49a830c86..a09581b9f064 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 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 9eb2358dcb54..381307dc3050 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 8e55be73447b..948782676c71 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 1d3bad4cc437..8a27333ba240 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(