diff options
author | Eike Rathke <erack@redhat.com> | 2014-12-03 20:41:33 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-12-03 23:57:08 +0100 |
commit | 99270aefbfbec2f759f1f96e8777f76bc113dabc (patch) | |
tree | 1157f451026bf4e1357eda6381de0694f2b22b86 /sc | |
parent | b8a7c39cf26f6d417efc34acdf6f4c2a6762052d (diff) |
slightly speed-up things by using ScTable access
Change-Id: I378cd0e1eaa0f41799e4e18d1daae813540da77d
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/documen7.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx index 6429fa53267c..dc511a58fcb3 100644 --- a/sc/source/core/data/documen7.cxx +++ b/sc/source/core/data/documen7.cxx @@ -120,16 +120,22 @@ void ScDocument::BroadcastCells( const ScRange& rRange, sal_uLong nHint ) for (SCTAB nTab = nTab1; nTab <= nTab2; ++nTab) { + ScTable* pTab = FetchTable(nTab); + if (!pTab) + continue; + rPos.SetTab(nTab); - for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow) + for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol) { - rPos.SetRow(nRow); - for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol) + rPos.SetCol(nCol); + /* TODO: to speed-up things a per column iterator to + * cell-broadcast in a range of rows would come handy. */ + for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow) { - rPos.SetCol(nCol); - SvtBroadcaster* pBC = GetBroadcaster(rPos); + SvtBroadcaster* pBC = pTab->GetBroadcaster( nCol, nRow); if (pBC) { + rPos.SetRow(nRow); pBC->Broadcast(aHint); bIsBroadcasted = true; } |