From b1d4a2ae3d1b461bc52768ed62f354558596fa39 Mon Sep 17 00:00:00 2001
From: Eike Rathke <erack@redhat.com>
Date: Tue, 9 Dec 2014 14:48:36 +0100
Subject: introduce BroadcastBroadcasters() to speedup BroadcastCells()

Iterating over a range and attempting to get a broadcaster for each cell
position is a performance bottle neck. Take advantage of the column's
existing maBroadcasters structure instead.

Change-Id: I5467a64ee3c0b5f430be1f0c4b940d3f71874827
---
 sc/inc/table.hxx | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'sc/inc/table.hxx')

diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 7661fdace7a7..89a9a495b2d2 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -112,6 +112,7 @@ struct ScColWidthParam;
 class ScRangeName;
 class ScDBData;
 class ScDocumentImport;
+class ScHint;
 
 class ScTable : boost::noncopyable
 {
@@ -541,6 +542,13 @@ public:
     void CompileAll( sc::CompileFormulaContext& rCxt );
     void CompileXML( sc::CompileFormulaContext& rCxt, ScProgress& rProgress );
 
+    /** Broadcast single broadcasters in range, without explicitly setting
+        anything dirty, not doing area broadcasts.
+        @param rHint address is modified to adapt to the actual broadcasted
+                position on each iteration and upon return points to the last
+                position broadcasted. */
+    bool BroadcastBroadcasters( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScHint& rHint );
+
     bool CompileErrorCells( sc::CompileFormulaContext& rCxt, sal_uInt16 nErrCode );
 
     void UpdateReference(
-- 
cgit