summaryrefslogtreecommitdiff
path: root/sc/source/core/data
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data')
-rw-r--r--sc/source/core/data/column4.cxx2
-rw-r--r--sc/source/core/data/table3.cxx4
2 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 568b5b64ec19..10bec05bc2a3 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -454,6 +454,8 @@ public:
pCell->aPos.SetRow(nRow);
if (mbUpdateRefs)
pCell->GetCode()->AdjustReferenceOnMovedOrigin(aOldPos, pCell->aPos);
+ else
+ pCell->GetCode()->AdjustReferenceOnMovedOriginIfOtherSheet(aOldPos, pCell->aPos);
}
else
{
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 99d6239a0262..e49a4dcdefbd 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -870,6 +870,10 @@ void ScTable::SortReorderByRow(
pNew->CopyAllBroadcasters(*rCell.maCell.mpFormula);
pNew->GetCode()->AdjustReferenceOnMovedOrigin(aOldPos, aCellPos);
}
+ else
+ {
+ pNew->GetCode()->AdjustReferenceOnMovedOriginIfOtherSheet(aOldPos, aCellPos);
+ }
sc::CellStoreType::iterator itBlk = rCellStore.push_back(pNew);
}