summaryrefslogtreecommitdiff
path: root/sc/source/core/data/document.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/document.cxx')
-rw-r--r--sc/source/core/data/document.cxx30
1 files changed, 16 insertions, 14 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 1bd256ea85fe..c9f14cf44eab 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1168,12 +1168,12 @@ struct StartNeededListenersHandler : std::unary_function<ScTable*, void>
}
};
-struct SetRelNameDirtyHandler : std::unary_function<ScTable*, void>
+struct SetDirtyIfPostponedHandler : std::unary_function<ScTable*, void>
{
void operator() (ScTable* p)
{
if (p)
- p->SetRelNameDirty();
+ p->SetDirtyIfPostponed();
}
};
@@ -1263,12 +1263,13 @@ bool ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
for (; it != maTabs.end(); ++it)
if (*it)
(*it)->StartNeededListeners();
- // at least all cells using range names pointing relative
- // to the moved range must recalculate
+ // At least all cells using range names pointing relative to the
+ // moved range must be recalculated, and all cells marked postponed
+ // dirty.
it = maTabs.begin();
for (; it != maTabs.end(); ++it)
if (*it)
- (*it)->SetRelNameDirty();
+ (*it)->SetDirtyIfPostponed();
std::for_each(maTabs.begin(), maTabs.end(), BroadcastRecalcOnRefMoveHandler());
}
@@ -1358,12 +1359,12 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
for (; it != maTabs.end(); ++it)
if (*it)
(*it)->StartNeededListeners();
- // at least all cells using range names pointing relative
- // to the moved range must recalculate
+ // At least all cells using range names pointing relative to the moved
+ // range must be recalculated, and all cells marked postponed dirty.
it = maTabs.begin();
for (; it != maTabs.end(); ++it)
if (*it)
- (*it)->SetRelNameDirty();
+ (*it)->SetDirtyIfPostponed();
std::for_each(maTabs.begin(), maTabs.end(), BroadcastRecalcOnRefMoveHandler());
}
@@ -1465,9 +1466,10 @@ bool ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
{
// Listeners have been removed in UpdateReference
std::for_each(maTabs.begin(), maTabs.end(), StartNeededListenersHandler());
- // at least all cells using range names pointing relative to the
- // moved range must recalculate.
- std::for_each(maTabs.begin(), maTabs.end(), SetRelNameDirtyHandler());
+ // At least all cells using range names pointing relative to the
+ // moved range must be recalculated, and all cells marked postponed
+ // dirty.
+ std::for_each(maTabs.begin(), maTabs.end(), SetDirtyIfPostponedHandler());
// Cells containing functions such as CELL, COLUMN or ROW may have
// changed their values on relocation. Broadcast them.
std::for_each(maTabs.begin(), maTabs.end(), BroadcastRecalcOnRefMoveHandler());
@@ -1557,12 +1559,12 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA
for (; it != maTabs.end(); ++it)
if (*it)
(*it)->StartNeededListeners();
- // at least all cells using range names pointing relative
- // to the moved range must recalculate
+ // At least all cells using range names pointing relative to the moved
+ // range must be recalculated, and all cells marked postponed dirty.
it = maTabs.begin();
for (; it != maTabs.end(); ++it)
if (*it)
- (*it)->SetRelNameDirty();
+ (*it)->SetDirtyIfPostponed();
std::for_each(maTabs.begin(), maTabs.end(), BroadcastRecalcOnRefMoveHandler());
}