From 8a36879eaf0977448b113c2239014d2e2b7ab258 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Wed, 29 Jan 2014 11:42:27 -0500 Subject: fdo#74014: More on broadcasting at appropriate places. Also, call PostDataChanged() to re-paint re-calculated formula cells. Change-Id: I63161329d4bfe937f754773fd68c37e3836c4950 --- sc/source/core/data/documen7.cxx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'sc/source/core/data') diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx index b8f691b91a00..210d87bd64d7 100644 --- a/sc/source/core/data/documen7.cxx +++ b/sc/source/core/data/documen7.cxx @@ -104,6 +104,31 @@ void ScDocument::Broadcast( const ScHint& rHint ) } } +void ScDocument::BroadcastCells( const ScRange& rRange, sal_uLong nHint ) +{ + CellContentModified(); + + ScBulkBroadcast aBulkBroadcast(pBASM); + + ScHint aHint(nHint, ScAddress()); + ScAddress& rPos = aHint.GetAddress(); + for (SCTAB nTab = rRange.aStart.Tab(); nTab <= rRange.aEnd.Tab(); ++nTab) + { + rPos.SetTab(nTab); + for (SCCOL nCol = rRange.aStart.Col(); nCol <= rRange.aEnd.Col(); ++nCol) + { + rPos.SetCol(nCol); + for (SCROW nRow = rRange.aStart.Row(); nRow <= rRange.aEnd.Row(); ++nRow) + { + rPos.SetRow(nRow); + Broadcast(aHint); + } + } + } + + BroadcastUno(SfxSimpleHint(SC_HINT_DATACHANGED)); +} + void ScDocument::AreaBroadcast( const ScHint& rHint ) { if ( !pBASM ) -- cgit v1.2.3