summaryrefslogtreecommitdiff
path: root/sc/source/core/data/column.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/column.cxx')
-rw-r--r--sc/source/core/data/column.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 10da725f64a7..c014e0047b1f 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -3055,14 +3055,27 @@ void ScColumn::SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt )
sc::ProcessFormula(maCells, aFunc);
}
-void ScColumn::SetDirty( SCROW nRow1, SCROW nRow2 )
+void ScColumn::SetDirty( SCROW nRow1, SCROW nRow2, bool bIncludeEmptyCells )
{
// broadcasts everything within the range, with FormulaTracking
sc::AutoCalcSwitch aSwitch(*pDocument, false);
SetDirtyOnRangeHandler aHdl(*this);
sc::ProcessFormula(maCells.begin(), maCells, nRow1, nRow2, aHdl, aHdl);
- aHdl.broadcast();
+ if (bIncludeEmptyCells)
+ {
+ // Broadcast the changes.
+ ScHint aHint( SC_HINT_DATACHANGED, ScAddress( nCol, 0, nTab));
+ for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
+ {
+ aHint.GetAddress().SetRow(nRow);
+ pDocument->Broadcast(aHint);
+ }
+ }
+ else
+ {
+ aHdl.broadcast();
+ }
}
void ScColumn::SetTableOpDirty( const ScRange& rRange )