summaryrefslogtreecommitdiff
path: root/sc/source/core/data
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-10-26 14:43:14 -0700
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-10-26 14:45:52 -0700
commit10fc138307afb4b39baddb0d56eb8e986e5d29ea (patch)
tree2cbfd2b7ee0991e162af65152281841f647f0090 /sc/source/core/data
parent8c6d3cd45e2183a19f91e9a30c1fdc699de393f8 (diff)
fdo#85215: Don't adjust references wrt cell position when disabled.
Change-Id: Ie1a12cc189bcb66fad59ea9901ac0dc95bb68788
Diffstat (limited to 'sc/source/core/data')
-rw-r--r--sc/source/core/data/table3.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index e41458b9e9d7..3e8250ab219a 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -854,8 +854,11 @@ void ScTable::SortReorderByRow(
ScAddress aOldPos = rCell.maCell.mpFormula->aPos;
ScFormulaCell* pNew = rCell.maCell.mpFormula->Clone( aCellPos, SC_CLONECELL_DEFAULT);
- pNew->CopyAllBroadcasters(*rCell.maCell.mpFormula);
- pNew->GetCode()->AdjustReferenceOnMovedOrigin(aOldPos, aCellPos);
+ if (pArray->IsUpdateRefs())
+ {
+ pNew->CopyAllBroadcasters(*rCell.maCell.mpFormula);
+ pNew->GetCode()->AdjustReferenceOnMovedOrigin(aOldPos, aCellPos);
+ }
rCellStore.push_back(pNew);
}