summaryrefslogtreecommitdiff
path: root/sc/source/core/data/table2.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-05-20 11:12:49 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-05-20 20:19:28 -0400
commitd5b4cb00bedd08ad72885defbc35c971b573ecd8 (patch)
tree42f0bd375c5f1b23120359b140b8cfbfecb220b1 /sc/source/core/data/table2.cxx
parentfc470416281b92e6b481885b64d59bc01ea4c3a6 (diff)
Keep track of column block positions when mass-pasting formula cells.
This speeds up the following scenario: 1) type =B1 in A1. Leave A2 empty. 2) Select A1:A2 and Ctrl-C to copy. 3) Select A3:A50000 (or longer if you so wish), and ctrl-V to paste. This causes the broadcaster storage array in column B to be heavily partitioned due to the empty cells interspersed between formula cells in column A. Without tracking the column position this would cause a O(n^2) complexity algorithm. Change-Id: Ic2f23c2c2bea3353c517faa73fe5412c7528bd95
Diffstat (limited to 'sc/source/core/data/table2.cxx')
-rw-r--r--sc/source/core/data/table2.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 51801afb0f65..0f5d458a38b2 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1010,14 +1010,14 @@ void ScTable::BroadcastInArea( SCCOL nCol1, SCROW nRow1,
}
-void ScTable::StartListeningInArea( SCCOL nCol1, SCROW nRow1,
- SCCOL nCol2, SCROW nRow2 )
+void ScTable::StartListeningInArea(
+ sc::StartListeningContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
{
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].StartListeningInArea( nRow1, nRow2 );
+ aCol[i].StartListeningInArea(rCxt, nRow1, nRow2);
}