diff options
-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; } |