diff options
-rw-r--r-- | sc/source/core/data/column.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index d6152dd5412b..521b942cb9af 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -2044,6 +2044,12 @@ class UpdateRefOnNonCopy : std::unary_function<sc::FormulaGroupEntry, void> if (pCode->IsRecalcModeOnRefMove()) aRes.mbValueChanged = true; } + else if (aRes.mbReferenceModified && pCode->IsRecalcModeOnRefMove()) + { + // The cell itself hasn't shifted. But it may have ROW or COLUMN + // referencing another cell that has. + aRes.mbValueChanged = true; + } if (aRes.mbNameModified) recompileTokenArray(*pTop); diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 8cd95986c73c..33f64e920b5a 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -2788,7 +2788,7 @@ bool ScFormulaCell::UpdateReferenceOnShift( if (bOnRefMove) // Cell may reference itself, e.g. ocColumn, ocRow without parameter - bOnRefMove = (bValChanged || (aPos != aOldPos)); + bOnRefMove = (bValChanged || (aPos != aOldPos) || bRefModified); bool bNewListening = false; bool bInDeleteUndo = false; |